From: Mark Brown Date: Wed, 15 Jan 2014 11:48:13 +0000 (+0000) Subject: Merge remote-tracking branch 'asoc/topic/core' into asoc-next X-Git-Tag: next-20140116~57^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=50f0d8c1e38e46e8d864f3794ce3376438bae660;p=karo-tx-linux.git Merge remote-tracking branch 'asoc/topic/core' into asoc-next --- 50f0d8c1e38e46e8d864f3794ce3376438bae660 diff --cc sound/soc/soc-pcm.c index 891b9a9bcbf8,d70eecd9e168..e95ef9586723 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@@ -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 */