Skip to content
Open
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
322 changes: 218 additions & 104 deletions tools/topology/topology2/cavs-mixin-mixout-dax-ssp.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#
# Pipeline definitions
#
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> SSP0
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> SSP1
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> CTC ----> SSP0
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> DAX ----> CTC ----> SSP1
#
# The gain before mixin is for the different routes(e.g., deepbuffer, headset).

Define {
DOLBY_DAX_CORE_ID 0
SSP_HEADSET_DAX "false"
USE_CTC_SPK "false"
}


# Pipeline ID:1 PCM ID: 0
Object.Pipeline {
# playback pipelines
Expand Down Expand Up @@ -52,31 +54,33 @@ Object.Pipeline {
mixout-gain-dax-dai-copier-playback [
{
index $HEADSET_DAI_PIPELINE_ID
stream_name "$HEADSET_CODEC_NAME"

Object.Widget.dai-copier.1 {
dai_index $HEADSET_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$HEADSET_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS

IncludeByKey.SSP_HS_FMT_24 {
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
}
Expand Down Expand Up @@ -128,24 +132,25 @@ Object.Pipeline {
copier_type "SSP"
stream_name "$HEADSET_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS

IncludeByKey.SSP_HS_FMT_24 {
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
}
Expand All @@ -160,80 +165,185 @@ Object.Pipeline {
}
}

mixout-gain-dax-dai-copier-playback [
{
index $SPEAKER_DAI_PIPELINE_ID
core_id $SPEAKER_PCM_CORE_ID
IncludeByKey.USE_CTC_SPK {
"true" {
mixout-gain-dax-ctc-dai-copier-playback [
{
index $SPEAKER_DAI_PIPELINE_ID
core_id $SPEAKER_PCM_CORE_ID
stream_name "$SPEAKER_CODEC_NAME"

Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
IncludeByKey.SSP_SPK_FMT_24 {
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS

IncludeByKey.SSP_SPK_FMT_24 {
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
]
}
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
]
}
}
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}

Object.Widget.dolby-dax.1 {
core_id $DOLBY_DAX_CORE_ID
Object.Control {
mixer."1" {
name 'DAX Speaker Switch'
}
mixer."2" {
name 'DAX Speaker Switch CP'
Object.Widget.dolby-dax.1 {
core_id $DOLBY_DAX_CORE_ID
Object.Control {
mixer."1" {
name 'DAX Speaker Switch'
}
mixer."2" {
name 'DAX Speaker Switch CP'
}
mixer."3" {
name 'DAX Speaker Switch CTC'
}
mixer."4" {
name 'DAX Speaker Volume'
}
enum."1" {
name 'DAX Speaker Profile'
}
enum."2" {
name 'DAX Speaker Device'
}
bytes."1" {
name 'DAX Speaker Tuning'
max 8192
}
}
}
mixer."3" {
name 'DAX Speaker Switch CTC'

Object.Widget.pipeline.1 {
core $SPEAKER_PCM_CORE_ID
}
mixer."4" {
name 'DAX Speaker Volume'
}
]
}
"false" {
mixout-gain-dax-dai-copier-playback [
{
index $SPEAKER_DAI_PIPELINE_ID
core_id $SPEAKER_PCM_CORE_ID
stream_name "$SPEAKER_CODEC_NAME"

Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS

IncludeByKey.SSP_SPK_FMT_24 {
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_LSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
}
enum."1" {
name 'DAX Speaker Profile'

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
enum."2" {
name 'DAX Speaker Device'

Object.Widget.dolby-dax.1 {
core_id $DOLBY_DAX_CORE_ID
Object.Control {
mixer."1" {
name 'DAX Speaker Switch'
}
mixer."2" {
name 'DAX Speaker Switch CP'
}
mixer."3" {
name 'DAX Speaker Switch CTC'
}
mixer."4" {
name 'DAX Speaker Volume'
}
enum."1" {
name 'DAX Speaker Profile'
}
enum."2" {
name 'DAX Speaker Device'
}
bytes."1" {
name 'DAX Speaker Tuning'
max 8192
}
}
}
bytes."1" {
name 'DAX Speaker Tuning'
max 8192

Object.Widget.pipeline.1 {
core $SPEAKER_PCM_CORE_ID
}
}
}

Object.Widget.pipeline.1 {
core $SPEAKER_PCM_CORE_ID
}
]
}
]
}
}

Object.Base.route [
{
source "dai-copier.SSP.$HEADSET_CODEC_NAME.capture"
sink "host-copier.$HEADSET_PCM_ID.capture"
}
{
source "host-copier.$HEADSET_PCM_ID.playback"
sink "gain.1.1"
}
{
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
}
{
source "host-copier.$SPEAKER_PCM_ID.playback"
sink "gain.3.1"
}
{
source "mixin.$SPEAKER_HOST_PIPELINE_ID.1"
sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1"
}
]

IncludeByKey.SSP_HEADSET_DAX {
"true" {
Object.Base.route [
Expand All @@ -253,17 +363,21 @@ IncludeByKey.SSP_HEADSET_DAX {
}
}

Object.Base.route [
{
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
}
{
source "dolby-dax.$SPEAKER_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
IncludeByKey.USE_CTC_SPK {
"true" {
Object.Base.route [
{
source "ctc.$SPEAKER_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
]
}
{
source "mixin.$SPEAKER_HOST_PIPELINE_ID.1"
sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1"
"false" {
Object.Base.route [
{
source "dolby-dax.$SPEAKER_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
]
}
]
}
Loading
Loading