Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions tools/topology/topology2/platform/intel/deep-buffer-spk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Define {
SPEAKER_PCM_CORE_ID 0
}

Object.Pipeline.deepbuffer-playback [
{
index $DEEP_BUFFER_PIPELINE_ID_2
core_id $SPEAKER_PCM_CORE_ID

Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME_2
pcm_id $DEEP_BUFFER_PCM_ID_2
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME_2 Volume'
}
}
Object.Widget.pipeline.1 {
core $SPEAKER_PCM_CORE_ID
}
}
]

Object.PCM.pcm [
{
name $DEEP_BUFFER_PCM_NAME_2
id $DEEP_BUFFER_PCM_ID_2
direction playback
playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE

Object.Base.fe_dai.1 {
name "$DEEP_BUFFER_PCM_NAME_2"
}
Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME_2
formats 'S16_LE,S24_LE,S32_LE'
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
# (S16_LE, Stereo, 48KHz, DEEPBUFFER_FW_DMA_MS) * 2
#
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
}
}
]

Object.Base.route [
{
source $DEEP_BUFFER_PIPELINE_SRC_2
sink $DEEP_BUFFER_PIPELINE_SINK_2
}
{
source host-copier.$DEEP_BUFFER_PCM_ID_2.playback
sink gain.$DEEP_BUFFER_PIPELINE_ID_2.1
}
]
62 changes: 1 addition & 61 deletions tools/topology/topology2/platform/intel/deep-buffer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -164,65 +164,5 @@ Object.Base.route [

# Spawn another instance
IncludeByKey.DEEP_BUF_SPK {
"true" {
Define {
SPEAKER_PCM_CORE_ID 0
}

Object.Pipeline.deepbuffer-playback [
{
index $DEEP_BUFFER_PIPELINE_ID_2
core_id $SPEAKER_PCM_CORE_ID

Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME_2
pcm_id $DEEP_BUFFER_PCM_ID_2
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME_2 Volume'
}
}
Object.Widget.pipeline.1 {
core $SPEAKER_PCM_CORE_ID
}
}
]

Object.PCM.pcm [
{
name $DEEP_BUFFER_PCM_NAME_2
id $DEEP_BUFFER_PCM_ID_2
direction playback
playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE

Object.Base.fe_dai.1 {
name "$DEEP_BUFFER_PCM_NAME_2"
}
Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME_2
formats 'S16_LE,S24_LE,S32_LE'
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
# (S16_LE, Stereo, 48KHz, DEEPBUFFER_FW_DMA_MS) * 2
#
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
}
}
]

Object.Base.route [
{
source $DEEP_BUFFER_PIPELINE_SRC_2
sink $DEEP_BUFFER_PIPELINE_SINK_2
}
{
source host-copier.$DEEP_BUFFER_PCM_ID_2.playback
sink gain.$DEEP_BUFFER_PIPELINE_ID_2.1
}
]
}
"true" "platform/intel/deep-buffer-spk.conf"
}
21 changes: 21 additions & 0 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ Define {
SDW_SPK_ECHO_REF_PCM_ID 12
}

# include deep buffer config if buffer size is in 1 - 1000 ms.
IncludeByKey.PASSTHROUGH {
"false" {
IncludeByKey.DEEPBUFFER_FW_DMA_MS {
"([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|1000)" {
IncludeByKey.DEEP_BUF_SPK {
"true" {
#deep-buffer-spk.conf is included in deep-buffer.conf
#and deep-buffer.conf is included if SDW_JACK is true.
#Therefore, only include deep-buffer-spk.conf when
#SDW_JACK is false to avoid duplicated.
IncludeByKey.SDW_JACK {
"false" "platform/intel/deep-buffer-spk.conf"
}
}
}
}
}
}
}

Object.Dai.ALH [
{
dai_index 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
SDW_JACK_IN_STREAM=Capture-SimpleJack,NUM_HDMIS=0"

"cavs-sdw\;sof-sdca-1amp-id2\;NUM_SDW_AMP_LINKS=1,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0"
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true"

"cavs-sdw\;sof-sdca-2amp-id2\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0"
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true"

"cavs-sdw\;sof-sdca-3amp-id2\;NUM_SDW_AMP_LINKS=3,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0"
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true"

"cavs-sdw\;sof-sdca-4amp-id2\;NUM_SDW_AMP_LINKS=4,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0"
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true"

"cavs-sdw\;sof-sdca-mic-id4\;SDW_JACK=false,SDW_DMIC=1,NUM_HDMIS=0,\
SDW_DMIC_STREAM=Capture-SmartMic"
Expand Down