From: Mark Brown Date: Tue, 7 Jan 2014 17:58:09 +0000 (+0000) Subject: Merge remote-tracking branch 'asoc/topic/core' into asoc-next X-Git-Tag: next-20140108~51^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2f30e031840e39974ebff7d8cd4ab397885e32ea;p=karo-tx-linux.git Merge remote-tracking branch 'asoc/topic/core' into asoc-next --- 2f30e031840e39974ebff7d8cd4ab397885e32ea 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 */