From 78c67d98f221895336d41d8799b38eff6b6b7b4e Mon Sep 17 00:00:00 2001 From: SuperKali Date: Thu, 20 Nov 2025 14:52:08 +0000 Subject: [PATCH] ASoC: hdmi-codec: disable capture for HDMI-TX to fix mono audio HDMI-TX hardware is output-only but the driver incorrectly advertises capture capability. This causes PulseAudio to attempt opening capture streams, which triggers busy flag conflicts with playback streams, resulting in mono audio output. Solution: Disable capture support by setting channels_min/max to 0 for both I2S and SPDIF DAIs when used with HDMI-TX. Note: Mainline kernel has the same issue. An official fix is planned with the new HDMI Codec Framework being developed by Linaro (2025). Fixes mono audio on: RK3576 NanoPi R76S, NanoPi M5 Tested-on: NanoPi R76S --- sound/soc/codecs/hdmi-codec.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 2849ea39efc8..f3b9a7de344a 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -1110,11 +1110,22 @@ static int hdmi_codec_probe(struct platform_device *pdev) if (hcd->i2s) { daidrv[i] = hdmi_i2s_dai; daidrv[i].playback.channels_max = hcd->max_i2s_channels; + /* Disable capture for HDMI-TX (output only) to prevent + * PulseAudio from trying to open capture streams which + * causes "Only one simultaneous stream supported!" errors + * and results in mono audio output. + */ + daidrv[i].capture.channels_min = 0; + daidrv[i].capture.channels_max = 0; i++; } - if (hcd->spdif) + if (hcd->spdif) { daidrv[i] = hdmi_spdif_dai; + /* Disable capture for HDMI-TX SPDIF (output only) */ + daidrv[i].capture.channels_min = 0; + daidrv[i].capture.channels_max = 0; + } dev_set_drvdata(dev, hcp);