ASoC: hdmi-codec: Allow playback and capture to be disabled
authorMark Brown <broonie@kernel.org>
Wed, 30 Nov 2022 18:46:43 +0000 (18:46 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 2 Dec 2022 14:07:12 +0000 (14:07 +0000)
commitf77a066f4ed307db93aafee621e2683c3bda98ce
tree562e97eb0d9732a0842affbe5860cc8f1a78f9ec
parenteb7081409f94a9a8608593d0fb63a1aa3d6f95d8
ASoC: hdmi-codec: Allow playback and capture to be disabled

Currently the hdmi-codec driver always registers both playback and capture
capabilities but for most systems there's no actual capture capability,
usually HDMI is transmit only. Provide platform data which allows the users
to indicate what is supported so that we don't end up advertising things
to userspace that we can't actually support.

In order to avoid breaking existing users the flags in platform data are
a bit awkward and specify what should be disabled rather than doing the
perhaps more expected thing and defaulting to not supporting capture.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20221130184644.464820-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/hdmi-codec.h
sound/soc/codecs/hdmi-codec.c