diff options
author | Markus Schneider-Pargmann <msp@baylibre.com> | 2022-09-01 12:41:41 +0800 |
---|---|---|
committer | Dmitry Osipenko <dmitry.osipenko@collabora.com> | 2022-09-04 15:31:59 +0300 |
commit | f89aa0b6db18dea3c3c8ef266cc6c9fd8dff2d72 (patch) | |
tree | e8e6a27c1647faa6d72964d2dd51f5c868e3b88f /include/linux/hdmi.h | |
parent | a2ce58e8f9e4cef389a04077d052f8135f380c5c (diff) | |
download | linux-stable-f89aa0b6db18dea3c3c8ef266cc6c9fd8dff2d72.tar.gz linux-stable-f89aa0b6db18dea3c3c8ef266cc6c9fd8dff2d72.tar.bz2 linux-stable-f89aa0b6db18dea3c3c8ef266cc6c9fd8dff2d72.zip |
video/hdmi: Add audio_infoframe packing for DP
Similar to HDMI, DP uses audio infoframes as well which are structured
very similar to the HDMI ones.
This patch adds a helper function to pack the HDMI audio infoframe for
DP, called hdmi_audio_infoframe_pack_for_dp().
hdmi_audio_infoframe_pack_only() is split into two parts. One of them
packs the payload only and can be used for HDMI and DP.
Also constify the frame parameter in hdmi_audio_infoframe_check() as
it is passed to hdmi_audio_infoframe_check_only() which expects a const.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220901044149.16782-3-rex-bc.chen@mediatek.com
Diffstat (limited to 'include/linux/hdmi.h')
-rw-r--r-- | include/linux/hdmi.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h index c8ec982ff498..2f4dcc8d060e 100644 --- a/include/linux/hdmi.h +++ b/include/linux/hdmi.h @@ -336,7 +336,12 @@ ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, void *buffer, size_t size); ssize_t hdmi_audio_infoframe_pack_only(const struct hdmi_audio_infoframe *frame, void *buffer, size_t size); -int hdmi_audio_infoframe_check(struct hdmi_audio_infoframe *frame); +int hdmi_audio_infoframe_check(const struct hdmi_audio_infoframe *frame); + +struct dp_sdp; +ssize_t +hdmi_audio_infoframe_pack_for_dp(const struct hdmi_audio_infoframe *frame, + struct dp_sdp *sdp, u8 dp_version); enum hdmi_3d_structure { HDMI_3D_STRUCTURE_INVALID = -1, |