mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ASoC: pcm: Require both CODEC and CPU support when declaring stream caps
When declaring playback and capture capabilities check for both CODEC side and CPU side support rather than only checking for CODEC side support. While it is unusual some CPUs do have unidirectional DAIs. Reported-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e4aa937ec7
commit
056790923e
1 changed files with 4 additions and 2 deletions
|
@ -2011,9 +2011,11 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
|
||||||
if (cpu_dai->driver->capture.channels_min)
|
if (cpu_dai->driver->capture.channels_min)
|
||||||
capture = 1;
|
capture = 1;
|
||||||
} else {
|
} else {
|
||||||
if (codec_dai->driver->playback.channels_min)
|
if (codec_dai->driver->playback.channels_min &&
|
||||||
|
cpu_dai->driver->playback.channels_min)
|
||||||
playback = 1;
|
playback = 1;
|
||||||
if (codec_dai->driver->capture.channels_min)
|
if (codec_dai->driver->capture.channels_min &&
|
||||||
|
cpu_dai->driver->capture.channels_min)
|
||||||
capture = 1;
|
capture = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue