Commit dad31ec1 authored by Peter Hsiang's avatar Peter Hsiang Committed by Mark Brown

ASoC: Add EQ and filter to max98095 CODEC driver

This patch adds the equalizer and biquad filter controls.
Signed-off-by: default avatarPeter Hsiang <peter.hsiang@maxim-ic.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent dea8b6ee
......@@ -13,8 +13,36 @@
#ifndef __SOUND_MAX98095_PDATA_H__
#define __SOUND_MAX98095_PDATA_H__
/* Equalizer filter response configuration */
struct max98095_eq_cfg {
const char *name;
unsigned int rate;
u16 band1[5];
u16 band2[5];
u16 band3[5];
u16 band4[5];
u16 band5[5];
};
/* Biquad filter response configuration */
struct max98095_biquad_cfg {
const char *name;
unsigned int rate;
u16 band1[5];
u16 band2[5];
};
/* codec platform data */
struct max98095_pdata {
/* Equalizers for DAI1 and DAI2 */
struct max98095_eq_cfg *eq_cfg;
unsigned int eq_cfgcnt;
/* Biquad filter for DAI1 and DAI2 */
struct max98095_biquad_cfg *bq_cfg;
unsigned int bq_cfgcnt;
/* Analog/digital microphone configuration:
* 0 = analog microphone input (normal setting)
* 1 = digital microphone input
......
This diff is collapsed.
......@@ -250,6 +250,8 @@
/* M98095_088_CFG_LEVEL */
#define M98095_VSEN (1<<6)
#define M98095_ZDEN (1<<5)
#define M98095_BQ2EN (1<<3)
#define M98095_BQ1EN (1<<2)
#define M98095_EQ2EN (1<<1)
#define M98095_EQ1EN (1<<0)
......@@ -281,4 +283,17 @@
#define M98095_PWRSV8K (1<<1)
#define M98095_PWRSV (1<<0)
#define M98095_COEFS_PER_BAND 5
#define M98095_BYTE1(w) ((w >> 8) & 0xff)
#define M98095_BYTE0(w) (w & 0xff)
/* Equalizer filter coefficients */
#define M98095_110_DAI1_EQ_BASE 0x10
#define M98095_142_DAI2_EQ_BASE 0x42
/* Biquad filter coefficients */
#define M98095_174_DAI1_BQ_BASE 0x74
#define M98095_17E_DAI2_BQ_BASE 0x7E
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment