From 93495d3a754bc7492cfb27fd551180f0be9b6932 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 26 Oct 2025 15:38:17 +0200 Subject: [PATCH] spa: param: infer raw audio channels from position if unset The behavior before b8eeb2db45adfb was that spa_audio_info_raw_update() always sets audio.channels when audio.position is updated. The new behavior does not set audio.channels when parsing audio.position. This breaks things e.g. when combine-sink and loopback nodes are created with only audio.position specified. Restore the previous behavior. --- spa/include/spa/param/audio/raw-json.h | 1 + 1 file changed, 1 insertion(+) diff --git a/spa/include/spa/param/audio/raw-json.h b/spa/include/spa/param/audio/raw-json.h index c33a9310f..e83c4495b 100644 --- a/spa/include/spa/param/audio/raw-json.h +++ b/spa/include/spa/param/audio/raw-json.h @@ -78,6 +78,7 @@ spa_audio_info_raw_ext_update(struct spa_audio_info_raw *info, size_t size, max_position, &v) > 0) { if (v > max_position) return -ECHRNG; + info->channels = v; SPA_FLAG_CLEAR(info->flags, SPA_AUDIO_FLAG_UNPOSITIONED); } }