drm/bridge: ite-it66121: Disable HDMI audio capture stream
PATCH 1/1 drm/bridge: ite-it66121: Disable HDMI audio capture stream
The IT66121 is an HDMI transmitter and does not support audio capture. However, the driver registers hdmi-codec without setting no_i2s_capture, causing the codec to advertise a non-functional capture stream. Userspace audio servers such as PulseAudio then attempt to open this capture device, resulting in errors.
Set no_i2s_capture and no_spdif_capture in hdmi_codec_pdata so that the hdmi-codec driver only registers playback, matching the actual hardware capability.
--- drivers/gpu/drm/bridge/ite-it66121.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/bridge/ite-it66121.c +2 -0
@@ -1476,6 +1476,8 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev) .i2s = 1, /* Only i2s support for now */ .spdif = 0, .max_i2s_channels = 8, + .no_i2s_capture = 1, + .no_spdif_capture = 1, .no_capture_mute = 1, };
--
2.34.1
Quoted 9 lines · Sen Wang
The IT66121 is an HDMI transmitter and does not support audio capture. However, the driver registers hdmi-codec without setting
no_i2s_capture, causing the codec to advertise a non-functional capture stream. Userspace audio servers such as PulseAudio then attempt to open this capture device, resulting in errors.Set
no_i2s_captureandno_spdif_captureinhdmi_codec_pdataso that the hdmi-codec driver only registers playback, matching the actual hardware capability.
As you hopefully have the hardware, can I suggest instead porting the driver to HDMI helpers and HDMI audio helpers? The drm_connector_hdmi_audio_init() already sets thesse flags for you.
Quoted 21 lines
Signed-off-by Sen Wang <[email protected]>--- drivers/gpu/drm/bridge/ite-it66121.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/bridge/ite-it66121.c +2
-1@@ -1476,6 +1476,8 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev) .i2s = 1, /* Only i2s support for now */ .spdif = 0, .max_i2s_channels = 8, + .no_i2s_capture = 1, + .no_spdif_capture = 1, .no_capture_mute = 1, }; --2.34.1
Signature · 2 lines
With best wishes Dmitry
Quoted 7 lines · Dmitry Baryshkov
Quoted 6 lines · Sen Wang
The IT66121 is an HDMI transmitter and does not support audio capture. However, the driver registers hdmi-codec without setting
no_i2s_capture, causing the codec to advertise a non-functional capture stream. Userspace audio servers such as PulseAudio then attempt to open this capture device, resulting in errors.
Quoted 8 lines
Quoted 3 lines
Set
no_i2s_captureandno_spdif_captureinhdmi_codec_pdataso that the hdmi-codec driver only registers playback, matching the actual hardware capability.As you hopefully have the hardware, can I suggest instead porting the driver to HDMI helpers and HDMI audio helpers? The
drm_connector_hdmi_audio_init()already sets thesse flags for you.
Hi Dmitry,
Thanks for your feedback. I dug the code base a little bit more, and I sure can try to convert the legacy hdmi_codec_ops related APIs to the newer hdmi_audio funcs and test it out. Hopefully there won't be any regressions by this conversion.
Looks like I just need the following new drm_bridge_funcs:
.hdmi_audio_startup
.hdmi_audio_prepare
.hdmi_audio_shutdown
.hdmi_audio_mute_stream.
Please let me know if there's anything else to consider for the conversion, I'll take a stab at it and send a separate patch.
Best Regards,
Sen Wang
Quoted 22 lines
Quoted 21 lines
Signed-off-by Sen Wang <[email protected]>--- drivers/gpu/drm/bridge/ite-it66121.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/bridge/ite-it66121.c +2
-1@@ -1476,6 +1476,8 @@ static int it66121_audio_codec_init(struct it66121_ctx *ctx, struct device *dev) .i2s = 1, /* Only i2s support for now */ .spdif = 0, .max_i2s_channels = 8, + .no_i2s_capture = 1, + .no_spdif_capture = 1, .no_capture_mute = 1, }; --2.34.1