From ccf80dbdfcd758ac2f9737bc7151f4ce88072432 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 13 Mar 2024 16:04:58 +0200 Subject: [PATCH] Tools: Topology2: Use rate definition in dmic-generic.conf The added DMIC0_RATE allows to use the DAI, pipelines, and PCM with any supported rate for DMIC in range 8 - 96 kHz. E.g. configure DMIC0 to 96 kHz. There is no change to existing functionality with default 48 kHz rate. Signed-off-by: Seppo Ingalsuo --- .../platform/intel/dmic-generic.conf | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index c56b4f566..4a49533fe 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -9,6 +9,7 @@ Object.Dai.DMIC [ id $DMIC0_ID driver_version $DMIC_DRIVER_VERSION io_clk $DMIC_IO_CLK + sample_rate $DMIC0_RATE clk_min 500000 clk_max 4800000 unmute_ramp_time_ms 200 @@ -84,10 +85,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -97,10 +100,12 @@ IncludeByKey.PASSTHROUGH { ] Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -115,10 +120,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -128,10 +135,12 @@ IncludeByKey.PASSTHROUGH { ] Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -155,10 +164,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -168,10 +179,12 @@ IncludeByKey.PASSTHROUGH { ] Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -201,10 +214,12 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -215,10 +230,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -233,10 +250,12 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -247,10 +266,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -267,10 +288,12 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -281,10 +304,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -324,10 +349,12 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -338,10 +365,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -365,10 +394,12 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 2 Object.Base.input_audio_format [ { + in_rate $DMIC0_RATE in_bit_depth 32 in_valid_bit_depth 32 } { + in_rate $DMIC0_RATE in_channels 4 in_bit_depth 32 in_valid_bit_depth 32 @@ -379,10 +410,12 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 2 Object.Base.output_audio_format [ { + out_rate $DMIC0_RATE out_bit_depth 32 out_valid_bit_depth 32 } { + out_rate $DMIC0_RATE out_channels 4 out_bit_depth 32 out_valid_bit_depth 32 @@ -417,6 +450,8 @@ Object.PCM.pcm [ formats 'S32_LE' channels_min $NUM_DMICS channels_max $NUM_DMICS + rate_min $DMIC0_RATE + rate_max $DMIC0_RATE } } ]