diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-30 07:42:24 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-30 07:42:24 -0400 |
commit | e4ca49d5d832c3eff23a44aacf21387629b1207b (patch) | |
tree | 997849dbb46b424ff52604b0345bf1267054310f /sound | |
parent | fbc6c4ee659da5bdd49ab85c5d7e50c51db1b4fa (diff) | |
parent | f0ddb219c9f92d0c43582a000e1ddc0a4ee43222 (diff) |
Merge remote-tracking branch 'asoc/topic/ext' into asoc-next
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/88pm860x-codec.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8400.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8903.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm8991.h | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/wm8995.h | 7 | ||||
-rw-r--r-- | sound/soc/codecs/wm_adsp.h | 10 | ||||
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 6 |
11 files changed, 27 insertions, 64 deletions
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 60159c07448d..e2bd3dd02c0e 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c | |||
@@ -120,10 +120,8 @@ | |||
120 | * before DAC & PGA in DAPM power-off sequence. | 120 | * before DAC & PGA in DAPM power-off sequence. |
121 | */ | 121 | */ |
122 | #define PM860X_DAPM_OUTPUT(wname, wevent) \ | 122 | #define PM860X_DAPM_OUTPUT(wname, wevent) \ |
123 | { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \ | 123 | SND_SOC_DAPM_PGA_E(wname, SND_SOC_NOPM, 0, 0, NULL, 0, wevent, \ |
124 | .shift = 0, .invert = 0, .kcontrol_news = NULL, \ | 124 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD) |
125 | .num_kcontrols = 0, .event = wevent, \ | ||
126 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD, } | ||
127 | 125 | ||
128 | struct pm860x_det { | 126 | struct pm860x_det { |
129 | struct snd_soc_jack *hp_jack; | 127 | struct snd_soc_jack *hp_jack; |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 1514bf845e4b..e5b926883131 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -128,10 +128,8 @@ static const u8 aic3x_reg[AIC3X_CACHEREGNUM] = { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | #define SOC_DAPM_SINGLE_AIC3X(xname, reg, shift, mask, invert) \ | 130 | #define SOC_DAPM_SINGLE_AIC3X(xname, reg, shift, mask, invert) \ |
131 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 131 | SOC_SINGLE_EXT(xname, reg, shift, mask, invert, \ |
132 | .info = snd_soc_info_volsw, \ | 132 | snd_soc_dapm_get_volsw, snd_soc_dapm_put_volsw_aic3x) |
133 | .get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw_aic3x, \ | ||
134 | .private_value = SOC_SINGLE_VALUE(reg, shift, mask, invert) } | ||
135 | 133 | ||
136 | /* | 134 | /* |
137 | * All input lines are connected when !0xf and disconnected with 0xf bit field, | 135 | * All input lines are connected when !0xf and disconnected with 0xf bit field, |
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index af6d227e67be..d2a092850283 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
@@ -143,13 +143,8 @@ static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, | |||
143 | } | 143 | } |
144 | 144 | ||
145 | #define WM8400_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert, tlv_array) \ | 145 | #define WM8400_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert, tlv_array) \ |
146 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 146 | SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, \ |
147 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 147 | snd_soc_get_volsw, wm8400_outpga_put_volsw_vu, tlv_array) |
148 | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ | ||
149 | .tlv.p = (tlv_array), \ | ||
150 | .info = snd_soc_info_volsw, \ | ||
151 | .get = snd_soc_get_volsw, .put = wm8400_outpga_put_volsw_vu, \ | ||
152 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | ||
153 | 148 | ||
154 | 149 | ||
155 | static const char *wm8400_digital_sidetone[] = | 150 | static const char *wm8400_digital_sidetone[] = |
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 9d88437cdcd1..fa24cedee687 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -403,10 +403,8 @@ static int wm8903_class_w_put(struct snd_kcontrol *kcontrol, | |||
403 | } | 403 | } |
404 | 404 | ||
405 | #define SOC_DAPM_SINGLE_W(xname, reg, shift, max, invert) \ | 405 | #define SOC_DAPM_SINGLE_W(xname, reg, shift, max, invert) \ |
406 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 406 | SOC_SINGLE_EXT(xname, reg, shift, max, invert, \ |
407 | .info = snd_soc_info_volsw, \ | 407 | snd_soc_dapm_get_volsw, wm8903_class_w_put) |
408 | .get = snd_soc_dapm_get_volsw, .put = wm8903_class_w_put, \ | ||
409 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | ||
410 | 408 | ||
411 | 409 | ||
412 | static int wm8903_deemph[] = { 0, 32000, 44100, 48000 }; | 410 | static int wm8903_deemph[] = { 0, 32000, 44100, 48000 }; |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 3ff195c541db..4c9fb142cb2d 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -603,13 +603,8 @@ SOC_DOUBLE_R("Capture Switch", WM8904_ANALOGUE_LEFT_INPUT_0, | |||
603 | 603 | ||
604 | SOC_SINGLE("High Pass Filter Switch", WM8904_ADC_DIGITAL_0, 4, 1, 0), | 604 | SOC_SINGLE("High Pass Filter Switch", WM8904_ADC_DIGITAL_0, 4, 1, 0), |
605 | SOC_ENUM("High Pass Filter Mode", hpf_mode), | 605 | SOC_ENUM("High Pass Filter Mode", hpf_mode), |
606 | 606 | SOC_SINGLE_EXT("ADC 128x OSR Switch", WM8904_ANALOGUE_ADC_0, 0, 1, 0, | |
607 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 607 | snd_soc_get_volsw, wm8904_adc_osr_put), |
608 | .name = "ADC 128x OSR Switch", | ||
609 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, | ||
610 | .put = wm8904_adc_osr_put, | ||
611 | .private_value = SOC_SINGLE_VALUE(WM8904_ANALOGUE_ADC_0, 0, 1, 0), | ||
612 | }, | ||
613 | }; | 608 | }; |
614 | 609 | ||
615 | static const char *drc_path_text[] = { | 610 | static const char *drc_path_text[] = { |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 837978e16e9d..253c88bb7a4c 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -151,14 +151,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | #define SOC_WM899X_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert,\ | 153 | #define SOC_WM899X_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert,\ |
154 | tlv_array) {\ | 154 | tlv_array) \ |
155 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 155 | SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, \ |
156 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 156 | snd_soc_get_volsw, wm899x_outpga_put_volsw_vu, tlv_array) |
157 | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ | ||
158 | .tlv.p = (tlv_array), \ | ||
159 | .info = snd_soc_info_volsw, \ | ||
160 | .get = snd_soc_get_volsw, .put = wm899x_outpga_put_volsw_vu, \ | ||
161 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | ||
162 | 157 | ||
163 | 158 | ||
164 | static const char *wm8990_digital_sidetone[] = | 159 | static const char *wm8990_digital_sidetone[] = |
diff --git a/sound/soc/codecs/wm8991.h b/sound/soc/codecs/wm8991.h index 8a942efd18a5..07707d8d7e20 100644 --- a/sound/soc/codecs/wm8991.h +++ b/sound/soc/codecs/wm8991.h | |||
@@ -822,12 +822,7 @@ | |||
822 | 822 | ||
823 | #define SOC_WM899X_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert,\ | 823 | #define SOC_WM899X_OUTPGA_SINGLE_R_TLV(xname, reg, shift, max, invert,\ |
824 | tlv_array) \ | 824 | tlv_array) \ |
825 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 825 | SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, \ |
826 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 826 | snd_soc_get_volsw, wm899x_outpga_put_volsw_vu, tlv_array) |
827 | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ | ||
828 | .tlv.p = (tlv_array), \ | ||
829 | .info = snd_soc_info_volsw, \ | ||
830 | .get = snd_soc_get_volsw, .put = wm899x_outpga_put_volsw_vu, \ | ||
831 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | ||
832 | 827 | ||
833 | #endif /* _WM8991_H */ | 828 | #endif /* _WM8991_H */ |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 29e95f93d482..9e13edd81292 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -289,10 +289,8 @@ static const DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0); | |||
289 | static const DECLARE_TLV_DB_SCALE(mixin_boost_tlv, 0, 900, 0); | 289 | static const DECLARE_TLV_DB_SCALE(mixin_boost_tlv, 0, 900, 0); |
290 | 290 | ||
291 | #define WM8994_DRC_SWITCH(xname, reg, shift) \ | 291 | #define WM8994_DRC_SWITCH(xname, reg, shift) \ |
292 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 292 | SOC_SINGLE_EXT(xname, reg, shift, 1, 0, \ |
293 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ | 293 | snd_soc_get_volsw, wm8994_put_drc_sw) |
294 | .put = wm8994_put_drc_sw, \ | ||
295 | .private_value = SOC_SINGLE_VALUE(reg, shift, 1, 0) } | ||
296 | 294 | ||
297 | static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol, | 295 | static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol, |
298 | struct snd_ctl_elem_value *ucontrol) | 296 | struct snd_ctl_elem_value *ucontrol) |
@@ -1432,10 +1430,8 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING, | |||
1432 | }; | 1430 | }; |
1433 | 1431 | ||
1434 | #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \ | 1432 | #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \ |
1435 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 1433 | SOC_SINGLE_EXT(xname, reg, shift, max, invert, \ |
1436 | .info = snd_soc_info_volsw, \ | 1434 | snd_soc_get_volsw, wm8994_put_class_w) |
1437 | .get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \ | ||
1438 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | ||
1439 | 1435 | ||
1440 | static int wm8994_put_class_w(struct snd_kcontrol *kcontrol, | 1436 | static int wm8994_put_class_w(struct snd_kcontrol *kcontrol, |
1441 | struct snd_ctl_elem_value *ucontrol) | 1437 | struct snd_ctl_elem_value *ucontrol) |
diff --git a/sound/soc/codecs/wm8995.h b/sound/soc/codecs/wm8995.h index 5642121c4977..508ad27fe2bb 100644 --- a/sound/soc/codecs/wm8995.h +++ b/sound/soc/codecs/wm8995.h | |||
@@ -4237,11 +4237,8 @@ | |||
4237 | #define WM8995_SPK2_MUTE_SEQ1_WIDTH 8 /* SPK2_MUTE_SEQ1 - [7:0] */ | 4237 | #define WM8995_SPK2_MUTE_SEQ1_WIDTH 8 /* SPK2_MUTE_SEQ1 - [7:0] */ |
4238 | 4238 | ||
4239 | #define WM8995_CLASS_W_SWITCH(xname, reg, shift, max, invert) \ | 4239 | #define WM8995_CLASS_W_SWITCH(xname, reg, shift, max, invert) \ |
4240 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 4240 | SOC_SINGLE_EXT(xname, reg, shift, max, invert, \ |
4241 | .info = snd_soc_info_volsw, \ | 4241 | snd_soc_dapm_get_volsw, wm8995_put_class_w) |
4242 | .get = snd_soc_dapm_get_volsw, .put = wm8995_put_class_w, \ | ||
4243 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) \ | ||
4244 | } | ||
4245 | 4242 | ||
4246 | struct wm8995_reg_access { | 4243 | struct wm8995_reg_access { |
4247 | u16 read; | 4244 | u16 read; |
diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h index 6e890b916592..9f922c82536c 100644 --- a/sound/soc/codecs/wm_adsp.h +++ b/sound/soc/codecs/wm_adsp.h | |||
@@ -61,14 +61,12 @@ struct wm_adsp { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | #define WM_ADSP1(wname, num) \ | 63 | #define WM_ADSP1(wname, num) \ |
64 | { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \ | 64 | SND_SOC_DAPM_PGA_E(wname, SND_SOC_NOPM, num, 0, NULL, 0, \ |
65 | .shift = num, .event = wm_adsp1_event, \ | 65 | wm_adsp1_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD) |
66 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD } | ||
67 | 66 | ||
68 | #define WM_ADSP2(wname, num) \ | 67 | #define WM_ADSP2(wname, num) \ |
69 | { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \ | 68 | SND_SOC_DAPM_PGA_E(wname, SND_SOC_NOPM, num, 0, NULL, 0, \ |
70 | .shift = num, .event = wm_adsp2_event, \ | 69 | wm_adsp2_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD) |
71 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD } | ||
72 | 70 | ||
73 | extern const struct snd_kcontrol_new wm_adsp1_fw_controls[]; | 71 | extern const struct snd_kcontrol_new wm_adsp1_fw_controls[]; |
74 | extern const struct snd_kcontrol_new wm_adsp2_fw_controls[]; | 72 | extern const struct snd_kcontrol_new wm_adsp2_fw_controls[]; |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index f5d81b948759..2d9e099415a5 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -693,10 +693,8 @@ void wm_hubs_update_class_w(struct snd_soc_codec *codec) | |||
693 | EXPORT_SYMBOL_GPL(wm_hubs_update_class_w); | 693 | EXPORT_SYMBOL_GPL(wm_hubs_update_class_w); |
694 | 694 | ||
695 | #define WM_HUBS_SINGLE_W(xname, reg, shift, max, invert) \ | 695 | #define WM_HUBS_SINGLE_W(xname, reg, shift, max, invert) \ |
696 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 696 | SOC_SINGLE_EXT(xname, reg, shift, max, invert, \ |
697 | .info = snd_soc_info_volsw, \ | 697 | snd_soc_dapm_get_volsw, class_w_put_volsw) |
698 | .get = snd_soc_dapm_get_volsw, .put = class_w_put_volsw, \ | ||
699 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | ||
700 | 698 | ||
701 | static int class_w_put_volsw(struct snd_kcontrol *kcontrol, | 699 | static int class_w_put_volsw(struct snd_kcontrol *kcontrol, |
702 | struct snd_ctl_elem_value *ucontrol) | 700 | struct snd_ctl_elem_value *ucontrol) |