diff options
author | Mark Brown <broonie@kernel.org> | 2022-11-30 18:46:43 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-12-02 14:07:12 +0000 |
commit | f77a066f4ed307db93aafee621e2683c3bda98ce (patch) | |
tree | 562e97eb0d9732a0842affbe5860cc8f1a78f9ec /include/sound | |
parent | eb7081409f94a9a8608593d0fb63a1aa3d6f95d8 (diff) |
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>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/hdmi-codec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 48ad33aba393..9b162ac1e08e 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -124,7 +124,11 @@ struct hdmi_codec_ops { struct hdmi_codec_pdata { const struct hdmi_codec_ops *ops; uint i2s:1; + uint no_i2s_playback:1; + uint no_i2s_capture:1; uint spdif:1; + uint no_spdif_playback:1; + uint no_spdif_capture:1; int max_i2s_channels; void *data; }; |