diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-05-22 04:01:33 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-22 04:01:33 -0400 |
commit | 7ec298dfef00e2c8effe8658011e03d86911b0bf (patch) | |
tree | dd62232006547b861a2731fe49c26367d3e9422c /include | |
parent | 02e5fbf622aabf68bdc02282a17a3aeed054237a (diff) | |
parent | de0853c000aa3b5c9983d066c137e5dc9c8355a0 (diff) |
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/wm8994/pdata.h | 49 | ||||
-rw-r--r-- | include/sound/ak4641.h | 26 | ||||
-rw-r--r-- | include/sound/max98095.h | 54 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 80 | ||||
-rw-r--r-- | include/sound/soc.h | 32 | ||||
-rw-r--r-- | include/sound/tlv320dac33-plat.h | 2 | ||||
-rw-r--r-- | include/sound/tpa6130a2-plat.h | 2 | ||||
-rw-r--r-- | include/sound/wm8915.h | 55 | ||||
-rw-r--r-- | include/sound/wm8962.h | 22 |
9 files changed, 279 insertions, 43 deletions
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 466b1c777aff..d12f8d635a81 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -32,6 +32,10 @@ struct wm8994_ldo_pdata { | |||
32 | #define WM8994_EQ_REGS 20 | 32 | #define WM8994_EQ_REGS 20 |
33 | #define WM8958_MBC_CUTOFF_REGS 20 | 33 | #define WM8958_MBC_CUTOFF_REGS 20 |
34 | #define WM8958_MBC_COEFF_REGS 48 | 34 | #define WM8958_MBC_COEFF_REGS 48 |
35 | #define WM8958_MBC_COMBINED_REGS 56 | ||
36 | #define WM8958_VSS_HPF_REGS 2 | ||
37 | #define WM8958_VSS_REGS 148 | ||
38 | #define WM8958_ENH_EQ_REGS 32 | ||
35 | 39 | ||
36 | /** | 40 | /** |
37 | * DRC configurations are specified with a label and a set of register | 41 | * DRC configurations are specified with a label and a set of register |
@@ -71,6 +75,42 @@ struct wm8958_mbc_cfg { | |||
71 | const char *name; | 75 | const char *name; |
72 | u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS]; | 76 | u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS]; |
73 | u16 coeff_regs[WM8958_MBC_COEFF_REGS]; | 77 | u16 coeff_regs[WM8958_MBC_COEFF_REGS]; |
78 | |||
79 | /* Coefficient layout when using MBC+VSS firmware */ | ||
80 | u16 combined_regs[WM8958_MBC_COMBINED_REGS]; | ||
81 | }; | ||
82 | |||
83 | /** | ||
84 | * VSS HPF configurations are specified with a label and two values to | ||
85 | * write. Configurations are expected to be generated using the | ||
86 | * multiband compressor configuration panel in WISCE - see | ||
87 | * http://www.wolfsonmicro.com/wisce/ | ||
88 | */ | ||
89 | struct wm8958_vss_hpf_cfg { | ||
90 | const char *name; | ||
91 | u16 regs[WM8958_VSS_HPF_REGS]; | ||
92 | }; | ||
93 | |||
94 | /** | ||
95 | * VSS configurations are specified with a label and array of values | ||
96 | * to write. Configurations are expected to be generated using the | ||
97 | * multiband compressor configuration panel in WISCE - see | ||
98 | * http://www.wolfsonmicro.com/wisce/ | ||
99 | */ | ||
100 | struct wm8958_vss_cfg { | ||
101 | const char *name; | ||
102 | u16 regs[WM8958_VSS_REGS]; | ||
103 | }; | ||
104 | |||
105 | /** | ||
106 | * Enhanced EQ configurations are specified with a label and array of | ||
107 | * values to write. Configurations are expected to be generated using | ||
108 | * the multiband compressor configuration panel in WISCE - see | ||
109 | * http://www.wolfsonmicro.com/wisce/ | ||
110 | */ | ||
111 | struct wm8958_enh_eq_cfg { | ||
112 | const char *name; | ||
113 | u16 regs[WM8958_ENH_EQ_REGS]; | ||
74 | }; | 114 | }; |
75 | 115 | ||
76 | struct wm8994_pdata { | 116 | struct wm8994_pdata { |
@@ -95,6 +135,15 @@ struct wm8994_pdata { | |||
95 | int num_mbc_cfgs; | 135 | int num_mbc_cfgs; |
96 | struct wm8958_mbc_cfg *mbc_cfgs; | 136 | struct wm8958_mbc_cfg *mbc_cfgs; |
97 | 137 | ||
138 | int num_vss_cfgs; | ||
139 | struct wm8958_vss_cfg *vss_cfgs; | ||
140 | |||
141 | int num_vss_hpf_cfgs; | ||
142 | struct wm8958_vss_hpf_cfg *vss_hpf_cfgs; | ||
143 | |||
144 | int num_enh_eq_cfgs; | ||
145 | struct wm8958_enh_eq_cfg *enh_eq_cfgs; | ||
146 | |||
98 | /* LINEOUT can be differential or single ended */ | 147 | /* LINEOUT can be differential or single ended */ |
99 | unsigned int lineout1_diff:1; | 148 | unsigned int lineout1_diff:1; |
100 | unsigned int lineout2_diff:1; | 149 | unsigned int lineout2_diff:1; |
diff --git a/include/sound/ak4641.h b/include/sound/ak4641.h new file mode 100644 index 000000000000..96d1991c811d --- /dev/null +++ b/include/sound/ak4641.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * AK4641 ALSA SoC Codec driver | ||
3 | * | ||
4 | * Copyright 2009 Philipp Zabel | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __AK4641_H | ||
12 | #define __AK4641_H | ||
13 | |||
14 | /** | ||
15 | * struct ak4641_platform_data - platform specific AK4641 configuration | ||
16 | * @gpio_power: GPIO to control external power to AK4641 | ||
17 | * @gpio_npdn: GPIO connected to AK4641 nPDN pin | ||
18 | * | ||
19 | * Both GPIO parameters are optional. | ||
20 | */ | ||
21 | struct ak4641_platform_data { | ||
22 | int gpio_power; | ||
23 | int gpio_npdn; | ||
24 | }; | ||
25 | |||
26 | #endif /* __AK4641_H */ | ||
diff --git a/include/sound/max98095.h b/include/sound/max98095.h new file mode 100644 index 000000000000..7513a42dd4aa --- /dev/null +++ b/include/sound/max98095.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * Platform data for MAX98095 | ||
3 | * | ||
4 | * Copyright 2011 Maxim Integrated Products | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __SOUND_MAX98095_PDATA_H__ | ||
14 | #define __SOUND_MAX98095_PDATA_H__ | ||
15 | |||
16 | /* Equalizer filter response configuration */ | ||
17 | struct max98095_eq_cfg { | ||
18 | const char *name; | ||
19 | unsigned int rate; | ||
20 | u16 band1[5]; | ||
21 | u16 band2[5]; | ||
22 | u16 band3[5]; | ||
23 | u16 band4[5]; | ||
24 | u16 band5[5]; | ||
25 | }; | ||
26 | |||
27 | /* Biquad filter response configuration */ | ||
28 | struct max98095_biquad_cfg { | ||
29 | const char *name; | ||
30 | unsigned int rate; | ||
31 | u16 band1[5]; | ||
32 | u16 band2[5]; | ||
33 | }; | ||
34 | |||
35 | /* codec platform data */ | ||
36 | struct max98095_pdata { | ||
37 | |||
38 | /* Equalizers for DAI1 and DAI2 */ | ||
39 | struct max98095_eq_cfg *eq_cfg; | ||
40 | unsigned int eq_cfgcnt; | ||
41 | |||
42 | /* Biquad filter for DAI1 and DAI2 */ | ||
43 | struct max98095_biquad_cfg *bq_cfg; | ||
44 | unsigned int bq_cfgcnt; | ||
45 | |||
46 | /* Analog/digital microphone configuration: | ||
47 | * 0 = analog microphone input (normal setting) | ||
48 | * 1 = digital microphone input | ||
49 | */ | ||
50 | unsigned int digmic_left_mode:1; | ||
51 | unsigned int digmic_right_mode:1; | ||
52 | }; | ||
53 | |||
54 | #endif | ||
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index f72c1039a6fb..c46e7d89561d 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * SoC dynamic audio power management | 24 | * SoC dynamic audio power management |
25 | * | 25 | * |
26 | * We can have up to 4 power domains | 26 | * We can have up to 4 power domains |
27 | * 1. Codec domain - VREF, VMID | 27 | * 1. Codec domain - VREF, VMID |
28 | * Usually controlled at codec probe/remove, although can be set | 28 | * Usually controlled at codec probe/remove, although can be set |
29 | * at stream time if power is not needed for sidetone, etc. | 29 | * at stream time if power is not needed for sidetone, etc. |
30 | * 2. Platform/Machine domain - physically connected inputs and outputs | 30 | * 2. Platform/Machine domain - physically connected inputs and outputs |
@@ -39,30 +39,30 @@ | |||
39 | 39 | ||
40 | /* codec domain */ | 40 | /* codec domain */ |
41 | #define SND_SOC_DAPM_VMID(wname) \ | 41 | #define SND_SOC_DAPM_VMID(wname) \ |
42 | { .id = snd_soc_dapm_vmid, .name = wname, .kcontrols = NULL, \ | 42 | { .id = snd_soc_dapm_vmid, .name = wname, .kcontrol_news = NULL, \ |
43 | .num_kcontrols = 0} | 43 | .num_kcontrols = 0} |
44 | 44 | ||
45 | /* platform domain */ | 45 | /* platform domain */ |
46 | #define SND_SOC_DAPM_INPUT(wname) \ | 46 | #define SND_SOC_DAPM_INPUT(wname) \ |
47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ | 47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \ |
48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } | 48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
49 | #define SND_SOC_DAPM_OUTPUT(wname) \ | 49 | #define SND_SOC_DAPM_OUTPUT(wname) \ |
50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ | 50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrol_news = NULL, \ |
51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } | 51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ | 52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ |
53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ | 53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrol_news = NULL, \ |
54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
56 | #define SND_SOC_DAPM_HP(wname, wevent) \ | 56 | #define SND_SOC_DAPM_HP(wname, wevent) \ |
57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ | 57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrol_news = NULL, \ |
58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ | 60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ |
61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ | 61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrol_news = NULL, \ |
62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ | 64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ |
65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ | 65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrol_news = NULL, \ |
66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
68 | 68 | ||
@@ -70,91 +70,91 @@ | |||
70 | #define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\ | 70 | #define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\ |
71 | wcontrols, wncontrols) \ | 71 | wcontrols, wncontrols) \ |
72 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 72 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
73 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 73 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols} |
74 | #define SND_SOC_DAPM_OUT_DRV(wname, wreg, wshift, winvert,\ | 74 | #define SND_SOC_DAPM_OUT_DRV(wname, wreg, wshift, winvert,\ |
75 | wcontrols, wncontrols) \ | 75 | wcontrols, wncontrols) \ |
76 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ | 76 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ |
77 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 77 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols} |
78 | #define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \ | 78 | #define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \ |
79 | wcontrols, wncontrols)\ | 79 | wcontrols, wncontrols)\ |
80 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 80 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
81 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 81 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols} |
82 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ | 82 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ |
83 | wcontrols, wncontrols)\ | 83 | wcontrols, wncontrols)\ |
84 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | 84 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ |
85 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 85 | .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \ |
86 | .num_kcontrols = wncontrols} | 86 | .num_kcontrols = wncontrols} |
87 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ | 87 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ |
88 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 88 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
89 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} | 89 | .invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0} |
90 | #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \ | 90 | #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \ |
91 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | 91 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ |
92 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 92 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1} |
93 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 93 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
94 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 94 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
95 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 95 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1} |
96 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 96 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
97 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 97 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
98 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | 98 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1} |
99 | #define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 99 | #define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
100 | { .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \ | 100 | { .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \ |
101 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 101 | .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \ |
102 | .num_kcontrols = 1} | 102 | .num_kcontrols = 1} |
103 | 103 | ||
104 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ | 104 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ |
105 | #define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ | 105 | #define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ |
106 | wcontrols) \ | 106 | wcontrols) \ |
107 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 107 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
108 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} | 108 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} |
109 | #define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \ | 109 | #define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \ |
110 | wcontrols)\ | 110 | wcontrols)\ |
111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
112 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} | 112 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} |
113 | #define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \ | 113 | #define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \ |
114 | wcontrols)\ | 114 | wcontrols)\ |
115 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | 115 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ |
116 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 116 | .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \ |
117 | .num_kcontrols = ARRAY_SIZE(wcontrols)} | 117 | .num_kcontrols = ARRAY_SIZE(wcontrols)} |
118 | 118 | ||
119 | /* path domain with event - event handler must return 0 for success */ | 119 | /* path domain with event - event handler must return 0 for success */ |
120 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ | 120 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ |
121 | wncontrols, wevent, wflags) \ | 121 | wncontrols, wevent, wflags) \ |
122 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 122 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
123 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 123 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \ |
124 | .event = wevent, .event_flags = wflags} | 124 | .event = wevent, .event_flags = wflags} |
125 | #define SND_SOC_DAPM_OUT_DRV_E(wname, wreg, wshift, winvert, wcontrols, \ | 125 | #define SND_SOC_DAPM_OUT_DRV_E(wname, wreg, wshift, winvert, wcontrols, \ |
126 | wncontrols, wevent, wflags) \ | 126 | wncontrols, wevent, wflags) \ |
127 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ | 127 | { .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ |
128 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 128 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \ |
129 | .event = wevent, .event_flags = wflags} | 129 | .event = wevent, .event_flags = wflags} |
130 | #define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \ | 130 | #define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \ |
131 | wncontrols, wevent, wflags) \ | 131 | wncontrols, wevent, wflags) \ |
132 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 132 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
133 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 133 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \ |
134 | .event = wevent, .event_flags = wflags} | 134 | .event = wevent, .event_flags = wflags} |
135 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ | 135 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ |
136 | wcontrols, wncontrols, wevent, wflags) \ | 136 | wcontrols, wncontrols, wevent, wflags) \ |
137 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 137 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
138 | .invert = winvert, .kcontrols = wcontrols, \ | 138 | .invert = winvert, .kcontrol_news = wcontrols, \ |
139 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} | 139 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} |
140 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ | 140 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ |
141 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 141 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
142 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ | 142 | .invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0, \ |
143 | .event = wevent, .event_flags = wflags} | 143 | .event = wevent, .event_flags = wflags} |
144 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ | 144 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ |
145 | wevent, wflags) \ | 145 | wevent, wflags) \ |
146 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | 146 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ |
147 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 147 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \ |
148 | .event = wevent, .event_flags = wflags} | 148 | .event = wevent, .event_flags = wflags} |
149 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ | 149 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ |
150 | wevent, wflags) \ | 150 | wevent, wflags) \ |
151 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 151 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
152 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 152 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \ |
153 | .event = wevent, .event_flags = wflags} | 153 | .event = wevent, .event_flags = wflags} |
154 | #define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ | 154 | #define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ |
155 | wevent, wflags) \ | 155 | wevent, wflags) \ |
156 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ | 156 | { .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ |
157 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 157 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \ |
158 | .event = wevent, .event_flags = wflags} | 158 | .event = wevent, .event_flags = wflags} |
159 | 159 | ||
160 | /* additional sequencing control within an event type */ | 160 | /* additional sequencing control within an event type */ |
@@ -173,26 +173,26 @@ | |||
173 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | 173 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ |
174 | wevent, wflags) \ | 174 | wevent, wflags) \ |
175 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | 175 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ |
176 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ | 176 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ |
177 | .event = wevent, .event_flags = wflags} | 177 | .event = wevent, .event_flags = wflags} |
178 | #define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | 178 | #define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ |
179 | wevent, wflags) \ | 179 | wevent, wflags) \ |
180 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 180 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
181 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ | 181 | .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ |
182 | .event = wevent, .event_flags = wflags} | 182 | .event = wevent, .event_flags = wflags} |
183 | #define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \ | 183 | #define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \ |
184 | wcontrols, wevent, wflags) \ | 184 | wcontrols, wevent, wflags) \ |
185 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 185 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
186 | .invert = winvert, .kcontrols = wcontrols, \ | 186 | .invert = winvert, .kcontrol_news = wcontrols, \ |
187 | .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags} | 187 | .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags} |
188 | 188 | ||
189 | /* events that are pre and post DAPM */ | 189 | /* events that are pre and post DAPM */ |
190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | 190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ |
191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | 191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrol_news = NULL, \ |
192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} | 193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} |
194 | #define SND_SOC_DAPM_POST(wname, wevent) \ | 194 | #define SND_SOC_DAPM_POST(wname, wevent) \ |
195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ | 195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrol_news = NULL, \ |
196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ | 196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} | 197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} |
198 | 198 | ||
@@ -232,7 +232,7 @@ | |||
232 | 232 | ||
233 | /* generic widgets */ | 233 | /* generic widgets */ |
234 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ | 234 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ |
235 | { .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \ | 235 | { .id = wid, .name = wname, .kcontrol_news = NULL, .num_kcontrols = 0, \ |
236 | .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ | 236 | .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ |
237 | .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ | 237 | .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ |
238 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 238 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
@@ -356,7 +356,8 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card); | |||
356 | 356 | ||
357 | /* dapm sys fs - used by the core */ | 357 | /* dapm sys fs - used by the core */ |
358 | int snd_soc_dapm_sys_add(struct device *dev); | 358 | int snd_soc_dapm_sys_add(struct device *dev); |
359 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm); | 359 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, |
360 | struct dentry *parent); | ||
360 | 361 | ||
361 | /* dapm audio pin control and status */ | 362 | /* dapm audio pin control and status */ |
362 | int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, | 363 | int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, |
@@ -472,7 +473,8 @@ struct snd_soc_dapm_widget { | |||
472 | 473 | ||
473 | /* kcontrols that relate to this widget */ | 474 | /* kcontrols that relate to this widget */ |
474 | int num_kcontrols; | 475 | int num_kcontrols; |
475 | const struct snd_kcontrol_new *kcontrols; | 476 | const struct snd_kcontrol_new *kcontrol_news; |
477 | struct snd_kcontrol **kcontrols; | ||
476 | 478 | ||
477 | /* widget input and outputs */ | 479 | /* widget input and outputs */ |
478 | struct list_head sources; | 480 | struct list_head sources; |
@@ -516,4 +518,10 @@ struct snd_soc_dapm_context { | |||
516 | #endif | 518 | #endif |
517 | }; | 519 | }; |
518 | 520 | ||
521 | /* A list of widgets associated with an object, typically a snd_kcontrol */ | ||
522 | struct snd_soc_dapm_widget_list { | ||
523 | int num_widgets; | ||
524 | struct snd_soc_dapm_widget *widgets[0]; | ||
525 | }; | ||
526 | |||
519 | #endif | 527 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index bfa4836ea107..f1de3e0c75bc 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -248,7 +248,7 @@ typedef int (*hw_write_t)(void *,const char* ,int); | |||
248 | extern struct snd_ac97_bus_ops soc_ac97_ops; | 248 | extern struct snd_ac97_bus_ops soc_ac97_ops; |
249 | 249 | ||
250 | enum snd_soc_control_type { | 250 | enum snd_soc_control_type { |
251 | SND_SOC_CUSTOM, | 251 | SND_SOC_CUSTOM = 1, |
252 | SND_SOC_I2C, | 252 | SND_SOC_I2C, |
253 | SND_SOC_SPI, | 253 | SND_SOC_SPI, |
254 | }; | 254 | }; |
@@ -278,6 +278,10 @@ int snd_soc_register_codec(struct device *dev, | |||
278 | void snd_soc_unregister_codec(struct device *dev); | 278 | void snd_soc_unregister_codec(struct device *dev); |
279 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, | 279 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, |
280 | unsigned int reg); | 280 | unsigned int reg); |
281 | int snd_soc_codec_readable_register(struct snd_soc_codec *codec, | ||
282 | unsigned int reg); | ||
283 | int snd_soc_codec_writable_register(struct snd_soc_codec *codec, | ||
284 | unsigned int reg); | ||
281 | int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | 285 | int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, |
282 | int addr_bits, int data_bits, | 286 | int addr_bits, int data_bits, |
283 | enum snd_soc_control_type control); | 287 | enum snd_soc_control_type control); |
@@ -292,6 +296,8 @@ int snd_soc_default_volatile_register(struct snd_soc_codec *codec, | |||
292 | unsigned int reg); | 296 | unsigned int reg); |
293 | int snd_soc_default_readable_register(struct snd_soc_codec *codec, | 297 | int snd_soc_default_readable_register(struct snd_soc_codec *codec, |
294 | unsigned int reg); | 298 | unsigned int reg); |
299 | int snd_soc_default_writable_register(struct snd_soc_codec *codec, | ||
300 | unsigned int reg); | ||
295 | 301 | ||
296 | /* Utility functions to get clock rates from various things */ | 302 | /* Utility functions to get clock rates from various things */ |
297 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); | 303 | int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); |
@@ -523,6 +529,7 @@ struct snd_soc_codec { | |||
523 | size_t reg_size; /* reg_cache_size * reg_word_size */ | 529 | size_t reg_size; /* reg_cache_size * reg_word_size */ |
524 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); | 530 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); |
525 | int (*readable_register)(struct snd_soc_codec *, unsigned int); | 531 | int (*readable_register)(struct snd_soc_codec *, unsigned int); |
532 | int (*writable_register)(struct snd_soc_codec *, unsigned int); | ||
526 | 533 | ||
527 | /* runtime */ | 534 | /* runtime */ |
528 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | 535 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ |
@@ -539,10 +546,12 @@ struct snd_soc_codec { | |||
539 | 546 | ||
540 | /* codec IO */ | 547 | /* codec IO */ |
541 | void *control_data; /* codec control (i2c/3wire) data */ | 548 | void *control_data; /* codec control (i2c/3wire) data */ |
549 | enum snd_soc_control_type control_type; | ||
542 | hw_write_t hw_write; | 550 | hw_write_t hw_write; |
543 | unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); | 551 | unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); |
544 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); | 552 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); |
545 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); | 553 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); |
554 | int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t); | ||
546 | void *reg_cache; | 555 | void *reg_cache; |
547 | const void *reg_def_copy; | 556 | const void *reg_def_copy; |
548 | const struct snd_soc_cache_ops *cache_ops; | 557 | const struct snd_soc_cache_ops *cache_ops; |
@@ -568,7 +577,9 @@ struct snd_soc_codec_driver { | |||
568 | pm_message_t state); | 577 | pm_message_t state); |
569 | int (*resume)(struct snd_soc_codec *); | 578 | int (*resume)(struct snd_soc_codec *); |
570 | 579 | ||
571 | /* Default DAPM setup, added after probe() is run */ | 580 | /* Default control and setup, added after probe() is run */ |
581 | const struct snd_kcontrol_new *controls; | ||
582 | int num_controls; | ||
572 | const struct snd_soc_dapm_widget *dapm_widgets; | 583 | const struct snd_soc_dapm_widget *dapm_widgets; |
573 | int num_dapm_widgets; | 584 | int num_dapm_widgets; |
574 | const struct snd_soc_dapm_route *dapm_routes; | 585 | const struct snd_soc_dapm_route *dapm_routes; |
@@ -587,6 +598,7 @@ struct snd_soc_codec_driver { | |||
587 | size_t, unsigned int); | 598 | size_t, unsigned int); |
588 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); | 599 | int (*volatile_register)(struct snd_soc_codec *, unsigned int); |
589 | int (*readable_register)(struct snd_soc_codec *, unsigned int); | 600 | int (*readable_register)(struct snd_soc_codec *, unsigned int); |
601 | int (*writable_register)(struct snd_soc_codec *, unsigned int); | ||
590 | short reg_cache_size; | 602 | short reg_cache_size; |
591 | short reg_cache_step; | 603 | short reg_cache_step; |
592 | short reg_word_size; | 604 | short reg_word_size; |
@@ -690,6 +702,8 @@ struct snd_soc_aux_dev { | |||
690 | /* SoC card */ | 702 | /* SoC card */ |
691 | struct snd_soc_card { | 703 | struct snd_soc_card { |
692 | const char *name; | 704 | const char *name; |
705 | const char *long_name; | ||
706 | const char *driver_name; | ||
693 | struct device *dev; | 707 | struct device *dev; |
694 | struct snd_card *snd_card; | 708 | struct snd_card *snd_card; |
695 | struct module *owner; | 709 | struct module *owner; |
@@ -737,12 +751,15 @@ struct snd_soc_card { | |||
737 | struct snd_soc_pcm_runtime *rtd_aux; | 751 | struct snd_soc_pcm_runtime *rtd_aux; |
738 | int num_aux_rtd; | 752 | int num_aux_rtd; |
739 | 753 | ||
754 | const struct snd_kcontrol_new *controls; | ||
755 | int num_controls; | ||
756 | |||
740 | /* | 757 | /* |
741 | * Card-specific routes and widgets. | 758 | * Card-specific routes and widgets. |
742 | */ | 759 | */ |
743 | struct snd_soc_dapm_widget *dapm_widgets; | 760 | const struct snd_soc_dapm_widget *dapm_widgets; |
744 | int num_dapm_widgets; | 761 | int num_dapm_widgets; |
745 | struct snd_soc_dapm_route *dapm_routes; | 762 | const struct snd_soc_dapm_route *dapm_routes; |
746 | int num_dapm_routes; | 763 | int num_dapm_routes; |
747 | 764 | ||
748 | struct work_struct deferred_resume_work; | 765 | struct work_struct deferred_resume_work; |
@@ -805,7 +822,7 @@ struct soc_enum { | |||
805 | unsigned char shift_r; | 822 | unsigned char shift_r; |
806 | unsigned int max; | 823 | unsigned int max; |
807 | unsigned int mask; | 824 | unsigned int mask; |
808 | const char **texts; | 825 | const char * const *texts; |
809 | const unsigned int *values; | 826 | const unsigned int *values; |
810 | void *dapm; | 827 | void *dapm; |
811 | }; | 828 | }; |
@@ -814,6 +831,8 @@ struct soc_enum { | |||
814 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); | 831 | unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); |
815 | unsigned int snd_soc_write(struct snd_soc_codec *codec, | 832 | unsigned int snd_soc_write(struct snd_soc_codec *codec, |
816 | unsigned int reg, unsigned int val); | 833 | unsigned int reg, unsigned int val); |
834 | unsigned int snd_soc_bulk_write_raw(struct snd_soc_codec *codec, | ||
835 | unsigned int reg, const void *data, size_t len); | ||
817 | 836 | ||
818 | /* device driver data */ | 837 | /* device driver data */ |
819 | 838 | ||
@@ -871,6 +890,9 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) | |||
871 | INIT_LIST_HEAD(&card->dapm_list); | 890 | INIT_LIST_HEAD(&card->dapm_list); |
872 | } | 891 | } |
873 | 892 | ||
893 | int snd_soc_util_init(void); | ||
894 | void snd_soc_util_exit(void); | ||
895 | |||
874 | #include <sound/soc-dai.h> | 896 | #include <sound/soc-dai.h> |
875 | 897 | ||
876 | #ifdef CONFIG_DEBUG_FS | 898 | #ifdef CONFIG_DEBUG_FS |
diff --git a/include/sound/tlv320dac33-plat.h b/include/sound/tlv320dac33-plat.h index 6c6649656798..0b94192a8cdf 100644 --- a/include/sound/tlv320dac33-plat.h +++ b/include/sound/tlv320dac33-plat.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Platform header for Texas Instruments TLV320DAC33 codec driver | 2 | * Platform header for Texas Instruments TLV320DAC33 codec driver |
3 | * | 3 | * |
4 | * Author: Peter Ujfalusi <peter.ujfalusi@nokia.com> | 4 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> |
5 | * | 5 | * |
6 | * Copyright: (C) 2009 Nokia Corporation | 6 | * Copyright: (C) 2009 Nokia Corporation |
7 | * | 7 | * |
diff --git a/include/sound/tpa6130a2-plat.h b/include/sound/tpa6130a2-plat.h index e29fde6b5cbe..89beccb57edd 100644 --- a/include/sound/tpa6130a2-plat.h +++ b/include/sound/tpa6130a2-plat.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) Nokia Corporation | 4 | * Copyright (C) Nokia Corporation |
5 | * | 5 | * |
6 | * Written by Peter Ujfalusi <peter.ujfalusi@nokia.com> | 6 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
diff --git a/include/sound/wm8915.h b/include/sound/wm8915.h new file mode 100644 index 000000000000..5817d762f6f3 --- /dev/null +++ b/include/sound/wm8915.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * linux/sound/wm8915.h -- Platform data for WM8915 | ||
3 | * | ||
4 | * Copyright 2011 Wolfson Microelectronics. PLC. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __LINUX_SND_WM8903_H | ||
12 | #define __LINUX_SND_WM8903_H | ||
13 | |||
14 | enum wm8915_inmode { | ||
15 | WM8915_DIFFERRENTIAL_1 = 0, /* IN1xP - IN1xN */ | ||
16 | WM8915_INVERTING = 1, /* IN1xN */ | ||
17 | WM8915_NON_INVERTING = 2, /* IN1xP */ | ||
18 | WM8915_DIFFERENTIAL_2 = 3, /* IN2xP - IN2xP */ | ||
19 | }; | ||
20 | |||
21 | /** | ||
22 | * ReTune Mobile configurations are specified with a label, sample | ||
23 | * rate and set of values to write (the enable bits will be ignored). | ||
24 | * | ||
25 | * Configurations are expected to be generated using the ReTune Mobile | ||
26 | * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/ | ||
27 | */ | ||
28 | struct wm8915_retune_mobile_config { | ||
29 | const char *name; | ||
30 | int rate; | ||
31 | u16 regs[20]; | ||
32 | }; | ||
33 | |||
34 | #define WM8915_SET_DEFAULT 0x10000 | ||
35 | |||
36 | struct wm8915_pdata { | ||
37 | int irq_flags; /** Set IRQ trigger flags; default active low */ | ||
38 | |||
39 | int ldo_ena; /** GPIO for LDO1; -1 for none */ | ||
40 | |||
41 | int micdet_def; /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */ | ||
42 | |||
43 | enum wm8915_inmode inl_mode; | ||
44 | enum wm8915_inmode inr_mode; | ||
45 | |||
46 | u32 spkmute_seq; /** Value for register 0x802 */ | ||
47 | |||
48 | int gpio_base; | ||
49 | u32 gpio_default[5]; | ||
50 | |||
51 | int num_retune_mobile_cfgs; | ||
52 | struct wm8915_retune_mobile_config *retune_mobile_cfgs; | ||
53 | }; | ||
54 | |||
55 | #endif | ||
diff --git a/include/sound/wm8962.h b/include/sound/wm8962.h index 2b5306c503fb..1750bed7c2f6 100644 --- a/include/sound/wm8962.h +++ b/include/sound/wm8962.h | |||
@@ -14,6 +14,28 @@ | |||
14 | /* Use to set GPIO default values to zero */ | 14 | /* Use to set GPIO default values to zero */ |
15 | #define WM8962_GPIO_SET 0x10000 | 15 | #define WM8962_GPIO_SET 0x10000 |
16 | 16 | ||
17 | #define WM8962_GPIO_FN_CLKOUT 0 | ||
18 | #define WM8962_GPIO_FN_LOGIC 1 | ||
19 | #define WM8962_GPIO_FN_SDOUT 2 | ||
20 | #define WM8962_GPIO_FN_IRQ 3 | ||
21 | #define WM8962_GPIO_FN_THERMAL 4 | ||
22 | #define WM8962_GPIO_FN_PLL2_LOCK 6 | ||
23 | #define WM8962_GPIO_FN_PLL3_LOCK 7 | ||
24 | #define WM8962_GPIO_FN_FLL_LOCK 9 | ||
25 | #define WM8962_GPIO_FN_DRC_ACT 10 | ||
26 | #define WM8962_GPIO_FN_WSEQ_DONE 11 | ||
27 | #define WM8962_GPIO_FN_ALC_NG_ACT 12 | ||
28 | #define WM8962_GPIO_FN_ALC_PEAK_LIMIT 13 | ||
29 | #define WM8962_GPIO_FN_ALC_SATURATION 14 | ||
30 | #define WM8962_GPIO_FN_ALC_LEVEL_THR 15 | ||
31 | #define WM8962_GPIO_FN_ALC_LEVEL_LOCK 16 | ||
32 | #define WM8962_GPIO_FN_FIFO_ERR 17 | ||
33 | #define WM8962_GPIO_FN_OPCLK 18 | ||
34 | #define WM8962_GPIO_FN_DMICCLK 19 | ||
35 | #define WM8962_GPIO_FN_DMICDAT 20 | ||
36 | #define WM8962_GPIO_FN_MICD 21 | ||
37 | #define WM8962_GPIO_FN_MICSCD 22 | ||
38 | |||
17 | struct wm8962_pdata { | 39 | struct wm8962_pdata { |
18 | int gpio_base; | 40 | int gpio_base; |
19 | u32 gpio_init[WM8962_MAX_GPIO]; | 41 | u32 gpio_init[WM8962_MAX_GPIO]; |