From aaff3523144e91b00467575e9eed65cc1e087518 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Tue, 12 Dec 2023 16:18:40 +0200 Subject: [PATCH] topology1: pipe-volume-capture.m4: Set minimum number of channels to 2 Currently, the minimum number of channels for the capture PCM is set to the same value as the maximum number. This restricts the number of channels supported by the PCM to the maximum number. This is wrong if we want to allow arecord to work with multiple channel values. As such, follow the example of "pipe-volume-playback.m4" and introduce a new macro: LOCAL_CHANNELS_MIN. This will be set to "CHANNELS_MIN" if said macro is defined, otherwise it will be set to 2. Signed-off-by: Laurentiu Mihalcea --- tools/topology/topology1/sof/pipe-volume-capture.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/topology/topology1/sof/pipe-volume-capture.m4 b/tools/topology/topology1/sof/pipe-volume-capture.m4 index 17297b3d2f69..e208425bd55e 100644 --- a/tools/topology/topology1/sof/pipe-volume-capture.m4 +++ b/tools/topology/topology1/sof/pipe-volume-capture.m4 @@ -72,10 +72,13 @@ P_GRAPH(pipe-volume-capture, PIPELINE_ID, indir(`define', concat(`PIPELINE_SINK_', PIPELINE_ID), N_BUFFER(1)) indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID) +ifdef(`CHANNELS_MIN', `define(`LOCAL_CHANNELS_MIN', `CHANNELS_MIN')', +`define(`LOCAL_CHANNELS_MIN', `2')') + # # PCM Configuration # PCM_CAPABILITIES(Passthrough Capture PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), - PCM_MIN_RATE, PCM_MAX_RATE, PIPELINE_CHANNELS, PIPELINE_CHANNELS, + PCM_MIN_RATE, PCM_MAX_RATE, LOCAL_CHANNELS_MIN, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)