From: Mark Brown Date: Thu, 2 Jan 2014 13:01:50 +0000 (+0000) Subject: Merge remote-tracking branch 'asoc/topic/core' into asoc-next X-Git-Tag: v3.14-rc1~16^2~11^2~38^2~4 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=729b47a007345d0af214f7f64a784c6bb3ad4832;p=cascardo%2Flinux.git Merge remote-tracking branch 'asoc/topic/core' into asoc-next --- 729b47a007345d0af214f7f64a784c6bb3ad4832 diff --cc sound/soc/soc-pcm.c index 891b9a9bcbf8,10f29a0ad5a6..604e7e9a2ef8 --- 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 */