From c63b6406b4353fda5432528551072bfe4f17fbd2 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 6 Nov 2026 17:15:22 +0200 Subject: [PATCH] topology2: alh: add tuple_values for the direction attribute The ALH DAI class defines "direction" as a string attribute with token_ref "dai.word", but lacks the tuple_values mapping that other classes (dai, dai-copier, host-copier) use. As a result the string values "playback"/"capture" end up verbatim in a word tuple. Older alsa-lib converted such strings with strtoul() and silently encoded them as 0 (so capture links were also encoded as 0). Since alsa-lib commit c41be26af2d9 ("topology: use snd_config_get_llong() in tplg_get_integer/unsigned()"), non-numeric strings are rejected and the build of e.g. cavs-sdw.tplg fails with: ALSA lib data.c:866:(parse_tuple_set) [error.topology] tuple direction: Invalid argument Add tuple_values to map the direction strings to numeric values. Link: https://github.com/alsa-project/alsa-lib/commit/c41be26af2d9be9c32e215b151ea073347694e62 Signed-off-by: Kai Vehmanen --- tools/topology/topology2/include/dais/alh.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/topology/topology2/include/dais/alh.conf b/tools/topology/topology2/include/dais/alh.conf index 4f4908455cb6..b33577dacc08 100644 --- a/tools/topology/topology2/include/dais/alh.conf +++ b/tools/topology/topology2/include/dais/alh.conf @@ -38,6 +38,11 @@ Class.Dai."ALH" { "capture" "duplex" ] + !tuple_values [ + 0 + 1 + 2 + ] } }