From 36e0c091099dc731228c5f0c2a24e1ef66a053f7 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Wed, 6 Nov 2024 17:15:25 +0800 Subject: [PATCH] HACK: add 9.6KHz support for SDW jack Will remove turn the HACK to a reasonable change. Signed-off-by: Bard Liao --- .../platform/intel/sdw-jack-generic.conf | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index 756e327a5412..9dbd86e8a387 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -59,11 +59,49 @@ IncludeByKey.PASSTHROUGH { Object.Widget.host-copier.1 { stream_name "volume playback 0" pcm_id 0 + Object.Base.input_audio_format [ + { + in_rate 96000 + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_rate 96000 + in_bit_depth 32 + in_valid_bit_depth 32 + } + { + in_rate 96000 + in_bit_depth 32 + in_valid_bit_depth 24 + } + ] + Object.Base.output_audio_format [ + { + out_rate 96000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] } Object.Widget.gain.1 { Object.Control.mixer.1 { name 'Pre Mixer $JACK_PLAYBACK_PCM_NAME Playback Volume' + } + Object.Base.output_audio_format [ + { + out_rate 96000 + out_bit_depth 32 + out_valid_bit_depth 32 } + ] + Object.Base.output_audio_format [ + { + out_rate 96000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] } } ] @@ -78,14 +116,17 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 3 Object.Base.input_audio_format [ { + in_rate 96000 in_bit_depth 16 in_valid_bit_depth 16 } { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 24 } { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 32 } @@ -93,6 +134,7 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 1 Object.Base.output_audio_format [ { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth $SDW_LINK_VALID_BITS out_sample_type $SAMPLE_TYPE_MSB_INTEGER @@ -119,14 +161,17 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 3 Object.Base.input_audio_format [ { + in_rate 96000 in_bit_depth 16 in_valid_bit_depth 16 } { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 24 } { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 32 } @@ -134,14 +179,17 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 3 Object.Base.output_audio_format [ { + out_rate 96000 out_bit_depth 16 out_valid_bit_depth 16 } { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth 24 } { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth 32 } @@ -162,14 +210,17 @@ IncludeByKey.PASSTHROUGH { num_input_audio_formats 3 Object.Base.input_audio_format [ { + in_rate 96000 in_bit_depth 16 in_valid_bit_depth 16 } { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 24 } { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 32 } @@ -177,6 +228,7 @@ IncludeByKey.PASSTHROUGH { num_output_audio_formats 1 Object.Base.output_audio_format [ { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth $SDW_LINK_VALID_BITS out_sample_type $SAMPLE_TYPE_MSB_INTEGER @@ -207,6 +259,7 @@ Object.Pipeline.host-gateway-capture [ num_input_audio_formats 1 Object.Base.input_audio_format [ { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 32 } @@ -214,14 +267,17 @@ Object.Pipeline.host-gateway-capture [ num_output_audio_formats 3 Object.Base.output_audio_format [ { + out_rate 96000 out_bit_depth 16 out_valid_bit_depth 16 } { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth 24 } { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth 32 } @@ -245,6 +301,7 @@ Object.Widget { Object.Base.input_audio_format [ { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth $SDW_LINK_VALID_BITS in_sample_type $SAMPLE_TYPE_MSB_INTEGER @@ -253,6 +310,7 @@ Object.Widget { ] Object.Base.output_audio_format [ { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth 32 } @@ -277,12 +335,14 @@ Object.Widget { # the instance number is automatically generated as '0' Object.Base.input_audio_format [ { + in_rate 96000 in_bit_depth 32 in_valid_bit_depth 32 } ] Object.Base.output_audio_format [ { + out_rate 96000 out_bit_depth 32 out_valid_bit_depth 32 } @@ -312,6 +372,7 @@ Object.PCM.pcm [ Object.PCM.pcm_caps.1 { name "volume playback 0" formats 'S16_LE,S24_LE,S32_LE' + rates '48000,96000' } } { @@ -325,6 +386,7 @@ Object.PCM.pcm [ Object.PCM.pcm_caps.1 { name "Passthrough Capture 0" formats 'S16_LE,S24_LE,S32_LE' + rates '48000,96000' channels_min $SDW_JACK_CAPTURE_CH channels_max $SDW_JACK_CAPTURE_CH }