aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-30 12:03:39 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-01 06:47:29 -0500
commit131d81061eba5ffd436b5d132530ac5205b16892 (patch)
tree16e0df193581d982c541fd531347e07fb360059b /include
parentb2822a8c22d13bc8c441e1c0492baa40ae974b51 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/wm8994/pdata.h17
-rw-r--r--include/linux/mfd/wm8994/registers.h68
2 files changed, 85 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h
index 5c51f367c061..882b51aefbc0 100644
--- a/include/linux/mfd/wm8994/pdata.h
+++ b/include/linux/mfd/wm8994/pdata.h
@@ -30,6 +30,8 @@ struct wm8994_ldo_pdata {
30 30
31#define WM8994_DRC_REGS 5 31#define WM8994_DRC_REGS 5
32#define WM8994_EQ_REGS 19 32#define WM8994_EQ_REGS 19
33#define WM8958_MBC_CUTOFF_REGS 20
34#define WM8958_MBC_COEFF_REGS 48
33 35
34/** 36/**
35 * DRC configurations are specified with a label and a set of register 37 * DRC configurations are specified with a label and a set of register
@@ -59,6 +61,18 @@ struct wm8994_retune_mobile_cfg {
59 u16 regs[WM8994_EQ_REGS]; 61 u16 regs[WM8994_EQ_REGS];
60}; 62};
61 63
64/**
65 * Multiband compressor configurations are specified with a label and
66 * two sets of values to write. Configurations are expected to be
67 * generated using the multiband compressor configuration panel in
68 * WISCE - see http://www.wolfsonmicro.com/wisce/
69 */
70struct wm8958_mbc_cfg {
71 const char *name;
72 u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS];
73 u16 coeff_regs[WM8958_MBC_COEFF_REGS];
74};
75
62struct wm8994_pdata { 76struct wm8994_pdata {
63 int gpio_base; 77 int gpio_base;
64 78
@@ -78,6 +92,9 @@ struct wm8994_pdata {
78 int num_retune_mobile_cfgs; 92 int num_retune_mobile_cfgs;
79 struct wm8994_retune_mobile_cfg *retune_mobile_cfgs; 93 struct wm8994_retune_mobile_cfg *retune_mobile_cfgs;
80 94
95 int num_mbc_cfgs;
96 struct wm8958_mbc_cfg *mbc_cfgs;
97
81 /* LINEOUT can be differential or single ended */ 98 /* LINEOUT can be differential or single ended */
82 unsigned int lineout1_diff:1; 99 unsigned int lineout1_diff:1;
83 unsigned int lineout2_diff:1; 100 unsigned int lineout2_diff:1;
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h
index a610c8746436..ccf3a774fe36 100644
--- a/include/linux/mfd/wm8994/registers.h
+++ b/include/linux/mfd/wm8994/registers.h
@@ -258,6 +258,74 @@
258#define WM8958_DSP2_VERMAJMIN 0xA04 258#define WM8958_DSP2_VERMAJMIN 0xA04
259#define WM8958_DSP2_VERBUILD 0xA05 259#define WM8958_DSP2_VERBUILD 0xA05
260#define WM8958_DSP2_EXECCONTROL 0xA0D 260#define WM8958_DSP2_EXECCONTROL 0xA0D
261#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C1_1 0x2200
262#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C1_2 0x2201
263#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C2_1 0x2202
264#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C2_2 0x2203
265#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C3_1 0x2204
266#define WM8958_MBC_BAND_2_LOWER_CUTOFF_C3_2 0x2205
267#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C2_1 0x2206
268#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C2_2 0x2207
269#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C3_1 0x2208
270#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C3_2 0x2209
271#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C1_1 0x220A
272#define WM8958_MBC_BAND_2_UPPER_CUTOFF_C1_2 0x220B
273#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C1_1 0x220C
274#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C1_2 0x220D
275#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C2_1 0x220E
276#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C2_2 0x220F
277#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C3_1 0x2210
278#define WM8958_MBC_BAND_1_UPPER_CUTOFF_C3_2 0x2211
279#define WM8958_MBC_BAND_1_LOWER_CUTOFF_1 0x2212
280#define WM8958_MBC_BAND_1_LOWER_CUTOFF_2 0x2213
281#define WM8958_MBC_BAND_1_K_1 0x2400
282#define WM8958_MBC_BAND_1_K_2 0x2401
283#define WM8958_MBC_BAND_1_N1_1 0x2402
284#define WM8958_MBC_BAND_1_N1_2 0x2403
285#define WM8958_MBC_BAND_1_N2_1 0x2404
286#define WM8958_MBC_BAND_1_N2_2 0x2405
287#define WM8958_MBC_BAND_1_N3_1 0x2406
288#define WM8958_MBC_BAND_1_N3_2 0x2407
289#define WM8958_MBC_BAND_1_N4_1 0x2408
290#define WM8958_MBC_BAND_1_N4_2 0x2409
291#define WM8958_MBC_BAND_1_N5_1 0x240A
292#define WM8958_MBC_BAND_1_N5_2 0x240B
293#define WM8958_MBC_BAND_1_X1_1 0x240C
294#define WM8958_MBC_BAND_1_X1_2 0x240D
295#define WM8958_MBC_BAND_1_X2_1 0x240E
296#define WM8958_MBC_BAND_1_X2_2 0x240F
297#define WM8958_MBC_BAND_1_X3_1 0x2410
298#define WM8958_MBC_BAND_1_X3_2 0x2411
299#define WM8958_MBC_BAND_1_ATTACK_1 0x2412
300#define WM8958_MBC_BAND_1_ATTACK_2 0x2413
301#define WM8958_MBC_BAND_1_DECAY_1 0x2414
302#define WM8958_MBC_BAND_1_DECAY_2 0x2415
303#define WM8958_MBC_BAND_2_K_1 0x2416
304#define WM8958_MBC_BAND_2_K_2 0x2417
305#define WM8958_MBC_BAND_2_N1_1 0x2418
306#define WM8958_MBC_BAND_2_N1_2 0x2419
307#define WM8958_MBC_BAND_2_N2_1 0x241A
308#define WM8958_MBC_BAND_2_N2_2 0x241B
309#define WM8958_MBC_BAND_2_N3_1 0x241C
310#define WM8958_MBC_BAND_2_N3_2 0x241D
311#define WM8958_MBC_BAND_2_N4_1 0x241E
312#define WM8958_MBC_BAND_2_N4_2 0x241F
313#define WM8958_MBC_BAND_2_N5_1 0x2420
314#define WM8958_MBC_BAND_2_N5_2 0x2421
315#define WM8958_MBC_BAND_2_X1_1 0x2422
316#define WM8958_MBC_BAND_2_X1_2 0x2423
317#define WM8958_MBC_BAND_2_X2_1 0x2424
318#define WM8958_MBC_BAND_2_X2_2 0x2425
319#define WM8958_MBC_BAND_2_X3_1 0x2426
320#define WM8958_MBC_BAND_2_X3_2 0x2427
321#define WM8958_MBC_BAND_2_ATTACK_1 0x2428
322#define WM8958_MBC_BAND_2_ATTACK_2 0x2429
323#define WM8958_MBC_BAND_2_DECAY_1 0x242A
324#define WM8958_MBC_BAND_2_DECAY_2 0x242B
325#define WM8958_MBC_B2_PG2_1 0x242C
326#define WM8958_MBC_B2_PG2_2 0x242D
327#define WM8958_MBC_B1_PG2_1 0x242E
328#define WM8958_MBC_B1_PG2_2 0x242F
261#define WM8994_WRITE_SEQUENCER_0 0x3000 329#define WM8994_WRITE_SEQUENCER_0 0x3000
262#define WM8994_WRITE_SEQUENCER_1 0x3001 330#define WM8994_WRITE_SEQUENCER_1 0x3001
263#define WM8994_WRITE_SEQUENCER_2 0x3002 331#define WM8994_WRITE_SEQUENCER_2 0x3002