Skip to content

Commit

Permalink
Topology2: add more rates support for deep buffer jack
Browse files Browse the repository at this point in the history
Deep buffer should use the same rate as the original device.

Signed-off-by: Bard Liao <[email protected]>
  • Loading branch information
bardliao committed Nov 25, 2024
1 parent 5c0bee8 commit a18fc3d
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions tools/topology/topology2/platform/intel/deep-buffer.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Define {
DEEP_BUF_SPK false
DEEP_BUF_JACK_RATE 48000
}

Object.Pipeline.deepbuffer-playback [
Expand All @@ -9,12 +10,66 @@ Object.Pipeline.deepbuffer-playback [
Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME
pcm_id $DEEP_BUFFER_PCM_ID
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME Volume'
}
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
Object.Widget.mixin.1 {
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
]
Expand All @@ -41,6 +96,17 @@ Object.PCM.pcm [
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
IncludeByKey.DEEP_BUF_JACK_RATE {
"48000" {
rates '48000'
}
"96000" {
rates '96000'
}
"192000" {
rates '192000'
}
}
}
}
]
Expand Down

0 comments on commit a18fc3d

Please sign in to comment.