From 2138f17308b630f593faa8d6ed6bb1f733e0c6a9 Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Wed, 21 Dec 2022 14:05:27 +0100 Subject: [PATCH] dmic: Fix to support Windows host DMIC node_id range This is a fix for a regression introduced by #6668. For an unknown reason (probably a bug) Linux and Windows hosts use different range of node_id for DMIC. The fix workarounds the problem adding support for both ranges. Signed-off-by: Serhiy Katsyuba --- src/audio/copier/copier.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/audio/copier/copier.c b/src/audio/copier/copier.c index 73b77feb7159..9bfee495190d 100644 --- a/src/audio/copier/copier.c +++ b/src/audio/copier/copier.c @@ -378,7 +378,11 @@ static int create_dai(struct comp_dev *parent_dev, struct copier_data *cd, break; case ipc4_dmic_link_input_class: - dai_index[dai_count - 1] = (dai_index[dai_count - 1] >> 5) & 0x7; + /* For some unknown reason Linux and Windows hosts use different range of node_id + * for DMIC. Let's workaround to support both ranges. + */ + if (dai_index[dai_count - 1] >= BIT(5)) + dai_index[dai_count - 1] = (dai_index[dai_count - 1] >> 5) & 0x7; dai.type = SOF_DAI_INTEL_DMIC; dai.is_config_blob = true; type = ipc4_gtw_dmic;