aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-06 19:27:06 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-06 19:27:06 -0400
commitd9b3e4c5156476a4baf0d7e0f47ba2816b4fff8e (patch)
treec0dc062c3e318b1b429b489bdbdda411e16053e2
parentfb631eae1f2171033327e1b9ab427d4a113dc179 (diff)
parentbaa8160382e2818179d025063697ce0a471ec48f (diff)
Merge branch 'for-2.6.39' into for-2.6.40
-rw-r--r--sound/soc/codecs/wm8994.c16
-rw-r--r--sound/soc/soc-core.c4
2 files changed, 19 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 03ef62462bab..b6d47e771519 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2977,20 +2977,36 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
2977 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 2977 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
2978 2978
2979 /* Latch volume updates (right only; we always do left then right). */ 2979 /* Latch volume updates (right only; we always do left then right). */
2980 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_LEFT_VOLUME,
2981 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
2980 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME, 2982 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME,
2981 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU); 2983 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
2984 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_LEFT_VOLUME,
2985 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
2982 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME, 2986 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME,
2983 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU); 2987 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
2988 snd_soc_update_bits(codec, WM8994_AIF2_DAC_LEFT_VOLUME,
2989 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
2984 snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME, 2990 snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME,
2985 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU); 2991 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
2992 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_LEFT_VOLUME,
2993 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
2986 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME, 2994 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME,
2987 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU); 2995 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
2996 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_LEFT_VOLUME,
2997 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
2988 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME, 2998 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME,
2989 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU); 2999 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
3000 snd_soc_update_bits(codec, WM8994_AIF2_ADC_LEFT_VOLUME,
3001 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
2990 snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME, 3002 snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME,
2991 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU); 3003 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
3004 snd_soc_update_bits(codec, WM8994_DAC1_LEFT_VOLUME,
3005 WM8994_DAC1_VU, WM8994_DAC1_VU);
2992 snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME, 3006 snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME,
2993 WM8994_DAC1_VU, WM8994_DAC1_VU); 3007 WM8994_DAC1_VU, WM8994_DAC1_VU);
3008 snd_soc_update_bits(codec, WM8994_DAC2_LEFT_VOLUME,
3009 WM8994_DAC2_VU, WM8994_DAC2_VU);
2994 snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME, 3010 snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME,
2995 WM8994_DAC2_VU, WM8994_DAC2_VU); 3011 WM8994_DAC2_VU, WM8994_DAC2_VU);
2996 3012
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1c7e82a4c808..f31afe9d4edd 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -629,6 +629,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
629 runtime->hw.rates |= codec_dai_drv->capture.rates; 629 runtime->hw.rates |= codec_dai_drv->capture.rates;
630 } 630 }
631 631
632 ret = -EINVAL;
632 snd_pcm_limit_hw_rates(runtime); 633 snd_pcm_limit_hw_rates(runtime);
633 if (!runtime->hw.rates) { 634 if (!runtime->hw.rates) {
634 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n", 635 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
@@ -640,7 +641,8 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
640 codec_dai->name, cpu_dai->name); 641 codec_dai->name, cpu_dai->name);
641 goto config_err; 642 goto config_err;
642 } 643 }
643 if (!runtime->hw.channels_min || !runtime->hw.channels_max) { 644 if (!runtime->hw.channels_min || !runtime->hw.channels_max ||
645 runtime->hw.channels_min > runtime->hw.channels_max) {
644 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n", 646 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
645 codec_dai->name, cpu_dai->name); 647 codec_dai->name, cpu_dai->name);
646 goto config_err; 648 goto config_err;