diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/cs42l52.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l52.h | 2 | ||||
-rw-r--r-- | sound/soc/codecs/max98090.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/wm5102.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 7 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 15 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 1 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 7 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.c | 1 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.h | 2 | ||||
-rw-r--r-- | sound/soc/soc-compress.c | 8 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 49 | ||||
-rw-r--r-- | sound/soc/soc-pcm.c | 13 |
14 files changed, 83 insertions, 49 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 0f6f481cec09..987f728718c5 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
@@ -86,7 +86,7 @@ static const struct reg_default cs42l52_reg_defaults[] = { | |||
86 | { CS42L52_BEEP_VOL, 0x00 }, /* r1D Beep Volume off Time */ | 86 | { CS42L52_BEEP_VOL, 0x00 }, /* r1D Beep Volume off Time */ |
87 | { CS42L52_BEEP_TONE_CTL, 0x00 }, /* r1E Beep Tone Cfg. */ | 87 | { CS42L52_BEEP_TONE_CTL, 0x00 }, /* r1E Beep Tone Cfg. */ |
88 | { CS42L52_TONE_CTL, 0x00 }, /* r1F Tone Ctl */ | 88 | { CS42L52_TONE_CTL, 0x00 }, /* r1F Tone Ctl */ |
89 | { CS42L52_MASTERA_VOL, 0x88 }, /* r20 Master A Volume */ | 89 | { CS42L52_MASTERA_VOL, 0x00 }, /* r20 Master A Volume */ |
90 | { CS42L52_MASTERB_VOL, 0x00 }, /* r21 Master B Volume */ | 90 | { CS42L52_MASTERB_VOL, 0x00 }, /* r21 Master B Volume */ |
91 | { CS42L52_HPA_VOL, 0x00 }, /* r22 Headphone A Volume */ | 91 | { CS42L52_HPA_VOL, 0x00 }, /* r22 Headphone A Volume */ |
92 | { CS42L52_HPB_VOL, 0x00 }, /* r23 Headphone B Volume */ | 92 | { CS42L52_HPB_VOL, 0x00 }, /* r23 Headphone B Volume */ |
@@ -193,6 +193,8 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0); | |||
193 | 193 | ||
194 | static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); | 194 | static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); |
195 | 195 | ||
196 | static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); | ||
197 | |||
196 | static const unsigned int limiter_tlv[] = { | 198 | static const unsigned int limiter_tlv[] = { |
197 | TLV_DB_RANGE_HEAD(2), | 199 | TLV_DB_RANGE_HEAD(2), |
198 | 0, 2, TLV_DB_SCALE_ITEM(-3000, 600, 0), | 200 | 0, 2, TLV_DB_SCALE_ITEM(-3000, 600, 0), |
@@ -225,7 +227,7 @@ static const char * const mic_bias_level_text[] = { | |||
225 | }; | 227 | }; |
226 | 228 | ||
227 | static const struct soc_enum mic_bias_level_enum = | 229 | static const struct soc_enum mic_bias_level_enum = |
228 | SOC_ENUM_SINGLE(CS42L52_IFACE_CTL1, 0, | 230 | SOC_ENUM_SINGLE(CS42L52_IFACE_CTL2, 0, |
229 | ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text); | 231 | ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text); |
230 | 232 | ||
231 | static const char * const cs42l52_mic_text[] = { "Single", "Differential" }; | 233 | static const char * const cs42l52_mic_text[] = { "Single", "Differential" }; |
@@ -260,7 +262,7 @@ static const char * const hp_gain_num_text[] = { | |||
260 | }; | 262 | }; |
261 | 263 | ||
262 | static const struct soc_enum hp_gain_enum = | 264 | static const struct soc_enum hp_gain_enum = |
263 | SOC_ENUM_SINGLE(CS42L52_PB_CTL1, 4, | 265 | SOC_ENUM_SINGLE(CS42L52_PB_CTL1, 5, |
264 | ARRAY_SIZE(hp_gain_num_text), hp_gain_num_text); | 266 | ARRAY_SIZE(hp_gain_num_text), hp_gain_num_text); |
265 | 267 | ||
266 | static const char * const beep_pitch_text[] = { | 268 | static const char * const beep_pitch_text[] = { |
@@ -413,7 +415,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
413 | SOC_ENUM("Headphone Analog Gain", hp_gain_enum), | 415 | SOC_ENUM("Headphone Analog Gain", hp_gain_enum), |
414 | 416 | ||
415 | SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, | 417 | SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, |
416 | CS42L52_SPKB_VOL, 7, 0x1, 0xff, hl_tlv), | 418 | CS42L52_SPKB_VOL, 0, 0x1, 0xff, hl_tlv), |
417 | 419 | ||
418 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, | 420 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, |
419 | CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv), | 421 | CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv), |
@@ -441,7 +443,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { | |||
441 | 443 | ||
442 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", | 444 | SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", |
443 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, | 445 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, |
444 | 6, 0x7f, 0x19, hl_tlv), | 446 | 0, 0x7f, 0x19, mix_tlv), |
445 | SOC_DOUBLE_R("PCM Mixer Switch", | 447 | SOC_DOUBLE_R("PCM Mixer Switch", |
446 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), | 448 | CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), |
447 | 449 | ||
diff --git a/sound/soc/codecs/cs42l52.h b/sound/soc/codecs/cs42l52.h index 60985c059071..4277012c4719 100644 --- a/sound/soc/codecs/cs42l52.h +++ b/sound/soc/codecs/cs42l52.h | |||
@@ -157,7 +157,7 @@ | |||
157 | #define CS42L52_PB_CTL1_INV_PCMA (1 << 2) | 157 | #define CS42L52_PB_CTL1_INV_PCMA (1 << 2) |
158 | #define CS42L52_PB_CTL1_MSTB_MUTE (1 << 1) | 158 | #define CS42L52_PB_CTL1_MSTB_MUTE (1 << 1) |
159 | #define CS42L52_PB_CTL1_MSTA_MUTE (1 << 0) | 159 | #define CS42L52_PB_CTL1_MSTA_MUTE (1 << 0) |
160 | #define CS42L52_PB_CTL1_MUTE_MASK 0xFFFD | 160 | #define CS42L52_PB_CTL1_MUTE_MASK 0x03 |
161 | #define CS42L52_PB_CTL1_MUTE 3 | 161 | #define CS42L52_PB_CTL1_MUTE 3 |
162 | #define CS42L52_PB_CTL1_UNMUTE 0 | 162 | #define CS42L52_PB_CTL1_UNMUTE 0 |
163 | 163 | ||
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index ce0d36412c97..8d14a76c7249 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c | |||
@@ -2233,7 +2233,7 @@ static int max98090_probe(struct snd_soc_codec *codec) | |||
2233 | dev_dbg(codec->dev, "irq = %d\n", max98090->irq); | 2233 | dev_dbg(codec->dev, "irq = %d\n", max98090->irq); |
2234 | 2234 | ||
2235 | ret = request_threaded_irq(max98090->irq, NULL, | 2235 | ret = request_threaded_irq(max98090->irq, NULL, |
2236 | max98090_interrupt, IRQF_TRIGGER_FALLING, | 2236 | max98090_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, |
2237 | "max98090_interrupt", codec); | 2237 | "max98090_interrupt", codec); |
2238 | if (ret < 0) { | 2238 | if (ret < 0) { |
2239 | dev_err(codec->dev, "request_irq failed: %d\n", | 2239 | dev_err(codec->dev, "request_irq failed: %d\n", |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 65d09d60b7c6..1514bf845e4b 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -187,14 +187,14 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, | |||
187 | 187 | ||
188 | break; | 188 | break; |
189 | } | 189 | } |
190 | |||
191 | if (found) | ||
192 | snd_soc_dapm_sync(widget->dapm); | ||
193 | } | 190 | } |
194 | 191 | ||
195 | ret = snd_soc_update_bits(widget->codec, reg, val_mask, val); | ||
196 | |||
197 | mutex_unlock(&widget->codec->mutex); | 192 | mutex_unlock(&widget->codec->mutex); |
193 | |||
194 | if (found) | ||
195 | snd_soc_dapm_sync(widget->dapm); | ||
196 | |||
197 | ret = snd_soc_update_bits_locked(widget->codec, reg, val_mask, val); | ||
198 | return ret; | 198 | return ret; |
199 | } | 199 | } |
200 | 200 | ||
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index e895d3939eef..100fdadda56a 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -1120,7 +1120,8 @@ SND_SOC_DAPM_AIF_IN("AIF3RX2", NULL, 0, | |||
1120 | ARIZONA_DSP_WIDGETS(DSP1, "DSP1"), | 1120 | ARIZONA_DSP_WIDGETS(DSP1, "DSP1"), |
1121 | 1121 | ||
1122 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 1122 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
1123 | ARIZONA_AEC_LOOPBACK_ENA, 0, &wm5102_aec_loopback_mux), | 1123 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, |
1124 | &wm5102_aec_loopback_mux), | ||
1124 | 1125 | ||
1125 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, | 1126 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, |
1126 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, | 1127 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 731884e04776..88ad7db52dde 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -190,7 +190,7 @@ ARIZONA_MIXER_CONTROLS("DSP2R", ARIZONA_DSP2RMIX_INPUT_1_SOURCE), | |||
190 | ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE), | 190 | ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE), |
191 | ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE), | 191 | ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE), |
192 | ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE), | 192 | ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE), |
193 | ARIZONA_MIXER_CONTROLS("DSP5R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE), | 193 | ARIZONA_MIXER_CONTROLS("DSP4R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE), |
194 | 194 | ||
195 | ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE), | 195 | ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE), |
196 | ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE), | 196 | ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE), |
@@ -503,7 +503,8 @@ SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0, | |||
503 | NULL, 0), | 503 | NULL, 0), |
504 | 504 | ||
505 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, | 505 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
506 | ARIZONA_AEC_LOOPBACK_ENA, 0, &wm5110_aec_loopback_mux), | 506 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, |
507 | &wm5110_aec_loopback_mux), | ||
507 | 508 | ||
508 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, | 509 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, |
509 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), | 510 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), |
@@ -976,6 +977,8 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) | |||
976 | if (ret != 0) | 977 | if (ret != 0) |
977 | return ret; | 978 | return ret; |
978 | 979 | ||
980 | arizona_init_spk(codec); | ||
981 | |||
979 | snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); | 982 | snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); |
980 | 983 | ||
981 | priv->core.arizona->dapm = &codec->dapm; | 984 | priv->core.arizona->dapm = &codec->dapm; |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 1eb152cb1097..29e95f93d482 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -383,6 +383,8 @@ static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol, | |||
383 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 383 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
384 | int drc = wm8994_get_drc(kcontrol->id.name); | 384 | int drc = wm8994_get_drc(kcontrol->id.name); |
385 | 385 | ||
386 | if (drc < 0) | ||
387 | return drc; | ||
386 | ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc]; | 388 | ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc]; |
387 | 389 | ||
388 | return 0; | 390 | return 0; |
@@ -488,6 +490,9 @@ static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, | |||
488 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 490 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
489 | int block = wm8994_get_retune_mobile_block(kcontrol->id.name); | 491 | int block = wm8994_get_retune_mobile_block(kcontrol->id.name); |
490 | 492 | ||
493 | if (block < 0) | ||
494 | return block; | ||
495 | |||
491 | ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block]; | 496 | ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block]; |
492 | 497 | ||
493 | return 0; | 498 | return 0; |
@@ -1031,7 +1036,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
1031 | { | 1036 | { |
1032 | struct snd_soc_codec *codec = w->codec; | 1037 | struct snd_soc_codec *codec = w->codec; |
1033 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1038 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
1034 | struct wm8994 *control = codec->control_data; | 1039 | struct wm8994 *control = wm8994->wm8994; |
1035 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; | 1040 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; |
1036 | int i; | 1041 | int i; |
1037 | int dac; | 1042 | int dac; |
@@ -3831,8 +3836,14 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) | |||
3831 | ret); | 3836 | ret); |
3832 | } else if (!(ret & WM1811_JACKDET_LVL)) { | 3837 | } else if (!(ret & WM1811_JACKDET_LVL)) { |
3833 | dev_dbg(codec->dev, "Ignoring removed jack\n"); | 3838 | dev_dbg(codec->dev, "Ignoring removed jack\n"); |
3834 | return IRQ_HANDLED; | 3839 | goto out; |
3835 | } | 3840 | } |
3841 | } else if (!(reg & WM8958_MICD_STS)) { | ||
3842 | snd_soc_jack_report(wm8994->micdet[0].jack, 0, | ||
3843 | SND_JACK_MECHANICAL | SND_JACK_HEADSET | | ||
3844 | wm8994->btn_mask); | ||
3845 | wm8994->mic_detecting = true; | ||
3846 | goto out; | ||
3836 | } | 3847 | } |
3837 | 3848 | ||
3838 | if (wm8994->mic_detecting) | 3849 | if (wm8994->mic_detecting) |
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index 484b22c5df5d..fd7c45b9ed5a 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/platform_data/edma.h> | ||
17 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 56ecfc72f2e9..81490febac6d 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -631,7 +631,8 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev, | |||
631 | int word_length) | 631 | int word_length) |
632 | { | 632 | { |
633 | u32 fmt; | 633 | u32 fmt; |
634 | u32 rotate = (word_length / 4) & 0x7; | 634 | u32 tx_rotate = (word_length / 4) & 0x7; |
635 | u32 rx_rotate = (32 - word_length) / 4; | ||
635 | u32 mask = (1ULL << word_length) - 1; | 636 | u32 mask = (1ULL << word_length) - 1; |
636 | 637 | ||
637 | /* | 638 | /* |
@@ -655,9 +656,9 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev, | |||
655 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, | 656 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, |
656 | TXSSZ(fmt), TXSSZ(0x0F)); | 657 | TXSSZ(fmt), TXSSZ(0x0F)); |
657 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, | 658 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, |
658 | TXROT(rotate), TXROT(7)); | 659 | TXROT(tx_rotate), TXROT(7)); |
659 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG, | 660 | mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG, |
660 | RXROT(rotate), RXROT(7)); | 661 | RXROT(rx_rotate), RXROT(7)); |
661 | mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, | 662 | mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, |
662 | mask); | 663 | mask); |
663 | } | 664 | } |
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index b2f27c2e5fdc..8460edce1c3b 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/genalloc.h> | 19 | #include <linux/genalloc.h> |
20 | #include <linux/platform_data/edma.h> | ||
20 | 21 | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
diff --git a/sound/soc/davinci/davinci-pcm.h b/sound/soc/davinci/davinci-pcm.h index b6ef7039dd09..fbb710c76c08 100644 --- a/sound/soc/davinci/davinci-pcm.h +++ b/sound/soc/davinci/davinci-pcm.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/genalloc.h> | 15 | #include <linux/genalloc.h> |
16 | #include <linux/platform_data/davinci_asp.h> | 16 | #include <linux/platform_data/davinci_asp.h> |
17 | #include <mach/edma.h> | 17 | #include <linux/platform_data/edma.h> |
18 | 18 | ||
19 | struct davinci_pcm_dma_params { | 19 | struct davinci_pcm_dma_params { |
20 | int channel; /* sync dma channel ID */ | 20 | int channel; /* sync dma channel ID */ |
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 3853f7eb3f28..06a8000aa07b 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c | |||
@@ -220,8 +220,12 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream, | |||
220 | goto err; | 220 | goto err; |
221 | } | 221 | } |
222 | 222 | ||
223 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, | 223 | if (cstream->direction == SND_COMPRESS_PLAYBACK) |
224 | SND_SOC_DAPM_STREAM_START); | 224 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, |
225 | SND_SOC_DAPM_STREAM_START); | ||
226 | else | ||
227 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE, | ||
228 | SND_SOC_DAPM_STREAM_START); | ||
225 | 229 | ||
226 | /* cancel any delayed stream shutdown that is pending */ | 230 | /* cancel any delayed stream shutdown that is pending */ |
227 | rtd->pop_wait = 0; | 231 | rtd->pop_wait = 0; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index a80c883bb8be..c7051c457b75 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -55,7 +55,8 @@ static int dapm_up_seq[] = { | |||
55 | [snd_soc_dapm_clock_supply] = 1, | 55 | [snd_soc_dapm_clock_supply] = 1, |
56 | [snd_soc_dapm_micbias] = 2, | 56 | [snd_soc_dapm_micbias] = 2, |
57 | [snd_soc_dapm_dai_link] = 2, | 57 | [snd_soc_dapm_dai_link] = 2, |
58 | [snd_soc_dapm_dai] = 3, | 58 | [snd_soc_dapm_dai_in] = 3, |
59 | [snd_soc_dapm_dai_out] = 3, | ||
59 | [snd_soc_dapm_aif_in] = 3, | 60 | [snd_soc_dapm_aif_in] = 3, |
60 | [snd_soc_dapm_aif_out] = 3, | 61 | [snd_soc_dapm_aif_out] = 3, |
61 | [snd_soc_dapm_mic] = 4, | 62 | [snd_soc_dapm_mic] = 4, |
@@ -92,7 +93,8 @@ static int dapm_down_seq[] = { | |||
92 | [snd_soc_dapm_value_mux] = 9, | 93 | [snd_soc_dapm_value_mux] = 9, |
93 | [snd_soc_dapm_aif_in] = 10, | 94 | [snd_soc_dapm_aif_in] = 10, |
94 | [snd_soc_dapm_aif_out] = 10, | 95 | [snd_soc_dapm_aif_out] = 10, |
95 | [snd_soc_dapm_dai] = 10, | 96 | [snd_soc_dapm_dai_in] = 10, |
97 | [snd_soc_dapm_dai_out] = 10, | ||
96 | [snd_soc_dapm_dai_link] = 11, | 98 | [snd_soc_dapm_dai_link] = 11, |
97 | [snd_soc_dapm_clock_supply] = 12, | 99 | [snd_soc_dapm_clock_supply] = 12, |
98 | [snd_soc_dapm_regulator_supply] = 12, | 100 | [snd_soc_dapm_regulator_supply] = 12, |
@@ -419,7 +421,8 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
419 | case snd_soc_dapm_clock_supply: | 421 | case snd_soc_dapm_clock_supply: |
420 | case snd_soc_dapm_aif_in: | 422 | case snd_soc_dapm_aif_in: |
421 | case snd_soc_dapm_aif_out: | 423 | case snd_soc_dapm_aif_out: |
422 | case snd_soc_dapm_dai: | 424 | case snd_soc_dapm_dai_in: |
425 | case snd_soc_dapm_dai_out: | ||
423 | case snd_soc_dapm_hp: | 426 | case snd_soc_dapm_hp: |
424 | case snd_soc_dapm_mic: | 427 | case snd_soc_dapm_mic: |
425 | case snd_soc_dapm_spk: | 428 | case snd_soc_dapm_spk: |
@@ -820,7 +823,7 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
820 | switch (widget->id) { | 823 | switch (widget->id) { |
821 | case snd_soc_dapm_adc: | 824 | case snd_soc_dapm_adc: |
822 | case snd_soc_dapm_aif_out: | 825 | case snd_soc_dapm_aif_out: |
823 | case snd_soc_dapm_dai: | 826 | case snd_soc_dapm_dai_out: |
824 | if (widget->active) { | 827 | if (widget->active) { |
825 | widget->outputs = snd_soc_dapm_suspend_check(widget); | 828 | widget->outputs = snd_soc_dapm_suspend_check(widget); |
826 | return widget->outputs; | 829 | return widget->outputs; |
@@ -916,7 +919,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
916 | switch (widget->id) { | 919 | switch (widget->id) { |
917 | case snd_soc_dapm_dac: | 920 | case snd_soc_dapm_dac: |
918 | case snd_soc_dapm_aif_in: | 921 | case snd_soc_dapm_aif_in: |
919 | case snd_soc_dapm_dai: | 922 | case snd_soc_dapm_dai_in: |
920 | if (widget->active) { | 923 | if (widget->active) { |
921 | widget->inputs = snd_soc_dapm_suspend_check(widget); | 924 | widget->inputs = snd_soc_dapm_suspend_check(widget); |
922 | return widget->inputs; | 925 | return widget->inputs; |
@@ -1135,16 +1138,6 @@ static int dapm_generic_check_power(struct snd_soc_dapm_widget *w) | |||
1135 | return out != 0 && in != 0; | 1138 | return out != 0 && in != 0; |
1136 | } | 1139 | } |
1137 | 1140 | ||
1138 | static int dapm_dai_check_power(struct snd_soc_dapm_widget *w) | ||
1139 | { | ||
1140 | DAPM_UPDATE_STAT(w, power_checks); | ||
1141 | |||
1142 | if (w->active) | ||
1143 | return w->active; | ||
1144 | |||
1145 | return dapm_generic_check_power(w); | ||
1146 | } | ||
1147 | |||
1148 | /* Check to see if an ADC has power */ | 1141 | /* Check to see if an ADC has power */ |
1149 | static int dapm_adc_check_power(struct snd_soc_dapm_widget *w) | 1142 | static int dapm_adc_check_power(struct snd_soc_dapm_widget *w) |
1150 | { | 1143 | { |
@@ -2318,7 +2311,8 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, | |||
2318 | case snd_soc_dapm_clock_supply: | 2311 | case snd_soc_dapm_clock_supply: |
2319 | case snd_soc_dapm_aif_in: | 2312 | case snd_soc_dapm_aif_in: |
2320 | case snd_soc_dapm_aif_out: | 2313 | case snd_soc_dapm_aif_out: |
2321 | case snd_soc_dapm_dai: | 2314 | case snd_soc_dapm_dai_in: |
2315 | case snd_soc_dapm_dai_out: | ||
2322 | case snd_soc_dapm_dai_link: | 2316 | case snd_soc_dapm_dai_link: |
2323 | list_add(&path->list, &dapm->card->paths); | 2317 | list_add(&path->list, &dapm->card->paths); |
2324 | list_add(&path->list_sink, &wsink->sources); | 2318 | list_add(&path->list_sink, &wsink->sources); |
@@ -3129,10 +3123,12 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | |||
3129 | break; | 3123 | break; |
3130 | case snd_soc_dapm_adc: | 3124 | case snd_soc_dapm_adc: |
3131 | case snd_soc_dapm_aif_out: | 3125 | case snd_soc_dapm_aif_out: |
3126 | case snd_soc_dapm_dai_out: | ||
3132 | w->power_check = dapm_adc_check_power; | 3127 | w->power_check = dapm_adc_check_power; |
3133 | break; | 3128 | break; |
3134 | case snd_soc_dapm_dac: | 3129 | case snd_soc_dapm_dac: |
3135 | case snd_soc_dapm_aif_in: | 3130 | case snd_soc_dapm_aif_in: |
3131 | case snd_soc_dapm_dai_in: | ||
3136 | w->power_check = dapm_dac_check_power; | 3132 | w->power_check = dapm_dac_check_power; |
3137 | break; | 3133 | break; |
3138 | case snd_soc_dapm_pga: | 3134 | case snd_soc_dapm_pga: |
@@ -3152,9 +3148,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | |||
3152 | case snd_soc_dapm_clock_supply: | 3148 | case snd_soc_dapm_clock_supply: |
3153 | w->power_check = dapm_supply_check_power; | 3149 | w->power_check = dapm_supply_check_power; |
3154 | break; | 3150 | break; |
3155 | case snd_soc_dapm_dai: | ||
3156 | w->power_check = dapm_dai_check_power; | ||
3157 | break; | ||
3158 | default: | 3151 | default: |
3159 | w->power_check = dapm_always_on_check_power; | 3152 | w->power_check = dapm_always_on_check_power; |
3160 | break; | 3153 | break; |
@@ -3375,7 +3368,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, | |||
3375 | template.reg = SND_SOC_NOPM; | 3368 | template.reg = SND_SOC_NOPM; |
3376 | 3369 | ||
3377 | if (dai->driver->playback.stream_name) { | 3370 | if (dai->driver->playback.stream_name) { |
3378 | template.id = snd_soc_dapm_dai; | 3371 | template.id = snd_soc_dapm_dai_in; |
3379 | template.name = dai->driver->playback.stream_name; | 3372 | template.name = dai->driver->playback.stream_name; |
3380 | template.sname = dai->driver->playback.stream_name; | 3373 | template.sname = dai->driver->playback.stream_name; |
3381 | 3374 | ||
@@ -3393,7 +3386,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, | |||
3393 | } | 3386 | } |
3394 | 3387 | ||
3395 | if (dai->driver->capture.stream_name) { | 3388 | if (dai->driver->capture.stream_name) { |
3396 | template.id = snd_soc_dapm_dai; | 3389 | template.id = snd_soc_dapm_dai_out; |
3397 | template.name = dai->driver->capture.stream_name; | 3390 | template.name = dai->driver->capture.stream_name; |
3398 | template.sname = dai->driver->capture.stream_name; | 3391 | template.sname = dai->driver->capture.stream_name; |
3399 | 3392 | ||
@@ -3423,8 +3416,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card) | |||
3423 | 3416 | ||
3424 | /* For each DAI widget... */ | 3417 | /* For each DAI widget... */ |
3425 | list_for_each_entry(dai_w, &card->widgets, list) { | 3418 | list_for_each_entry(dai_w, &card->widgets, list) { |
3426 | if (dai_w->id != snd_soc_dapm_dai) | 3419 | switch (dai_w->id) { |
3420 | case snd_soc_dapm_dai_in: | ||
3421 | case snd_soc_dapm_dai_out: | ||
3422 | break; | ||
3423 | default: | ||
3427 | continue; | 3424 | continue; |
3425 | } | ||
3428 | 3426 | ||
3429 | dai = dai_w->priv; | 3427 | dai = dai_w->priv; |
3430 | 3428 | ||
@@ -3433,8 +3431,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card) | |||
3433 | if (w->dapm != dai_w->dapm) | 3431 | if (w->dapm != dai_w->dapm) |
3434 | continue; | 3432 | continue; |
3435 | 3433 | ||
3436 | if (w->id == snd_soc_dapm_dai) | 3434 | switch (w->id) { |
3435 | case snd_soc_dapm_dai_in: | ||
3436 | case snd_soc_dapm_dai_out: | ||
3437 | continue; | 3437 | continue; |
3438 | default: | ||
3439 | break; | ||
3440 | } | ||
3438 | 3441 | ||
3439 | if (!w->sname) | 3442 | if (!w->sname) |
3440 | continue; | 3443 | continue; |
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 73bb8eefa491..ccb6be4d658d 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -928,8 +928,13 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream, | |||
928 | /* Create any new FE <--> BE connections */ | 928 | /* Create any new FE <--> BE connections */ |
929 | for (i = 0; i < list->num_widgets; i++) { | 929 | for (i = 0; i < list->num_widgets; i++) { |
930 | 930 | ||
931 | if (list->widgets[i]->id != snd_soc_dapm_dai) | 931 | switch (list->widgets[i]->id) { |
932 | case snd_soc_dapm_dai_in: | ||
933 | case snd_soc_dapm_dai_out: | ||
934 | break; | ||
935 | default: | ||
932 | continue; | 936 | continue; |
937 | } | ||
933 | 938 | ||
934 | /* is there a valid BE rtd for this widget */ | 939 | /* is there a valid BE rtd for this widget */ |
935 | be = dpcm_get_be(card, list->widgets[i], stream); | 940 | be = dpcm_get_be(card, list->widgets[i], stream); |
@@ -2011,9 +2016,11 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) | |||
2011 | if (cpu_dai->driver->capture.channels_min) | 2016 | if (cpu_dai->driver->capture.channels_min) |
2012 | capture = 1; | 2017 | capture = 1; |
2013 | } else { | 2018 | } else { |
2014 | if (codec_dai->driver->playback.channels_min) | 2019 | if (codec_dai->driver->playback.channels_min && |
2020 | cpu_dai->driver->playback.channels_min) | ||
2015 | playback = 1; | 2021 | playback = 1; |
2016 | if (codec_dai->driver->capture.channels_min) | 2022 | if (codec_dai->driver->capture.channels_min && |
2023 | cpu_dai->driver->capture.channels_min) | ||
2017 | capture = 1; | 2024 | capture = 1; |
2018 | } | 2025 | } |
2019 | 2026 | ||