Merge remote-tracking branch 'asoc/topic/core' into asoc-next
authorMark Brown <broonie@linaro.org>
Thu, 2 Jan 2014 13:01:50 +0000 (13:01 +0000)
committerMark Brown <broonie@linaro.org>
Thu, 2 Jan 2014 13:01:50 +0000 (13:01 +0000)
1  2 
sound/soc/soc-core.c
sound/soc/soc-pcm.c

Simple merge
index 891b9a9bcbf885df92bad9007b3f23054ce68c18,10f29a0ad5a689d232fca9cb5ee1aa76cfa9f4c2..604e7e9a2ef8d9b1a5bdb53e8551e3fb159062e0
@@@ -249,7 -324,11 +331,10 @@@ static int soc_pcm_open(struct snd_pcm_
                        &cpu_dai_drv->capture);
        }
  
+       if (soc_pcm_has_symmetry(substream))
+               runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
        ret = -EINVAL;
 -      snd_pcm_limit_hw_rates(runtime);
        if (!runtime->hw.rates) {
                printk(KERN_ERR "ASoC: %s <-> %s No matching rates\n",
                        codec_dai->name, cpu_dai->name);
@@@ -604,9 -689,21 +695,22 @@@ static int soc_pcm_hw_free(struct snd_p
  
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
  
+       /* clear the corresponding DAIs parameters when going to be inactive */
+       if (cpu_dai->active == 1) {
+               cpu_dai->rate = 0;
+               cpu_dai->channels = 0;
+               cpu_dai->sample_bits = 0;
+       }
+       if (codec_dai->active == 1) {
+               codec_dai->rate = 0;
+               codec_dai->channels = 0;
+               codec_dai->sample_bits = 0;
+       }
        /* apply codec digital mute */
 -      if (!codec->active)
 +      if ((playback && codec_dai->playback_active == 1) ||
 +          (!playback && codec_dai->capture_active == 1))
                snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
  
        /* free any machine hw params */