From ea19554e8da0761fd6d57e4d951795a6bdd5f83c Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Fri, 5 Jul 2024 16:04:23 +0300 Subject: [PATCH] spa: alsa: recognize plug+a52 as a52 device strings HDMI/AC3 profiles use plug+a52 for a52 output, and should be handled like a52. --- spa/plugins/alsa/alsa-pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index fdc108bb9..3cd6577ad 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -2305,7 +2305,9 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_ state->max_delay = state->buffer_frames / 2; if (spa_strstartswith(state->props.device, "a52") || - spa_strstartswith(state->props.device, "dca")) + spa_strstartswith(state->props.device, "dca") || + (spa_strstartswith(state->props.device, "plug:") && + strstr(state->props.device, "a52:"))) state->min_delay = SPA_MIN(2048u, state->buffer_frames); else state->min_delay = 0;