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
This commit is contained in:
SuperKali 2025-11-20 14:52:08 +00:00
parent bfb9af2594
commit 78c67d98f2

View file

@ -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);