Skip to content

Commit

Permalink
topology1: pipe-volume-capture.m4: Set minimum number of channels to 2
Browse files Browse the repository at this point in the history
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 <laurentiu.mihalcea@nxp.com>
  • Loading branch information
LaurentiuM1234 authored and kv2019i committed Dec 13, 2023
1 parent d661aad commit aaff352
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/topology/topology1/sof/pipe-volume-capture.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit aaff352

Please sign in to comment.