]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ASoC: hdmi-codec: only startup/shutdown on supported streams
authorEmil Abildgaard Svendsen <EMAS@bang-olufsen.dk>
Thu, 9 Mar 2023 06:54:41 +0000 (06:54 +0000)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:43 +0000 (13:33 +0200)
commitdec3f4c6281acfa42b286bc2908faa2abbd8c4a9
tree170d3293dcb52f854019fdf6b9fa2f37fb26aab0
parent8c37d021b303966010338893b58ec5ebf85bd79f
ASoC: hdmi-codec: only startup/shutdown on supported streams

BugLink: https://bugs.launchpad.net/bugs/2016878
[ Upstream commit e041a2a550582106cba6a7c862c90dfc2ad14492 ]

Currently only one stream is supported. This isn't usally a problem
until you have a multi codec audio card. Because the audio card will run
startup and shutdown on both capture and playback streams. So if your
hdmi-codec only support either playback or capture. Then ALSA can't open
for playback and capture.

This patch will ignore if startup and shutdown are called with a non
supported stream. Thus, allowing an audio card like this:

           +-+
 cpu1 <--@-| |-> codec1 (HDMI-CODEC)
           | |<- codec2 (NOT HDMI-CODEC)
           +-+

Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk>
Link: https://lore.kernel.org/r/20230309065432.4150700-2-emas@bang-olufsen.dk
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
sound/soc/codecs/hdmi-codec.c