diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-12 18:53:34 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-12 18:53:34 -0400 |
commit | 163ec0369be4c26e68385f6cec88d0ee38c8d8e5 (patch) | |
tree | f3e441866f8bc1b0548e7d8eddd9548b6aedef5e /sound/soc | |
parent | 199642bfe107c411f25fbfc16c9fd49cfef9785d (diff) | |
parent | 99dbdd98f271899e023d52b3f4c2bf67cdd7eb56 (diff) |
Merge branch 'next/cleanup-plat-s3c24xx' into next/cleanup-plat-s3c24xx-s5p
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ssm2602.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/Kconfig | 3 | ||||
-rw-r--r-- | sound/soc/codecs/ak4642.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l73.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 25 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/twl6040.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8350.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 276 | ||||
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 15 | ||||
-rw-r--r-- | sound/soc/fsl/mpc8610_hpcd.c | 8 | ||||
-rw-r--r-- | sound/soc/fsl/p1022_ds.c | 10 | ||||
-rw-r--r-- | sound/soc/imx/imx-audmux.c | 13 | ||||
-rw-r--r-- | sound/soc/omap/Kconfig | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 4 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 1 | ||||
-rw-r--r-- | sound/soc/samsung/s3c2412-i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 7 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 17 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 18 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_i2s.c | 6 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_spdif.c | 4 |
22 files changed, 303 insertions, 132 deletions
diff --git a/sound/soc/blackfin/bf5xx-ssm2602.c b/sound/soc/blackfin/bf5xx-ssm2602.c index df3ac73f8778..b39ad356b92b 100644 --- a/sound/soc/blackfin/bf5xx-ssm2602.c +++ b/sound/soc/blackfin/bf5xx-ssm2602.c | |||
@@ -99,6 +99,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = { | |||
99 | .platform_name = "bfin-i2s-pcm-audio", | 99 | .platform_name = "bfin-i2s-pcm-audio", |
100 | .codec_name = "ssm2602.0-001b", | 100 | .codec_name = "ssm2602.0-001b", |
101 | .ops = &bf5xx_ssm2602_ops, | 101 | .ops = &bf5xx_ssm2602_ops, |
102 | .dai_fmt = BF5XX_SSM2602_DAIFMT, | ||
102 | }, | 103 | }, |
103 | { | 104 | { |
104 | .name = "ssm2602", | 105 | .name = "ssm2602", |
@@ -108,6 +109,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = { | |||
108 | .platform_name = "bfin-i2s-pcm-audio", | 109 | .platform_name = "bfin-i2s-pcm-audio", |
109 | .codec_name = "ssm2602.0-001b", | 110 | .codec_name = "ssm2602.0-001b", |
110 | .ops = &bf5xx_ssm2602_ops, | 111 | .ops = &bf5xx_ssm2602_ops, |
112 | .dai_fmt = BF5XX_SSM2602_DAIFMT, | ||
111 | }, | 113 | }, |
112 | }; | 114 | }; |
113 | 115 | ||
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 6508e8b790bb..59d8efaa17e9 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -57,7 +57,7 @@ config SND_SOC_ALL_CODECS | |||
57 | select SND_SOC_TPA6130A2 if I2C | 57 | select SND_SOC_TPA6130A2 if I2C |
58 | select SND_SOC_TLV320DAC33 if I2C | 58 | select SND_SOC_TLV320DAC33 if I2C |
59 | select SND_SOC_TWL4030 if TWL4030_CORE | 59 | select SND_SOC_TWL4030 if TWL4030_CORE |
60 | select SND_SOC_TWL6040 if TWL4030_CORE | 60 | select SND_SOC_TWL6040 if TWL6040_CORE |
61 | select SND_SOC_UDA134X | 61 | select SND_SOC_UDA134X |
62 | select SND_SOC_UDA1380 if I2C | 62 | select SND_SOC_UDA1380 if I2C |
63 | select SND_SOC_WL1273 if MFD_WL1273_CORE | 63 | select SND_SOC_WL1273 if MFD_WL1273_CORE |
@@ -276,7 +276,6 @@ config SND_SOC_TWL4030 | |||
276 | tristate | 276 | tristate |
277 | 277 | ||
278 | config SND_SOC_TWL6040 | 278 | config SND_SOC_TWL6040 |
279 | select TWL6040_CORE | ||
280 | tristate | 279 | tristate |
281 | 280 | ||
282 | config SND_SOC_UDA134X | 281 | config SND_SOC_UDA134X |
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index f8e10ced244a..b3e24f289421 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -140,7 +140,7 @@ | |||
140 | * min : 0xFE : -115.0 dB | 140 | * min : 0xFE : -115.0 dB |
141 | * mute: 0xFF | 141 | * mute: 0xFF |
142 | */ | 142 | */ |
143 | static const DECLARE_TLV_DB_SCALE(out_tlv, -11500, 50, 1); | 143 | static const DECLARE_TLV_DB_SCALE(out_tlv, -11550, 50, 1); |
144 | 144 | ||
145 | static const struct snd_kcontrol_new ak4642_snd_controls[] = { | 145 | static const struct snd_kcontrol_new ak4642_snd_controls[] = { |
146 | 146 | ||
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 78979b3e0e95..07c44b71f096 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c | |||
@@ -929,6 +929,8 @@ static int cs42l73_set_mclk(struct snd_soc_dai *dai, unsigned int freq) | |||
929 | 929 | ||
930 | /* MCLKX -> MCLK */ | 930 | /* MCLKX -> MCLK */ |
931 | mclkx_coeff = cs42l73_get_mclkx_coeff(freq); | 931 | mclkx_coeff = cs42l73_get_mclkx_coeff(freq); |
932 | if (mclkx_coeff < 0) | ||
933 | return mclkx_coeff; | ||
932 | 934 | ||
933 | mclk = cs42l73_mclkx_coeffs[mclkx_coeff].mclkx / | 935 | mclk = cs42l73_mclkx_coeffs[mclkx_coeff].mclkx / |
934 | cs42l73_mclkx_coeffs[mclkx_coeff].ratio; | 936 | cs42l73_mclkx_coeffs[mclkx_coeff].ratio; |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index d1926266fe00..8e92fb88ed09 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -143,11 +143,11 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w, | |||
143 | } | 143 | } |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * using codec assist to small pop, hp_powerup or lineout_powerup | 146 | * As manual described, ADC/DAC only works when VAG powerup, |
147 | * should stay setting until vag_powerup is fully ramped down, | 147 | * So enabled VAG before ADC/DAC up. |
148 | * vag fully ramped down require 400ms. | 148 | * In power down case, we need wait 400ms when vag fully ramped down. |
149 | */ | 149 | */ |
150 | static int small_pop_event(struct snd_soc_dapm_widget *w, | 150 | static int power_vag_event(struct snd_soc_dapm_widget *w, |
151 | struct snd_kcontrol *kcontrol, int event) | 151 | struct snd_kcontrol *kcontrol, int event) |
152 | { | 152 | { |
153 | switch (event) { | 153 | switch (event) { |
@@ -156,7 +156,7 @@ static int small_pop_event(struct snd_soc_dapm_widget *w, | |||
156 | SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP); | 156 | SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP); |
157 | break; | 157 | break; |
158 | 158 | ||
159 | case SND_SOC_DAPM_PRE_PMD: | 159 | case SND_SOC_DAPM_POST_PMD: |
160 | snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, | 160 | snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER, |
161 | SGTL5000_VAG_POWERUP, 0); | 161 | SGTL5000_VAG_POWERUP, 0); |
162 | msleep(400); | 162 | msleep(400); |
@@ -201,12 +201,8 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = { | |||
201 | mic_bias_event, | 201 | mic_bias_event, |
202 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 202 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
203 | 203 | ||
204 | SND_SOC_DAPM_PGA_E("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0, | 204 | SND_SOC_DAPM_PGA("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0), |
205 | small_pop_event, | 205 | SND_SOC_DAPM_PGA("LO", SGTL5000_CHIP_ANA_POWER, 0, 0, NULL, 0), |
206 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | ||
207 | SND_SOC_DAPM_PGA_E("LO", SGTL5000_CHIP_ANA_POWER, 0, 0, NULL, 0, | ||
208 | small_pop_event, | ||
209 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | ||
210 | 206 | ||
211 | SND_SOC_DAPM_MUX("Capture Mux", SND_SOC_NOPM, 0, 0, &adc_mux), | 207 | SND_SOC_DAPM_MUX("Capture Mux", SND_SOC_NOPM, 0, 0, &adc_mux), |
212 | SND_SOC_DAPM_MUX("Headphone Mux", SND_SOC_NOPM, 0, 0, &dac_mux), | 208 | SND_SOC_DAPM_MUX("Headphone Mux", SND_SOC_NOPM, 0, 0, &dac_mux), |
@@ -221,8 +217,11 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = { | |||
221 | 0, SGTL5000_CHIP_DIG_POWER, | 217 | 0, SGTL5000_CHIP_DIG_POWER, |
222 | 1, 0), | 218 | 1, 0), |
223 | 219 | ||
224 | SND_SOC_DAPM_ADC("ADC", "Capture", SGTL5000_CHIP_ANA_POWER, 1, 0), | 220 | SND_SOC_DAPM_SUPPLY("VAG_POWER", SGTL5000_CHIP_ANA_POWER, 7, 0, |
221 | power_vag_event, | ||
222 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | ||
225 | 223 | ||
224 | SND_SOC_DAPM_ADC("ADC", "Capture", SGTL5000_CHIP_ANA_POWER, 1, 0), | ||
226 | SND_SOC_DAPM_DAC("DAC", "Playback", SGTL5000_CHIP_ANA_POWER, 3, 0), | 225 | SND_SOC_DAPM_DAC("DAC", "Playback", SGTL5000_CHIP_ANA_POWER, 3, 0), |
227 | }; | 226 | }; |
228 | 227 | ||
@@ -231,9 +230,11 @@ static const struct snd_soc_dapm_route sgtl5000_dapm_routes[] = { | |||
231 | {"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */ | 230 | {"Capture Mux", "LINE_IN", "LINE_IN"}, /* line_in --> adc_mux */ |
232 | {"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */ | 231 | {"Capture Mux", "MIC_IN", "MIC_IN"}, /* mic_in --> adc_mux */ |
233 | 232 | ||
233 | {"ADC", NULL, "VAG_POWER"}, | ||
234 | {"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */ | 234 | {"ADC", NULL, "Capture Mux"}, /* adc_mux --> adc */ |
235 | {"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */ | 235 | {"AIFOUT", NULL, "ADC"}, /* adc --> i2s_out */ |
236 | 236 | ||
237 | {"DAC", NULL, "VAG_POWER"}, | ||
237 | {"DAC", NULL, "AIFIN"}, /* i2s-->dac,skip audio mux */ | 238 | {"DAC", NULL, "AIFIN"}, /* i2s-->dac,skip audio mux */ |
238 | {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */ | 239 | {"Headphone Mux", "DAC", "DAC"}, /* dac --> hp_mux */ |
239 | {"LO", NULL, "DAC"}, /* dac --> line_out */ | 240 | {"LO", NULL, "DAC"}, /* dac --> line_out */ |
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 16d55f91a653..df1e07ffac32 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
472 | static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, | 472 | static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, |
473 | enum snd_soc_bias_level level) | 473 | enum snd_soc_bias_level level) |
474 | { | 474 | { |
475 | u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f; | 475 | u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f; |
476 | 476 | ||
477 | switch (level) { | 477 | switch (level) { |
478 | case SND_SOC_BIAS_ON: | 478 | case SND_SOC_BIAS_ON: |
@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, | |||
491 | case SND_SOC_BIAS_OFF: | 491 | case SND_SOC_BIAS_OFF: |
492 | /* everything off, dac mute, inactive */ | 492 | /* everything off, dac mute, inactive */ |
493 | snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); | 493 | snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); |
494 | snd_soc_write(codec, TLV320AIC23_PWR, 0xffff); | 494 | snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff); |
495 | break; | 495 | break; |
496 | } | 496 | } |
497 | codec->dapm.bias_level = level; | 497 | codec->dapm.bias_level = level; |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 2d8c6b825e57..dc7509b9d53a 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | #include <linux/i2c/twl.h> | ||
30 | #include <linux/mfd/twl6040.h> | 29 | #include <linux/mfd/twl6040.h> |
31 | 30 | ||
32 | #include <sound/core.h> | 31 | #include <sound/core.h> |
@@ -1528,7 +1527,7 @@ static int twl6040_resume(struct snd_soc_codec *codec) | |||
1528 | static int twl6040_probe(struct snd_soc_codec *codec) | 1527 | static int twl6040_probe(struct snd_soc_codec *codec) |
1529 | { | 1528 | { |
1530 | struct twl6040_data *priv; | 1529 | struct twl6040_data *priv; |
1531 | struct twl4030_codec_data *pdata = dev_get_platdata(codec->dev); | 1530 | struct twl6040_codec_data *pdata = dev_get_platdata(codec->dev); |
1532 | struct platform_device *pdev = container_of(codec->dev, | 1531 | struct platform_device *pdev = container_of(codec->dev, |
1533 | struct platform_device, dev); | 1532 | struct platform_device, dev); |
1534 | int ret = 0; | 1533 | int ret = 0; |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 8c4c9591ec05..aa12c6b6beeb 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -60,7 +60,7 @@ struct wm8350_jack_data { | |||
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct wm8350_data { | 62 | struct wm8350_data { |
63 | struct snd_soc_codec codec; | 63 | struct wm8350 *wm8350; |
64 | struct wm8350_output out1; | 64 | struct wm8350_output out1; |
65 | struct wm8350_output out2; | 65 | struct wm8350_output out2; |
66 | struct wm8350_jack_data hpl; | 66 | struct wm8350_jack_data hpl; |
@@ -1309,7 +1309,7 @@ static void wm8350_hp_work(struct wm8350_data *priv, | |||
1309 | struct wm8350_jack_data *jack, | 1309 | struct wm8350_jack_data *jack, |
1310 | u16 mask) | 1310 | u16 mask) |
1311 | { | 1311 | { |
1312 | struct wm8350 *wm8350 = priv->codec.control_data; | 1312 | struct wm8350 *wm8350 = priv->wm8350; |
1313 | u16 reg; | 1313 | u16 reg; |
1314 | int report; | 1314 | int report; |
1315 | 1315 | ||
@@ -1342,7 +1342,7 @@ static void wm8350_hpr_work(struct work_struct *work) | |||
1342 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) | 1342 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) |
1343 | { | 1343 | { |
1344 | struct wm8350_data *priv = data; | 1344 | struct wm8350_data *priv = data; |
1345 | struct wm8350 *wm8350 = priv->codec.control_data; | 1345 | struct wm8350 *wm8350 = priv->wm8350; |
1346 | struct wm8350_jack_data *jack = NULL; | 1346 | struct wm8350_jack_data *jack = NULL; |
1347 | 1347 | ||
1348 | switch (irq - wm8350->irq_base) { | 1348 | switch (irq - wm8350->irq_base) { |
@@ -1427,7 +1427,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect); | |||
1427 | static irqreturn_t wm8350_mic_handler(int irq, void *data) | 1427 | static irqreturn_t wm8350_mic_handler(int irq, void *data) |
1428 | { | 1428 | { |
1429 | struct wm8350_data *priv = data; | 1429 | struct wm8350_data *priv = data; |
1430 | struct wm8350 *wm8350 = priv->codec.control_data; | 1430 | struct wm8350 *wm8350 = priv->wm8350; |
1431 | u16 reg; | 1431 | u16 reg; |
1432 | int report = 0; | 1432 | int report = 0; |
1433 | 1433 | ||
@@ -1536,6 +1536,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1536 | return -ENOMEM; | 1536 | return -ENOMEM; |
1537 | snd_soc_codec_set_drvdata(codec, priv); | 1537 | snd_soc_codec_set_drvdata(codec, priv); |
1538 | 1538 | ||
1539 | priv->wm8350 = wm8350; | ||
1540 | |||
1539 | for (i = 0; i < ARRAY_SIZE(supply_names); i++) | 1541 | for (i = 0; i < ARRAY_SIZE(supply_names); i++) |
1540 | priv->supplies[i].supply = supply_names[i]; | 1542 | priv->supplies[i].supply = supply_names[i]; |
1541 | 1543 | ||
@@ -1544,7 +1546,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) | |||
1544 | if (ret != 0) | 1546 | if (ret != 0) |
1545 | return ret; | 1547 | return ret; |
1546 | 1548 | ||
1547 | wm8350->codec.codec = codec; | ||
1548 | codec->control_data = wm8350; | 1549 | codec->control_data = wm8350; |
1549 | 1550 | ||
1550 | /* Put the codec into reset if it wasn't already */ | 1551 | /* Put the codec into reset if it wasn't already */ |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 7c49642af052..6c1fe3afd4b5 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -1000,61 +1000,170 @@ static void wm8994_update_class_w(struct snd_soc_codec *codec) | |||
1000 | } | 1000 | } |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | static int late_enable_ev(struct snd_soc_dapm_widget *w, | 1003 | static int aif1clk_ev(struct snd_soc_dapm_widget *w, |
1004 | struct snd_kcontrol *kcontrol, int event) | 1004 | struct snd_kcontrol *kcontrol, int event) |
1005 | { | 1005 | { |
1006 | struct snd_soc_codec *codec = w->codec; | 1006 | struct snd_soc_codec *codec = w->codec; |
1007 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1007 | struct wm8994 *control = codec->control_data; |
1008 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; | ||
1009 | int dac; | ||
1010 | int adc; | ||
1011 | int val; | ||
1012 | |||
1013 | switch (control->type) { | ||
1014 | case WM8994: | ||
1015 | case WM8958: | ||
1016 | mask |= WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA; | ||
1017 | break; | ||
1018 | default: | ||
1019 | break; | ||
1020 | } | ||
1008 | 1021 | ||
1009 | switch (event) { | 1022 | switch (event) { |
1010 | case SND_SOC_DAPM_PRE_PMU: | 1023 | case SND_SOC_DAPM_PRE_PMU: |
1011 | if (wm8994->aif1clk_enable) { | 1024 | val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); |
1012 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1025 | if ((val & WM8994_AIF1ADCL_SRC) && |
1013 | WM8994_AIF1CLK_ENA_MASK, | 1026 | (val & WM8994_AIF1ADCR_SRC)) |
1014 | WM8994_AIF1CLK_ENA); | 1027 | adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA; |
1015 | wm8994->aif1clk_enable = 0; | 1028 | else if (!(val & WM8994_AIF1ADCL_SRC) && |
1016 | } | 1029 | !(val & WM8994_AIF1ADCR_SRC)) |
1017 | if (wm8994->aif2clk_enable) { | 1030 | adc = WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; |
1018 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1031 | else |
1019 | WM8994_AIF2CLK_ENA_MASK, | 1032 | adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA | |
1020 | WM8994_AIF2CLK_ENA); | 1033 | WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; |
1021 | wm8994->aif2clk_enable = 0; | 1034 | |
1022 | } | 1035 | val = snd_soc_read(codec, WM8994_AIF1_CONTROL_2); |
1036 | if ((val & WM8994_AIF1DACL_SRC) && | ||
1037 | (val & WM8994_AIF1DACR_SRC)) | ||
1038 | dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA; | ||
1039 | else if (!(val & WM8994_AIF1DACL_SRC) && | ||
1040 | !(val & WM8994_AIF1DACR_SRC)) | ||
1041 | dac = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; | ||
1042 | else | ||
1043 | dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA | | ||
1044 | WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; | ||
1045 | |||
1046 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1047 | mask, adc); | ||
1048 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1049 | mask, dac); | ||
1050 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1051 | WM8994_AIF1DSPCLK_ENA | | ||
1052 | WM8994_SYSDSPCLK_ENA, | ||
1053 | WM8994_AIF1DSPCLK_ENA | | ||
1054 | WM8994_SYSDSPCLK_ENA); | ||
1055 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, mask, | ||
1056 | WM8994_AIF1ADC1R_ENA | | ||
1057 | WM8994_AIF1ADC1L_ENA | | ||
1058 | WM8994_AIF1ADC2R_ENA | | ||
1059 | WM8994_AIF1ADC2L_ENA); | ||
1060 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, mask, | ||
1061 | WM8994_AIF1DAC1R_ENA | | ||
1062 | WM8994_AIF1DAC1L_ENA | | ||
1063 | WM8994_AIF1DAC2R_ENA | | ||
1064 | WM8994_AIF1DAC2L_ENA); | ||
1023 | break; | 1065 | break; |
1024 | } | ||
1025 | 1066 | ||
1026 | /* We may also have postponed startup of DSP, handle that. */ | 1067 | case SND_SOC_DAPM_PRE_PMD: |
1027 | wm8958_aif_ev(w, kcontrol, event); | 1068 | case SND_SOC_DAPM_POST_PMD: |
1069 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1070 | mask, 0); | ||
1071 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1072 | mask, 0); | ||
1073 | |||
1074 | val = snd_soc_read(codec, WM8994_CLOCKING_1); | ||
1075 | if (val & WM8994_AIF2DSPCLK_ENA) | ||
1076 | val = WM8994_SYSDSPCLK_ENA; | ||
1077 | else | ||
1078 | val = 0; | ||
1079 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1080 | WM8994_SYSDSPCLK_ENA | | ||
1081 | WM8994_AIF1DSPCLK_ENA, val); | ||
1082 | break; | ||
1083 | } | ||
1028 | 1084 | ||
1029 | return 0; | 1085 | return 0; |
1030 | } | 1086 | } |
1031 | 1087 | ||
1032 | static int late_disable_ev(struct snd_soc_dapm_widget *w, | 1088 | static int aif2clk_ev(struct snd_soc_dapm_widget *w, |
1033 | struct snd_kcontrol *kcontrol, int event) | 1089 | struct snd_kcontrol *kcontrol, int event) |
1034 | { | 1090 | { |
1035 | struct snd_soc_codec *codec = w->codec; | 1091 | struct snd_soc_codec *codec = w->codec; |
1036 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1092 | int dac; |
1093 | int adc; | ||
1094 | int val; | ||
1037 | 1095 | ||
1038 | switch (event) { | 1096 | switch (event) { |
1097 | case SND_SOC_DAPM_PRE_PMU: | ||
1098 | val = snd_soc_read(codec, WM8994_AIF2_CONTROL_1); | ||
1099 | if ((val & WM8994_AIF2ADCL_SRC) && | ||
1100 | (val & WM8994_AIF2ADCR_SRC)) | ||
1101 | adc = WM8994_AIF2ADCR_ENA; | ||
1102 | else if (!(val & WM8994_AIF2ADCL_SRC) && | ||
1103 | !(val & WM8994_AIF2ADCR_SRC)) | ||
1104 | adc = WM8994_AIF2ADCL_ENA; | ||
1105 | else | ||
1106 | adc = WM8994_AIF2ADCL_ENA | WM8994_AIF2ADCR_ENA; | ||
1107 | |||
1108 | |||
1109 | val = snd_soc_read(codec, WM8994_AIF2_CONTROL_2); | ||
1110 | if ((val & WM8994_AIF2DACL_SRC) && | ||
1111 | (val & WM8994_AIF2DACR_SRC)) | ||
1112 | dac = WM8994_AIF2DACR_ENA; | ||
1113 | else if (!(val & WM8994_AIF2DACL_SRC) && | ||
1114 | !(val & WM8994_AIF2DACR_SRC)) | ||
1115 | dac = WM8994_AIF2DACL_ENA; | ||
1116 | else | ||
1117 | dac = WM8994_AIF2DACL_ENA | WM8994_AIF2DACR_ENA; | ||
1118 | |||
1119 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1120 | WM8994_AIF2ADCL_ENA | | ||
1121 | WM8994_AIF2ADCR_ENA, adc); | ||
1122 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1123 | WM8994_AIF2DACL_ENA | | ||
1124 | WM8994_AIF2DACR_ENA, dac); | ||
1125 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1126 | WM8994_AIF2DSPCLK_ENA | | ||
1127 | WM8994_SYSDSPCLK_ENA, | ||
1128 | WM8994_AIF2DSPCLK_ENA | | ||
1129 | WM8994_SYSDSPCLK_ENA); | ||
1130 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1131 | WM8994_AIF2ADCL_ENA | | ||
1132 | WM8994_AIF2ADCR_ENA, | ||
1133 | WM8994_AIF2ADCL_ENA | | ||
1134 | WM8994_AIF2ADCR_ENA); | ||
1135 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1136 | WM8994_AIF2DACL_ENA | | ||
1137 | WM8994_AIF2DACR_ENA, | ||
1138 | WM8994_AIF2DACL_ENA | | ||
1139 | WM8994_AIF2DACR_ENA); | ||
1140 | break; | ||
1141 | |||
1142 | case SND_SOC_DAPM_PRE_PMD: | ||
1039 | case SND_SOC_DAPM_POST_PMD: | 1143 | case SND_SOC_DAPM_POST_PMD: |
1040 | if (wm8994->aif1clk_disable) { | 1144 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, |
1041 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1145 | WM8994_AIF2DACL_ENA | |
1042 | WM8994_AIF1CLK_ENA_MASK, 0); | 1146 | WM8994_AIF2DACR_ENA, 0); |
1043 | wm8994->aif1clk_disable = 0; | 1147 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, |
1044 | } | 1148 | WM8994_AIF2ADCL_ENA | |
1045 | if (wm8994->aif2clk_disable) { | 1149 | WM8994_AIF2ADCR_ENA, 0); |
1046 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1150 | |
1047 | WM8994_AIF2CLK_ENA_MASK, 0); | 1151 | val = snd_soc_read(codec, WM8994_CLOCKING_1); |
1048 | wm8994->aif2clk_disable = 0; | 1152 | if (val & WM8994_AIF1DSPCLK_ENA) |
1049 | } | 1153 | val = WM8994_SYSDSPCLK_ENA; |
1154 | else | ||
1155 | val = 0; | ||
1156 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1157 | WM8994_SYSDSPCLK_ENA | | ||
1158 | WM8994_AIF2DSPCLK_ENA, val); | ||
1050 | break; | 1159 | break; |
1051 | } | 1160 | } |
1052 | 1161 | ||
1053 | return 0; | 1162 | return 0; |
1054 | } | 1163 | } |
1055 | 1164 | ||
1056 | static int aif1clk_ev(struct snd_soc_dapm_widget *w, | 1165 | static int aif1clk_late_ev(struct snd_soc_dapm_widget *w, |
1057 | struct snd_kcontrol *kcontrol, int event) | 1166 | struct snd_kcontrol *kcontrol, int event) |
1058 | { | 1167 | { |
1059 | struct snd_soc_codec *codec = w->codec; | 1168 | struct snd_soc_codec *codec = w->codec; |
1060 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1169 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
@@ -1071,8 +1180,8 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
1071 | return 0; | 1180 | return 0; |
1072 | } | 1181 | } |
1073 | 1182 | ||
1074 | static int aif2clk_ev(struct snd_soc_dapm_widget *w, | 1183 | static int aif2clk_late_ev(struct snd_soc_dapm_widget *w, |
1075 | struct snd_kcontrol *kcontrol, int event) | 1184 | struct snd_kcontrol *kcontrol, int event) |
1076 | { | 1185 | { |
1077 | struct snd_soc_codec *codec = w->codec; | 1186 | struct snd_soc_codec *codec = w->codec; |
1078 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1187 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
@@ -1089,6 +1198,63 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, | |||
1089 | return 0; | 1198 | return 0; |
1090 | } | 1199 | } |
1091 | 1200 | ||
1201 | static int late_enable_ev(struct snd_soc_dapm_widget *w, | ||
1202 | struct snd_kcontrol *kcontrol, int event) | ||
1203 | { | ||
1204 | struct snd_soc_codec *codec = w->codec; | ||
1205 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | ||
1206 | |||
1207 | switch (event) { | ||
1208 | case SND_SOC_DAPM_PRE_PMU: | ||
1209 | if (wm8994->aif1clk_enable) { | ||
1210 | aif1clk_ev(w, kcontrol, event); | ||
1211 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | ||
1212 | WM8994_AIF1CLK_ENA_MASK, | ||
1213 | WM8994_AIF1CLK_ENA); | ||
1214 | wm8994->aif1clk_enable = 0; | ||
1215 | } | ||
1216 | if (wm8994->aif2clk_enable) { | ||
1217 | aif2clk_ev(w, kcontrol, event); | ||
1218 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | ||
1219 | WM8994_AIF2CLK_ENA_MASK, | ||
1220 | WM8994_AIF2CLK_ENA); | ||
1221 | wm8994->aif2clk_enable = 0; | ||
1222 | } | ||
1223 | break; | ||
1224 | } | ||
1225 | |||
1226 | /* We may also have postponed startup of DSP, handle that. */ | ||
1227 | wm8958_aif_ev(w, kcontrol, event); | ||
1228 | |||
1229 | return 0; | ||
1230 | } | ||
1231 | |||
1232 | static int late_disable_ev(struct snd_soc_dapm_widget *w, | ||
1233 | struct snd_kcontrol *kcontrol, int event) | ||
1234 | { | ||
1235 | struct snd_soc_codec *codec = w->codec; | ||
1236 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | ||
1237 | |||
1238 | switch (event) { | ||
1239 | case SND_SOC_DAPM_POST_PMD: | ||
1240 | if (wm8994->aif1clk_disable) { | ||
1241 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | ||
1242 | WM8994_AIF1CLK_ENA_MASK, 0); | ||
1243 | aif1clk_ev(w, kcontrol, event); | ||
1244 | wm8994->aif1clk_disable = 0; | ||
1245 | } | ||
1246 | if (wm8994->aif2clk_disable) { | ||
1247 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | ||
1248 | WM8994_AIF2CLK_ENA_MASK, 0); | ||
1249 | aif2clk_ev(w, kcontrol, event); | ||
1250 | wm8994->aif2clk_disable = 0; | ||
1251 | } | ||
1252 | break; | ||
1253 | } | ||
1254 | |||
1255 | return 0; | ||
1256 | } | ||
1257 | |||
1092 | static int adc_mux_ev(struct snd_soc_dapm_widget *w, | 1258 | static int adc_mux_ev(struct snd_soc_dapm_widget *w, |
1093 | struct snd_kcontrol *kcontrol, int event) | 1259 | struct snd_kcontrol *kcontrol, int event) |
1094 | { | 1260 | { |
@@ -1385,9 +1551,9 @@ static const struct snd_kcontrol_new aif2dacr_src_mux = | |||
1385 | SOC_DAPM_ENUM("AIF2DACR Mux", aif2dacr_src_enum); | 1551 | SOC_DAPM_ENUM("AIF2DACR Mux", aif2dacr_src_enum); |
1386 | 1552 | ||
1387 | static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = { | 1553 | static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = { |
1388 | SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_ev, | 1554 | SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_late_ev, |
1389 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | 1555 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), |
1390 | SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_ev, | 1556 | SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_late_ev, |
1391 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | 1557 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), |
1392 | 1558 | ||
1393 | SND_SOC_DAPM_PGA_E("Late DAC1L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, | 1559 | SND_SOC_DAPM_PGA_E("Late DAC1L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, |
@@ -1416,8 +1582,10 @@ SND_SOC_DAPM_POST("Late Disable PGA", late_disable_ev) | |||
1416 | }; | 1582 | }; |
1417 | 1583 | ||
1418 | static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { | 1584 | static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { |
1419 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), | 1585 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, aif1clk_ev, |
1420 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), | 1586 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), |
1587 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, aif2clk_ev, | ||
1588 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | ||
1421 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), | 1589 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), |
1422 | SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, | 1590 | SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, |
1423 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), | 1591 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), |
@@ -1470,30 +1638,30 @@ SND_SOC_DAPM_SUPPLY("VMID", SND_SOC_NOPM, 0, 0, vmid_event, | |||
1470 | SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event, | 1638 | SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event, |
1471 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1639 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1472 | 1640 | ||
1473 | SND_SOC_DAPM_SUPPLY("DSP1CLK", WM8994_CLOCKING_1, 3, 0, NULL, 0), | 1641 | SND_SOC_DAPM_SUPPLY("DSP1CLK", SND_SOC_NOPM, 3, 0, NULL, 0), |
1474 | SND_SOC_DAPM_SUPPLY("DSP2CLK", WM8994_CLOCKING_1, 2, 0, NULL, 0), | 1642 | SND_SOC_DAPM_SUPPLY("DSP2CLK", SND_SOC_NOPM, 2, 0, NULL, 0), |
1475 | SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0), | 1643 | SND_SOC_DAPM_SUPPLY("DSPINTCLK", SND_SOC_NOPM, 1, 0, NULL, 0), |
1476 | 1644 | ||
1477 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, | 1645 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, |
1478 | 0, WM8994_POWER_MANAGEMENT_4, 9, 0), | 1646 | 0, SND_SOC_NOPM, 9, 0), |
1479 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, | 1647 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, |
1480 | 0, WM8994_POWER_MANAGEMENT_4, 8, 0), | 1648 | 0, SND_SOC_NOPM, 8, 0), |
1481 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0, | 1649 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0, |
1482 | WM8994_POWER_MANAGEMENT_5, 9, 0, wm8958_aif_ev, | 1650 | SND_SOC_NOPM, 9, 0, wm8958_aif_ev, |
1483 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1651 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1484 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0, | 1652 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0, |
1485 | WM8994_POWER_MANAGEMENT_5, 8, 0, wm8958_aif_ev, | 1653 | SND_SOC_NOPM, 8, 0, wm8958_aif_ev, |
1486 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1654 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1487 | 1655 | ||
1488 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, | 1656 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, |
1489 | 0, WM8994_POWER_MANAGEMENT_4, 11, 0), | 1657 | 0, SND_SOC_NOPM, 11, 0), |
1490 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, | 1658 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, |
1491 | 0, WM8994_POWER_MANAGEMENT_4, 10, 0), | 1659 | 0, SND_SOC_NOPM, 10, 0), |
1492 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0, | 1660 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0, |
1493 | WM8994_POWER_MANAGEMENT_5, 11, 0, wm8958_aif_ev, | 1661 | SND_SOC_NOPM, 11, 0, wm8958_aif_ev, |
1494 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1662 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1495 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0, | 1663 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0, |
1496 | WM8994_POWER_MANAGEMENT_5, 10, 0, wm8958_aif_ev, | 1664 | SND_SOC_NOPM, 10, 0, wm8958_aif_ev, |
1497 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1665 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1498 | 1666 | ||
1499 | SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0, | 1667 | SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0, |
@@ -1520,14 +1688,14 @@ SND_SOC_DAPM_MIXER("DAC1R Mixer", SND_SOC_NOPM, 0, 0, | |||
1520 | dac1r_mix, ARRAY_SIZE(dac1r_mix)), | 1688 | dac1r_mix, ARRAY_SIZE(dac1r_mix)), |
1521 | 1689 | ||
1522 | SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0, | 1690 | SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0, |
1523 | WM8994_POWER_MANAGEMENT_4, 13, 0), | 1691 | SND_SOC_NOPM, 13, 0), |
1524 | SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0, | 1692 | SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0, |
1525 | WM8994_POWER_MANAGEMENT_4, 12, 0), | 1693 | SND_SOC_NOPM, 12, 0), |
1526 | SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0, | 1694 | SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0, |
1527 | WM8994_POWER_MANAGEMENT_5, 13, 0, wm8958_aif_ev, | 1695 | SND_SOC_NOPM, 13, 0, wm8958_aif_ev, |
1528 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1696 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1529 | SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0, | 1697 | SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0, |
1530 | WM8994_POWER_MANAGEMENT_5, 12, 0, wm8958_aif_ev, | 1698 | SND_SOC_NOPM, 12, 0, wm8958_aif_ev, |
1531 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1699 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1532 | 1700 | ||
1533 | SND_SOC_DAPM_AIF_IN("AIF1DACDAT", NULL, 0, SND_SOC_NOPM, 0, 0), | 1701 | SND_SOC_DAPM_AIF_IN("AIF1DACDAT", NULL, 0, SND_SOC_NOPM, 0, 0), |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index f13f2886339c..6c028c470601 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -1035,7 +1035,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, | |||
1035 | enum snd_soc_bias_level level) | 1035 | enum snd_soc_bias_level level) |
1036 | { | 1036 | { |
1037 | struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); | 1037 | struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); |
1038 | int val; | 1038 | int mask, val; |
1039 | 1039 | ||
1040 | switch (level) { | 1040 | switch (level) { |
1041 | case SND_SOC_BIAS_STANDBY: | 1041 | case SND_SOC_BIAS_STANDBY: |
@@ -1047,6 +1047,13 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, | |||
1047 | case SND_SOC_BIAS_ON: | 1047 | case SND_SOC_BIAS_ON: |
1048 | /* Turn off any unneded single ended outputs */ | 1048 | /* Turn off any unneded single ended outputs */ |
1049 | val = 0; | 1049 | val = 0; |
1050 | mask = 0; | ||
1051 | |||
1052 | if (hubs->lineout1_se) | ||
1053 | mask |= WM8993_LINEOUT1N_ENA | WM8993_LINEOUT1P_ENA; | ||
1054 | |||
1055 | if (hubs->lineout2_se) | ||
1056 | mask |= WM8993_LINEOUT2N_ENA | WM8993_LINEOUT2P_ENA; | ||
1050 | 1057 | ||
1051 | if (hubs->lineout1_se && hubs->lineout1n_ena) | 1058 | if (hubs->lineout1_se && hubs->lineout1n_ena) |
1052 | val |= WM8993_LINEOUT1N_ENA; | 1059 | val |= WM8993_LINEOUT1N_ENA; |
@@ -1061,11 +1068,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, | |||
1061 | val |= WM8993_LINEOUT2P_ENA; | 1068 | val |= WM8993_LINEOUT2P_ENA; |
1062 | 1069 | ||
1063 | snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3, | 1070 | snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3, |
1064 | WM8993_LINEOUT1N_ENA | | 1071 | mask, val); |
1065 | WM8993_LINEOUT1P_ENA | | ||
1066 | WM8993_LINEOUT2N_ENA | | ||
1067 | WM8993_LINEOUT2P_ENA, | ||
1068 | val); | ||
1069 | 1072 | ||
1070 | /* Remove the input clamps */ | 1073 | /* Remove the input clamps */ |
1071 | snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, | 1074 | snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index afbabf427f27..3fea5a15ffe8 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -58,9 +58,9 @@ static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card) | |||
58 | { | 58 | { |
59 | struct mpc8610_hpcd_data *machine_data = | 59 | struct mpc8610_hpcd_data *machine_data = |
60 | container_of(card, struct mpc8610_hpcd_data, card); | 60 | container_of(card, struct mpc8610_hpcd_data, card); |
61 | struct ccsr_guts_86xx __iomem *guts; | 61 | struct ccsr_guts __iomem *guts; |
62 | 62 | ||
63 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); | 63 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); |
64 | if (!guts) { | 64 | if (!guts) { |
65 | dev_err(card->dev, "could not map global utilities\n"); | 65 | dev_err(card->dev, "could not map global utilities\n"); |
66 | return -ENOMEM; | 66 | return -ENOMEM; |
@@ -142,9 +142,9 @@ static int mpc8610_hpcd_machine_remove(struct snd_soc_card *card) | |||
142 | { | 142 | { |
143 | struct mpc8610_hpcd_data *machine_data = | 143 | struct mpc8610_hpcd_data *machine_data = |
144 | container_of(card, struct mpc8610_hpcd_data, card); | 144 | container_of(card, struct mpc8610_hpcd_data, card); |
145 | struct ccsr_guts_86xx __iomem *guts; | 145 | struct ccsr_guts __iomem *guts; |
146 | 146 | ||
147 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); | 147 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); |
148 | if (!guts) { | 148 | if (!guts) { |
149 | dev_err(card->dev, "could not map global utilities\n"); | 149 | dev_err(card->dev, "could not map global utilities\n"); |
150 | return -ENOMEM; | 150 | return -ENOMEM; |
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 46623405a2ce..982a1c944983 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c | |||
@@ -46,7 +46,7 @@ | |||
46 | * ch: The channel on the DMA controller (0, 1, 2, or 3) | 46 | * ch: The channel on the DMA controller (0, 1, 2, or 3) |
47 | * device: The device to set as the target (CCSR_GUTS_DMUXCR_xxx) | 47 | * device: The device to set as the target (CCSR_GUTS_DMUXCR_xxx) |
48 | */ | 48 | */ |
49 | static inline void guts_set_dmuxcr(struct ccsr_guts_85xx __iomem *guts, | 49 | static inline void guts_set_dmuxcr(struct ccsr_guts __iomem *guts, |
50 | unsigned int co, unsigned int ch, unsigned int device) | 50 | unsigned int co, unsigned int ch, unsigned int device) |
51 | { | 51 | { |
52 | unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch)); | 52 | unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch)); |
@@ -90,9 +90,9 @@ static int p1022_ds_machine_probe(struct snd_soc_card *card) | |||
90 | { | 90 | { |
91 | struct machine_data *mdata = | 91 | struct machine_data *mdata = |
92 | container_of(card, struct machine_data, card); | 92 | container_of(card, struct machine_data, card); |
93 | struct ccsr_guts_85xx __iomem *guts; | 93 | struct ccsr_guts __iomem *guts; |
94 | 94 | ||
95 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx)); | 95 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); |
96 | if (!guts) { | 96 | if (!guts) { |
97 | dev_err(card->dev, "could not map global utilities\n"); | 97 | dev_err(card->dev, "could not map global utilities\n"); |
98 | return -ENOMEM; | 98 | return -ENOMEM; |
@@ -164,9 +164,9 @@ static int p1022_ds_machine_remove(struct snd_soc_card *card) | |||
164 | { | 164 | { |
165 | struct machine_data *mdata = | 165 | struct machine_data *mdata = |
166 | container_of(card, struct machine_data, card); | 166 | container_of(card, struct machine_data, card); |
167 | struct ccsr_guts_85xx __iomem *guts; | 167 | struct ccsr_guts __iomem *guts; |
168 | 168 | ||
169 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx)); | 169 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts)); |
170 | if (!guts) { | 170 | if (!guts) { |
171 | dev_err(card->dev, "could not map global utilities\n"); | 171 | dev_err(card->dev, "could not map global utilities\n"); |
172 | return -ENOMEM; | 172 | return -ENOMEM; |
diff --git a/sound/soc/imx/imx-audmux.c b/sound/soc/imx/imx-audmux.c index 601df809a26a..f23700359c67 100644 --- a/sound/soc/imx/imx-audmux.c +++ b/sound/soc/imx/imx-audmux.c | |||
@@ -40,12 +40,6 @@ static void __iomem *audmux_base; | |||
40 | #ifdef CONFIG_DEBUG_FS | 40 | #ifdef CONFIG_DEBUG_FS |
41 | static struct dentry *audmux_debugfs_root; | 41 | static struct dentry *audmux_debugfs_root; |
42 | 42 | ||
43 | static int audmux_open_file(struct inode *inode, struct file *file) | ||
44 | { | ||
45 | file->private_data = inode->i_private; | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | /* There is an annoying discontinuity in the SSI numbering with regard | 43 | /* There is an annoying discontinuity in the SSI numbering with regard |
50 | * to the Linux number of the devices */ | 44 | * to the Linux number of the devices */ |
51 | static const char *audmux_port_string(int port) | 45 | static const char *audmux_port_string(int port) |
@@ -79,6 +73,9 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, | |||
79 | if (!buf) | 73 | if (!buf) |
80 | return -ENOMEM; | 74 | return -ENOMEM; |
81 | 75 | ||
76 | if (!audmux_base) | ||
77 | return -ENOSYS; | ||
78 | |||
82 | if (audmux_clk) | 79 | if (audmux_clk) |
83 | clk_prepare_enable(audmux_clk); | 80 | clk_prepare_enable(audmux_clk); |
84 | 81 | ||
@@ -142,7 +139,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, | |||
142 | } | 139 | } |
143 | 140 | ||
144 | static const struct file_operations audmux_debugfs_fops = { | 141 | static const struct file_operations audmux_debugfs_fops = { |
145 | .open = audmux_open_file, | 142 | .open = simple_open, |
146 | .read = audmux_read_file, | 143 | .read = audmux_read_file, |
147 | .llseek = default_llseek, | 144 | .llseek = default_llseek, |
148 | }; | 145 | }; |
@@ -158,7 +155,7 @@ static void __init audmux_debugfs_init(void) | |||
158 | return; | 155 | return; |
159 | } | 156 | } |
160 | 157 | ||
161 | for (i = 1; i < 8; i++) { | 158 | for (i = 0; i < MX31_AUDMUX_PORT6_SSI_PINS_6 + 1; i++) { |
162 | snprintf(buf, sizeof(buf), "ssi%d", i); | 159 | snprintf(buf, sizeof(buf), "ssi%d", i); |
163 | if (!debugfs_create_file(buf, 0444, audmux_debugfs_root, | 160 | if (!debugfs_create_file(buf, 0444, audmux_debugfs_root, |
164 | (void *)i, &audmux_debugfs_fops)) | 161 | (void *)i, &audmux_debugfs_fops)) |
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index e00dd0b1139c..deafbfaacdbf 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig | |||
@@ -97,7 +97,7 @@ config SND_OMAP_SOC_SDP3430 | |||
97 | 97 | ||
98 | config SND_OMAP_SOC_OMAP_ABE_TWL6040 | 98 | config SND_OMAP_SOC_OMAP_ABE_TWL6040 |
99 | tristate "SoC Audio support for OMAP boards using ABE and twl6040 codec" | 99 | tristate "SoC Audio support for OMAP boards using ABE and twl6040 codec" |
100 | depends on TWL4030_CORE && SND_OMAP_SOC && ARCH_OMAP4 | 100 | depends on TWL6040_CORE && SND_OMAP_SOC && ARCH_OMAP4 |
101 | select SND_OMAP_SOC_DMIC | 101 | select SND_OMAP_SOC_DMIC |
102 | select SND_OMAP_SOC_MCPDM | 102 | select SND_OMAP_SOC_MCPDM |
103 | select SND_SOC_TWL6040 | 103 | select SND_SOC_TWL6040 |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index a59bd352d342..5a649da9122a 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -401,6 +401,10 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
401 | } | 401 | } |
402 | 402 | ||
403 | out: | 403 | out: |
404 | /* free preallocated buffers in case of error */ | ||
405 | if (ret) | ||
406 | omap_pcm_free_dma_buffers(pcm); | ||
407 | |||
404 | return ret; | 408 | return ret; |
405 | } | 409 | } |
406 | 410 | ||
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 609abd51e55f..d08583790d23 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/io.h> | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
22 | #include <sound/initval.h> | 23 | #include <sound/initval.h> |
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 72185078ddf8..79fbeea99d46 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c | |||
@@ -166,7 +166,7 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = { | |||
166 | 166 | ||
167 | static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev) | 167 | static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev) |
168 | { | 168 | { |
169 | return snd_soc_register_dai(&pdev->dev, &s3c2412_i2s_dai); | 169 | return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); |
170 | } | 170 | } |
171 | 171 | ||
172 | static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev) | 172 | static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev) |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 378cc5b056d7..74ed2dffbffd 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1001,11 +1001,10 @@ static void fsi_dma_do_tasklet(unsigned long data) | |||
1001 | sg_dma_address(&sg) = buf; | 1001 | sg_dma_address(&sg) = buf; |
1002 | sg_dma_len(&sg) = len; | 1002 | sg_dma_len(&sg) = len; |
1003 | 1003 | ||
1004 | desc = chan->device->device_prep_slave_sg(chan, &sg, 1, dir, | 1004 | desc = dmaengine_prep_slave_sg(chan, &sg, 1, dir, |
1005 | DMA_PREP_INTERRUPT | | 1005 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
1006 | DMA_CTRL_ACK); | ||
1007 | if (!desc) { | 1006 | if (!desc) { |
1008 | dev_err(dai->dev, "device_prep_slave_sg() fail\n"); | 1007 | dev_err(dai->dev, "dmaengine_prep_slave_sg() fail\n"); |
1009 | return; | 1008 | return; |
1010 | } | 1009 | } |
1011 | 1010 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a4deebc0801a..c88d9741b9e7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -201,12 +201,6 @@ static ssize_t pmdown_time_set(struct device *dev, | |||
201 | static DEVICE_ATTR(pmdown_time, 0644, pmdown_time_show, pmdown_time_set); | 201 | static DEVICE_ATTR(pmdown_time, 0644, pmdown_time_show, pmdown_time_set); |
202 | 202 | ||
203 | #ifdef CONFIG_DEBUG_FS | 203 | #ifdef CONFIG_DEBUG_FS |
204 | static int codec_reg_open_file(struct inode *inode, struct file *file) | ||
205 | { | ||
206 | file->private_data = inode->i_private; | ||
207 | return 0; | ||
208 | } | ||
209 | |||
210 | static ssize_t codec_reg_read_file(struct file *file, char __user *user_buf, | 204 | static ssize_t codec_reg_read_file(struct file *file, char __user *user_buf, |
211 | size_t count, loff_t *ppos) | 205 | size_t count, loff_t *ppos) |
212 | { | 206 | { |
@@ -264,7 +258,7 @@ static ssize_t codec_reg_write_file(struct file *file, | |||
264 | } | 258 | } |
265 | 259 | ||
266 | static const struct file_operations codec_reg_fops = { | 260 | static const struct file_operations codec_reg_fops = { |
267 | .open = codec_reg_open_file, | 261 | .open = simple_open, |
268 | .read = codec_reg_read_file, | 262 | .read = codec_reg_read_file, |
269 | .write = codec_reg_write_file, | 263 | .write = codec_reg_write_file, |
270 | .llseek = default_llseek, | 264 | .llseek = default_llseek, |
@@ -1087,6 +1081,8 @@ static int soc_probe_platform(struct snd_soc_card *card, | |||
1087 | snd_soc_dapm_new_controls(&platform->dapm, | 1081 | snd_soc_dapm_new_controls(&platform->dapm, |
1088 | driver->dapm_widgets, driver->num_dapm_widgets); | 1082 | driver->dapm_widgets, driver->num_dapm_widgets); |
1089 | 1083 | ||
1084 | platform->dapm.idle_bias_off = 1; | ||
1085 | |||
1090 | if (driver->probe) { | 1086 | if (driver->probe) { |
1091 | ret = driver->probe(platform); | 1087 | ret = driver->probe(platform); |
1092 | if (ret < 0) { | 1088 | if (ret < 0) { |
@@ -3117,6 +3113,7 @@ int snd_soc_register_card(struct snd_soc_card *card) | |||
3117 | GFP_KERNEL); | 3113 | GFP_KERNEL); |
3118 | if (card->rtd == NULL) | 3114 | if (card->rtd == NULL) |
3119 | return -ENOMEM; | 3115 | return -ENOMEM; |
3116 | card->num_rtd = 0; | ||
3120 | card->rtd_aux = &card->rtd[card->num_links]; | 3117 | card->rtd_aux = &card->rtd[card->num_links]; |
3121 | 3118 | ||
3122 | for (i = 0; i < card->num_links; i++) | 3119 | for (i = 0; i < card->num_links; i++) |
@@ -3628,10 +3625,10 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, | |||
3628 | int i, ret; | 3625 | int i, ret; |
3629 | 3626 | ||
3630 | num_routes = of_property_count_strings(np, propname); | 3627 | num_routes = of_property_count_strings(np, propname); |
3631 | if (num_routes & 1) { | 3628 | if (num_routes < 0 || num_routes & 1) { |
3632 | dev_err(card->dev, | 3629 | dev_err(card->dev, |
3633 | "Property '%s's length is not even\n", | 3630 | "Property '%s' does not exist or its length is not even\n", |
3634 | propname); | 3631 | propname); |
3635 | return -EINVAL; | 3632 | return -EINVAL; |
3636 | } | 3633 | } |
3637 | num_routes /= 2; | 3634 | num_routes /= 2; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6241490fff30..1bb6d4a63cd8 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -67,6 +67,7 @@ static int dapm_up_seq[] = { | |||
67 | [snd_soc_dapm_out_drv] = 10, | 67 | [snd_soc_dapm_out_drv] = 10, |
68 | [snd_soc_dapm_hp] = 10, | 68 | [snd_soc_dapm_hp] = 10, |
69 | [snd_soc_dapm_spk] = 10, | 69 | [snd_soc_dapm_spk] = 10, |
70 | [snd_soc_dapm_line] = 10, | ||
70 | [snd_soc_dapm_post] = 11, | 71 | [snd_soc_dapm_post] = 11, |
71 | }; | 72 | }; |
72 | 73 | ||
@@ -75,6 +76,7 @@ static int dapm_down_seq[] = { | |||
75 | [snd_soc_dapm_adc] = 1, | 76 | [snd_soc_dapm_adc] = 1, |
76 | [snd_soc_dapm_hp] = 2, | 77 | [snd_soc_dapm_hp] = 2, |
77 | [snd_soc_dapm_spk] = 2, | 78 | [snd_soc_dapm_spk] = 2, |
79 | [snd_soc_dapm_line] = 2, | ||
78 | [snd_soc_dapm_out_drv] = 2, | 80 | [snd_soc_dapm_out_drv] = 2, |
79 | [snd_soc_dapm_pga] = 4, | 81 | [snd_soc_dapm_pga] = 4, |
80 | [snd_soc_dapm_mixer_named_ctl] = 5, | 82 | [snd_soc_dapm_mixer_named_ctl] = 5, |
@@ -1544,12 +1546,6 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1544 | } | 1546 | } |
1545 | 1547 | ||
1546 | #ifdef CONFIG_DEBUG_FS | 1548 | #ifdef CONFIG_DEBUG_FS |
1547 | static int dapm_widget_power_open_file(struct inode *inode, struct file *file) | ||
1548 | { | ||
1549 | file->private_data = inode->i_private; | ||
1550 | return 0; | ||
1551 | } | ||
1552 | |||
1553 | static ssize_t dapm_widget_power_read_file(struct file *file, | 1549 | static ssize_t dapm_widget_power_read_file(struct file *file, |
1554 | char __user *user_buf, | 1550 | char __user *user_buf, |
1555 | size_t count, loff_t *ppos) | 1551 | size_t count, loff_t *ppos) |
@@ -1613,17 +1609,11 @@ static ssize_t dapm_widget_power_read_file(struct file *file, | |||
1613 | } | 1609 | } |
1614 | 1610 | ||
1615 | static const struct file_operations dapm_widget_power_fops = { | 1611 | static const struct file_operations dapm_widget_power_fops = { |
1616 | .open = dapm_widget_power_open_file, | 1612 | .open = simple_open, |
1617 | .read = dapm_widget_power_read_file, | 1613 | .read = dapm_widget_power_read_file, |
1618 | .llseek = default_llseek, | 1614 | .llseek = default_llseek, |
1619 | }; | 1615 | }; |
1620 | 1616 | ||
1621 | static int dapm_bias_open_file(struct inode *inode, struct file *file) | ||
1622 | { | ||
1623 | file->private_data = inode->i_private; | ||
1624 | return 0; | ||
1625 | } | ||
1626 | |||
1627 | static ssize_t dapm_bias_read_file(struct file *file, char __user *user_buf, | 1617 | static ssize_t dapm_bias_read_file(struct file *file, char __user *user_buf, |
1628 | size_t count, loff_t *ppos) | 1618 | size_t count, loff_t *ppos) |
1629 | { | 1619 | { |
@@ -1654,7 +1644,7 @@ static ssize_t dapm_bias_read_file(struct file *file, char __user *user_buf, | |||
1654 | } | 1644 | } |
1655 | 1645 | ||
1656 | static const struct file_operations dapm_bias_fops = { | 1646 | static const struct file_operations dapm_bias_fops = { |
1657 | .open = dapm_bias_open_file, | 1647 | .open = simple_open, |
1658 | .read = dapm_bias_read_file, | 1648 | .read = dapm_bias_read_file, |
1659 | .llseek = default_llseek, | 1649 | .llseek = default_llseek, |
1660 | }; | 1650 | }; |
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c index 33509de52540..e53349912b2e 100644 --- a/sound/soc/tegra/tegra_i2s.c +++ b/sound/soc/tegra/tegra_i2s.c | |||
@@ -79,11 +79,15 @@ static int tegra_i2s_show(struct seq_file *s, void *unused) | |||
79 | struct tegra_i2s *i2s = s->private; | 79 | struct tegra_i2s *i2s = s->private; |
80 | int i; | 80 | int i; |
81 | 81 | ||
82 | clk_enable(i2s->clk_i2s); | ||
83 | |||
82 | for (i = 0; i < ARRAY_SIZE(regs); i++) { | 84 | for (i = 0; i < ARRAY_SIZE(regs); i++) { |
83 | u32 val = tegra_i2s_read(i2s, regs[i].offset); | 85 | u32 val = tegra_i2s_read(i2s, regs[i].offset); |
84 | seq_printf(s, "%s = %08x\n", regs[i].name, val); | 86 | seq_printf(s, "%s = %08x\n", regs[i].name, val); |
85 | } | 87 | } |
86 | 88 | ||
89 | clk_disable(i2s->clk_i2s); | ||
90 | |||
87 | return 0; | 91 | return 0; |
88 | } | 92 | } |
89 | 93 | ||
@@ -112,7 +116,7 @@ static void tegra_i2s_debug_remove(struct tegra_i2s *i2s) | |||
112 | debugfs_remove(i2s->debug); | 116 | debugfs_remove(i2s->debug); |
113 | } | 117 | } |
114 | #else | 118 | #else |
115 | static inline void tegra_i2s_debug_add(struct tegra_i2s *i2s, int id) | 119 | static inline void tegra_i2s_debug_add(struct tegra_i2s *i2s) |
116 | { | 120 | { |
117 | } | 121 | } |
118 | 122 | ||
diff --git a/sound/soc/tegra/tegra_spdif.c b/sound/soc/tegra/tegra_spdif.c index 475428cf270e..9ff2c601445f 100644 --- a/sound/soc/tegra/tegra_spdif.c +++ b/sound/soc/tegra/tegra_spdif.c | |||
@@ -79,11 +79,15 @@ static int tegra_spdif_show(struct seq_file *s, void *unused) | |||
79 | struct tegra_spdif *spdif = s->private; | 79 | struct tegra_spdif *spdif = s->private; |
80 | int i; | 80 | int i; |
81 | 81 | ||
82 | clk_enable(spdif->clk_spdif_out); | ||
83 | |||
82 | for (i = 0; i < ARRAY_SIZE(regs); i++) { | 84 | for (i = 0; i < ARRAY_SIZE(regs); i++) { |
83 | u32 val = tegra_spdif_read(spdif, regs[i].offset); | 85 | u32 val = tegra_spdif_read(spdif, regs[i].offset); |
84 | seq_printf(s, "%s = %08x\n", regs[i].name, val); | 86 | seq_printf(s, "%s = %08x\n", regs[i].name, val); |
85 | } | 87 | } |
86 | 88 | ||
89 | clk_disable(spdif->clk_spdif_out); | ||
90 | |||
87 | return 0; | 91 | return 0; |
88 | } | 92 | } |
89 | 93 | ||