aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-05-29 06:52:16 -0400
committerTakashi Iwai <tiwai@suse.de>2013-05-29 06:52:16 -0400
commit8a90bb5116889e98008fbc8178fc2a77bb51df4a (patch)
tree210b6755c9ae2d0d66a79f8696469ab50b7621ad /sound
parentd47333ddb234dbc661ab2a4fe019758bd33ba33b (diff)
parent1ab9ecc24819a8cf8ee982aaf6fb83298f094b0d (diff)
Merge tag 'asoc-v3.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v3.10 A series of driver specific updates, none particularly critical, plus one fix to the compressed API code to handle capture streams properly which is very safe for mainline as there's no current users.
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs42l52.c8
-rw-r--r--sound/soc/codecs/cs42l52.h2
-rw-r--r--sound/soc/codecs/max98090.c2
-rw-r--r--sound/soc/codecs/wm5110.c4
-rw-r--r--sound/soc/codecs/wm8994.c12
-rw-r--r--sound/soc/davinci/davinci-mcasp.c7
-rw-r--r--sound/soc/fsl/imx-ssi.c6
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c5
-rw-r--r--sound/soc/soc-compress.c8
9 files changed, 30 insertions, 24 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 0f6f481cec09..030f53c96ec0 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 */
@@ -225,7 +225,7 @@ static const char * const mic_bias_level_text[] = {
225}; 225};
226 226
227static const struct soc_enum mic_bias_level_enum = 227static const struct soc_enum mic_bias_level_enum =
228 SOC_ENUM_SINGLE(CS42L52_IFACE_CTL1, 0, 228 SOC_ENUM_SINGLE(CS42L52_IFACE_CTL2, 0,
229 ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text); 229 ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text);
230 230
231static const char * const cs42l52_mic_text[] = { "Single", "Differential" }; 231static const char * const cs42l52_mic_text[] = { "Single", "Differential" };
@@ -413,7 +413,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
413 SOC_ENUM("Headphone Analog Gain", hp_gain_enum), 413 SOC_ENUM("Headphone Analog Gain", hp_gain_enum),
414 414
415 SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, 415 SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL,
416 CS42L52_SPKB_VOL, 7, 0x1, 0xff, hl_tlv), 416 CS42L52_SPKB_VOL, 0, 0x1, 0xff, hl_tlv),
417 417
418 SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, 418 SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL,
419 CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv), 419 CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv),
@@ -441,7 +441,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
441 441
442 SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", 442 SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume",
443 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 443 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL,
444 6, 0x7f, 0x19, hl_tlv), 444 0, 0x7f, 0x19, hl_tlv),
445 SOC_DOUBLE_R("PCM Mixer Switch", 445 SOC_DOUBLE_R("PCM Mixer Switch",
446 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), 446 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1),
447 447
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/wm5110.c b/sound/soc/codecs/wm5110.c
index 731884e04776..ba38f0679662 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),
190ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE), 190ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE),
191ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE), 191ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE),
192ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE), 192ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE),
193ARIZONA_MIXER_CONTROLS("DSP5R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE), 193ARIZONA_MIXER_CONTROLS("DSP4R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE),
194 194
195ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE), 195ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE),
196ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE), 196ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE),
@@ -976,6 +976,8 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
976 if (ret != 0) 976 if (ret != 0)
977 return ret; 977 return ret;
978 978
979 arizona_init_spk(codec);
980
979 snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); 981 snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
980 982
981 priv->core.arizona->dapm = &codec->dapm; 983 priv->core.arizona->dapm = &codec->dapm;
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1eb152cb1097..dfd997aaadfc 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;
@@ -3833,6 +3838,11 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3833 dev_dbg(codec->dev, "Ignoring removed jack\n"); 3838 dev_dbg(codec->dev, "Ignoring removed jack\n");
3834 return IRQ_HANDLED; 3839 return IRQ_HANDLED;
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 goto out;
3836 } 3846 }
3837 3847
3838 if (wm8994->mic_detecting) 3848 if (wm8994->mic_detecting)
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/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 902fab02b851..c6fa03e2114a 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -540,11 +540,6 @@ static int imx_ssi_probe(struct platform_device *pdev)
540 clk_prepare_enable(ssi->clk); 540 clk_prepare_enable(ssi->clk);
541 541
542 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 542 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
543 if (!res) {
544 ret = -ENODEV;
545 goto failed_get_resource;
546 }
547
548 ssi->base = devm_ioremap_resource(&pdev->dev, res); 543 ssi->base = devm_ioremap_resource(&pdev->dev, res);
549 if (IS_ERR(ssi->base)) { 544 if (IS_ERR(ssi->base)) {
550 ret = PTR_ERR(ssi->base); 545 ret = PTR_ERR(ssi->base);
@@ -633,7 +628,6 @@ failed_pdev_fiq_alloc:
633 snd_soc_unregister_component(&pdev->dev); 628 snd_soc_unregister_component(&pdev->dev);
634failed_register: 629failed_register:
635 release_mem_region(res->start, resource_size(res)); 630 release_mem_region(res->start, resource_size(res));
636failed_get_resource:
637 clk_disable_unprepare(ssi->clk); 631 clk_disable_unprepare(ssi->clk);
638failed_clk: 632failed_clk:
639 633
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index befe68f59285..4c9dad3263c5 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -471,11 +471,6 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
471 dev_set_drvdata(&pdev->dev, priv); 471 dev_set_drvdata(&pdev->dev, priv);
472 472
473 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 473 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
474 if (!mem) {
475 dev_err(&pdev->dev, "platform_get_resource failed\n");
476 return -ENXIO;
477 }
478
479 priv->io = devm_ioremap_resource(&pdev->dev, mem); 474 priv->io = devm_ioremap_resource(&pdev->dev, mem);
480 if (IS_ERR(priv->io)) 475 if (IS_ERR(priv->io))
481 return PTR_ERR(priv->io); 476 return PTR_ERR(priv->io);
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;