topology2: sdw-jack-generic: add SDW_JACK_FMT_24 flag

To indicate the SoundWire jack need to use 24 bit format.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
This commit is contained in:
Bard Liao 2023-10-20 09:04:01 +08:00 committed by Kai Vehmanen
parent a83db6b428
commit ba65fb61ed
1 changed files with 69 additions and 26 deletions

View File

@ -10,6 +10,7 @@ IncludeByKey.PASSTHROUGH {
Define {
JACK_PLAYBACK_PCM_NAME "Jack Out"
JACK_CAPTURE_PCM_NAME "Jack In"
SDW_JACK_FMT_24 "false"
}
#
@ -75,6 +76,19 @@ IncludeByKey.PASSTHROUGH {
Object.Widget.alh-copier.1 {
stream_name $SDW_JACK_OUT_STREAM
node_type $ALH_LINK_OUTPUT_CLASS
IncludeByKey.SDW_JACK_FMT_24 {
"true" {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256)) | ($out_sample_type * 65536)]"
}
]
}
}
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
@ -156,6 +170,19 @@ IncludeByKey.PASSTHROUGH {
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
IncludeByKey.SDW_JACK_FMT_24 {
"true" {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
"false" {
num_output_audio_formats 3
Object.Base.output_audio_format [
{
@ -178,6 +205,8 @@ IncludeByKey.PASSTHROUGH {
}
]
}
}
}
]
pipeline [
{
@ -294,6 +323,18 @@ Object.Widget {
num_output_audio_formats 1
num_output_pins 1
IncludeByKey.SDW_JACK_FMT_24 {
"true" {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 24
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
}
"false" {
Object.Base.input_audio_format [
{
in_bit_depth 32
@ -302,6 +343,8 @@ Object.Widget {
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
}
}
Object.Base.output_audio_format [
{
out_bit_depth 32