]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 20 May 2024 14:19:58 +0000 (16:19 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 27 May 2024 00:31:00 +0000 (01:31 +0100)
commit5d5dd9bb227a1bdbef5ec7d167ac65775d1b99dc
treefeaef83532296567500cf9cc3f007bbeddfead91
parent22ad2e3c21281802cd519454544009da7e7a8ea4
ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults

When constructing packets to DSP, the Audioreach code uses 'struct
audioreach_module_config' to configure parameters like number of
channels, bitrate, sample rate etc, but uses defaults for the channel
mapping.

Rework this code to copy the channel mapping from 'struct
audioreach_module_config', instead of using the default.  This requires
all callers to fill that structure: add missing initialization of
channel mapping.

Entire patch makes code more logical and easier to follow:
1. q6apm-dai and q6apm-lpass-dais code which allocates 'struct
   audioreach_module_config' initializes it fully, so fills both
   the number of channels and the channel mapping.
2. Audioreach code, which uses 'struct audioreach_module_config' when
   constructing packets, copies entire contents of passed config, not
   only pieces of it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240520-asoc-x1e80100-4-channel-mapping-v4-3-f657159b4aad@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/audioreach.c
sound/soc/qcom/qdsp6/audioreach.h
sound/soc/qcom/qdsp6/q6apm-dai.c
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c