aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5102.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-15 12:27:22 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-03 22:01:01 -0500
commitddbce97cd1798ba4661e33662c659b168e9f51ed (patch)
tree71d0238f92143a022c973f52ba8ba9f1ca536a83 /sound/soc/codecs/wm5102.c
parentf3f1163d19ebd5aa374e5df5372a8f932f2bd5f9 (diff)
ASoC: arizona: Only allow input volume updates when inputs are enabled
Since we are automatically managing the mutes we may as well also manage the volume update bits, disabling volume updates while none of the inputs are active. Since we are doing this we may as well allow the volumes to ramp together so only enable volume updates once at the end of power up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm5102.c')
-rw-r--r--sound/soc/codecs/wm5102.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 5515d85fd82f..44d4c69d25e5 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -973,22 +973,28 @@ SND_SOC_DAPM_INPUT("IN3R"),
973 973
974SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT, 974SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT,
975 0, NULL, 0, arizona_in_ev, 975 0, NULL, 0, arizona_in_ev,
976 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 976 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
977 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
977SND_SOC_DAPM_PGA_E("IN1R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1R_ENA_SHIFT, 978SND_SOC_DAPM_PGA_E("IN1R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1R_ENA_SHIFT,
978 0, NULL, 0, arizona_in_ev, 979 0, NULL, 0, arizona_in_ev,
979 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 980 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
981 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
980SND_SOC_DAPM_PGA_E("IN2L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2L_ENA_SHIFT, 982SND_SOC_DAPM_PGA_E("IN2L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2L_ENA_SHIFT,
981 0, NULL, 0, arizona_in_ev, 983 0, NULL, 0, arizona_in_ev,
982 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 984 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
985 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
983SND_SOC_DAPM_PGA_E("IN2R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2R_ENA_SHIFT, 986SND_SOC_DAPM_PGA_E("IN2R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2R_ENA_SHIFT,
984 0, NULL, 0, arizona_in_ev, 987 0, NULL, 0, arizona_in_ev,
985 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 988 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
989 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
986SND_SOC_DAPM_PGA_E("IN3L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3L_ENA_SHIFT, 990SND_SOC_DAPM_PGA_E("IN3L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3L_ENA_SHIFT,
987 0, NULL, 0, arizona_in_ev, 991 0, NULL, 0, arizona_in_ev,
988 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 992 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
993 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
989SND_SOC_DAPM_PGA_E("IN3R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3R_ENA_SHIFT, 994SND_SOC_DAPM_PGA_E("IN3R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3R_ENA_SHIFT,
990 0, NULL, 0, arizona_in_ev, 995 0, NULL, 0, arizona_in_ev,
991 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 996 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
997 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
992 998
993SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, 999SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1,
994 ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), 1000 ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0),
@@ -1599,13 +1605,6 @@ static int wm5102_codec_remove(struct snd_soc_codec *codec)
1599#define WM5102_DIG_VU 0x0200 1605#define WM5102_DIG_VU 0x0200
1600 1606
1601static unsigned int wm5102_digital_vu[] = { 1607static unsigned int wm5102_digital_vu[] = {
1602 ARIZONA_ADC_DIGITAL_VOLUME_1L,
1603 ARIZONA_ADC_DIGITAL_VOLUME_1R,
1604 ARIZONA_ADC_DIGITAL_VOLUME_2L,
1605 ARIZONA_ADC_DIGITAL_VOLUME_2R,
1606 ARIZONA_ADC_DIGITAL_VOLUME_3L,
1607 ARIZONA_ADC_DIGITAL_VOLUME_3R,
1608
1609 ARIZONA_DAC_DIGITAL_VOLUME_1L, 1608 ARIZONA_DAC_DIGITAL_VOLUME_1L,
1610 ARIZONA_DAC_DIGITAL_VOLUME_1R, 1609 ARIZONA_DAC_DIGITAL_VOLUME_1R,
1611 ARIZONA_DAC_DIGITAL_VOLUME_2L, 1610 ARIZONA_DAC_DIGITAL_VOLUME_2L,
@@ -1648,6 +1647,7 @@ static int wm5102_probe(struct platform_device *pdev)
1648 platform_set_drvdata(pdev, wm5102); 1647 platform_set_drvdata(pdev, wm5102);
1649 1648
1650 wm5102->core.arizona = arizona; 1649 wm5102->core.arizona = arizona;
1650 wm5102->core.num_inputs = 6;
1651 1651
1652 wm5102->core.adsp[0].part = "wm5102"; 1652 wm5102->core.adsp[0].part = "wm5102";
1653 wm5102->core.adsp[0].num = 1; 1653 wm5102->core.adsp[0].num = 1;