Skip to content

Commit

Permalink
Topology2: sdw-jack-generic: add SDW_JACK_FMT_24 flag
Browse files Browse the repository at this point in the history
To indicate the SoundWire jack need to use 24 bit format.

Signed-off-by: Bard Liao <[email protected]>
  • Loading branch information
bardliao committed Oct 20, 2023
1 parent 32fdb1f commit 0cdb3e4
Showing 1 changed file with 65 additions and 20 deletions.
85 changes: 65 additions & 20 deletions tools/topology/topology2/platform/intel/sdw-jack-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ IncludeByKey.PASSTHROUGH {
}

Define {
JACK_PLAYBACK_PCM_NAME "Jack Out"
JACK_CAPTURE_PCM_NAME "Jack In"
JACK_PLAYBACK_PCM_NAME "Jack Out"
JACK_CAPTURE_PCM_NAME "Jack In"
SDW_JACK_FMT_24 "false"
}

#
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -150,21 +164,34 @@ IncludeByKey.PASSTHROUGH {
in_valid_bit_depth 32
}
]
num_output_audio_formats 3
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
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_bit_depth 32
out_valid_bit_depth 24
}
{
out_bit_depth 32
out_valid_bit_depth 32
"false" {
num_output_audio_formats 3
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
{
out_bit_depth 32
out_valid_bit_depth 24
}
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
]
}
}
]
pipeline [
Expand Down Expand Up @@ -253,12 +280,30 @@ Object.Widget {
num_output_audio_formats 1
num_output_pins 1

Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
IncludeByKey.SDW_JACK_FMT_24 {
"true" {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 24
}
]
}
"false" {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
}
}
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
]

Expand Down

0 comments on commit 0cdb3e4

Please sign in to comment.