]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core: use less strict tests for dailink capabilities
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 23 Jul 2020 18:05:33 +0000 (13:05 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 31 Jul 2020 18:06:51 +0000 (19:06 +0100)
commit56f455bbc43bbe1a547ed966d1a2182e9cb9c104
tree900e579c077247ceffbce37db68b22e285382de3
parent3cfe4ab69d5935fcd68318286a64f6b4b8c91e7f
ASoC: core: use less strict tests for dailink capabilities

Previous updates to set dailink capabilities and check dailink
capabilities were based on a flawed assumption that all dais support
the same capabilities as the dailink. This is true for TDM
configurations but existing configurations use an amplifier and a
capture device on the same dailink, and the tests would prevent the
card from probing.

This patch modifies the snd_soc_dai_link_set_capabilities()
helper so that the dpcm_playback (resp. dpcm_capture) dailink
capabilities are set if at least one dai supports playback (resp. capture).

Likewise the checks are modified so that an error is reported only
when dpcm_playback (resp. dpcm_capture) is set but none of the CPU
DAIs support playback (resp. capture).

Fixes: bb39a70c07a99 ('ASoC: soc-dai: set dai_link dpcm_ flags with a helper')
Fixes: 96094a591312c ('ASoC: soc-pcm: dpcm: fix playback/capture checks')
Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200723180533.220312-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dai.c
sound/soc/soc-pcm.c