ASoC: Allow user-specified WM8958 multiband compressor configurations
The paramters of the WM8958 multiband compressor can be tuned by the user for their system using a graphical configuration tool on the host. Allow the user to specify a set of such paramters in platform data and select between them at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
@@ -30,6 +30,8 @@ struct wm8994_ldo_pdata {
|
||||
|
||||
#define WM8994_DRC_REGS 5
|
||||
#define WM8994_EQ_REGS 19
|
||||
#define WM8958_MBC_CUTOFF_REGS 20
|
||||
#define WM8958_MBC_COEFF_REGS 48
|
||||
|
||||
/**
|
||||
* DRC configurations are specified with a label and a set of register
|
||||
@@ -59,6 +61,18 @@ struct wm8994_retune_mobile_cfg {
|
||||
u16 regs[WM8994_EQ_REGS];
|
||||
};
|
||||
|
||||
/**
|
||||
* Multiband compressor configurations are specified with a label and
|
||||
* two sets of values to write. Configurations are expected to be
|
||||
* generated using the multiband compressor configuration panel in
|
||||
* WISCE - see http://www.wolfsonmicro.com/wisce/
|
||||
*/
|
||||
struct wm8958_mbc_cfg {
|
||||
const char *name;
|
||||
u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS];
|
||||
u16 coeff_regs[WM8958_MBC_COEFF_REGS];
|
||||
};
|
||||
|
||||
struct wm8994_pdata {
|
||||
int gpio_base;
|
||||
|
||||
@@ -78,6 +92,9 @@ struct wm8994_pdata {
|
||||
int num_retune_mobile_cfgs;
|
||||
struct wm8994_retune_mobile_cfg *retune_mobile_cfgs;
|
||||
|
||||
int num_mbc_cfgs;
|
||||
struct wm8958_mbc_cfg *mbc_cfgs;
|
||||
|
||||
/* LINEOUT can be differential or single ended */
|
||||
unsigned int lineout1_diff:1;
|
||||
unsigned int lineout2_diff:1;
|
||||
|
@@ -258,6 +258,74 @@
|
||||
#define WM8958_DSP2_VERMAJMIN 0xA04
|
||||
#define WM8958_DSP2_VERBUILD 0xA05
|
||||
#define WM8958_DSP2_EXECCONTROL 0xA0D
|
||||
#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C1_1 0x2200
|
||||
#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C1_2 0x2201
|
||||
#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C2_1 0x2202
|
||||
#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C2_2 0x2203
|
||||
#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C3_1 0x2204
|
||||
#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C3_2 0x2205
|
||||
#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C2_1 0x2206
|
||||
#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C2_2 0x2207
|
||||
#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C3_1 0x2208
|
||||
#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C3_2 0x2209
|
||||
#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C1_1 0x220A
|
||||
#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C1_2 0x220B
|
||||
#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C1_1 0x220C
|
||||
#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C1_2 0x220D
|
||||
#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C2_1 0x220E
|
||||
#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C2_2 0x220F
|
||||
#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C3_1 0x2210
|
||||
#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C3_2 0x2211
|
||||
#define WM8958_MBC_BAND_1_LOWER_CUTOFF_1 0x2212
|
||||
#define WM8958_MBC_BAND_1_LOWER_CUTOFF_2 0x2213
|
||||
#define WM8958_MBC_BAND_1_K_1 0x2400
|
||||
#define WM8958_MBC_BAND_1_K_2 0x2401
|
||||
#define WM8958_MBC_BAND_1_N1_1 0x2402
|
||||
#define WM8958_MBC_BAND_1_N1_2 0x2403
|
||||
#define WM8958_MBC_BAND_1_N2_1 0x2404
|
||||
#define WM8958_MBC_BAND_1_N2_2 0x2405
|
||||
#define WM8958_MBC_BAND_1_N3_1 0x2406
|
||||
#define WM8958_MBC_BAND_1_N3_2 0x2407
|
||||
#define WM8958_MBC_BAND_1_N4_1 0x2408
|
||||
#define WM8958_MBC_BAND_1_N4_2 0x2409
|
||||
#define WM8958_MBC_BAND_1_N5_1 0x240A
|
||||
#define WM8958_MBC_BAND_1_N5_2 0x240B
|
||||
#define WM8958_MBC_BAND_1_X1_1 0x240C
|
||||
#define WM8958_MBC_BAND_1_X1_2 0x240D
|
||||
#define WM8958_MBC_BAND_1_X2_1 0x240E
|
||||
#define WM8958_MBC_BAND_1_X2_2 0x240F
|
||||
#define WM8958_MBC_BAND_1_X3_1 0x2410
|
||||
#define WM8958_MBC_BAND_1_X3_2 0x2411
|
||||
#define WM8958_MBC_BAND_1_ATTACK_1 0x2412
|
||||
#define WM8958_MBC_BAND_1_ATTACK_2 0x2413
|
||||
#define WM8958_MBC_BAND_1_DECAY_1 0x2414
|
||||
#define WM8958_MBC_BAND_1_DECAY_2 0x2415
|
||||
#define WM8958_MBC_BAND_2_K_1 0x2416
|
||||
#define WM8958_MBC_BAND_2_K_2 0x2417
|
||||
#define WM8958_MBC_BAND_2_N1_1 0x2418
|
||||
#define WM8958_MBC_BAND_2_N1_2 0x2419
|
||||
#define WM8958_MBC_BAND_2_N2_1 0x241A
|
||||
#define WM8958_MBC_BAND_2_N2_2 0x241B
|
||||
#define WM8958_MBC_BAND_2_N3_1 0x241C
|
||||
#define WM8958_MBC_BAND_2_N3_2 0x241D
|
||||
#define WM8958_MBC_BAND_2_N4_1 0x241E
|
||||
#define WM8958_MBC_BAND_2_N4_2 0x241F
|
||||
#define WM8958_MBC_BAND_2_N5_1 0x2420
|
||||
#define WM8958_MBC_BAND_2_N5_2 0x2421
|
||||
#define WM8958_MBC_BAND_2_X1_1 0x2422
|
||||
#define WM8958_MBC_BAND_2_X1_2 0x2423
|
||||
#define WM8958_MBC_BAND_2_X2_1 0x2424
|
||||
#define WM8958_MBC_BAND_2_X2_2 0x2425
|
||||
#define WM8958_MBC_BAND_2_X3_1 0x2426
|
||||
#define WM8958_MBC_BAND_2_X3_2 0x2427
|
||||
#define WM8958_MBC_BAND_2_ATTACK_1 0x2428
|
||||
#define WM8958_MBC_BAND_2_ATTACK_2 0x2429
|
||||
#define WM8958_MBC_BAND_2_DECAY_1 0x242A
|
||||
#define WM8958_MBC_BAND_2_DECAY_2 0x242B
|
||||
#define WM8958_MBC_B2_PG2_1 0x242C
|
||||
#define WM8958_MBC_B2_PG2_2 0x242D
|
||||
#define WM8958_MBC_B1_PG2_1 0x242E
|
||||
#define WM8958_MBC_B1_PG2_2 0x242F
|
||||
#define WM8994_WRITE_SEQUENCER_0 0x3000
|
||||
#define WM8994_WRITE_SEQUENCER_1 0x3001
|
||||
#define WM8994_WRITE_SEQUENCER_2 0x3002
|
||||
|
Reference in New Issue
Block a user