Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology2: sof-mtl-rt5650: add SSP FMT 24 support #26

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
201 changes: 120 additions & 81 deletions tools/topology/topology2/cavs-mixin-mixout-eqiir-dts-ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object.Pipeline {

Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
pcm_id $HEADSET_PCM_ID
pcm_id $HEADSET_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand All @@ -26,7 +26,7 @@ Object.Pipeline {

Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
pcm_id $SPEAKER_PCM_ID
pcm_id $SPEAKER_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand All @@ -36,94 +36,133 @@ Object.Pipeline {
}
]

mixout-gain-eqiir-dts-dai-copier-playback [
{
index 2

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
}
mixout-gain-eqiir-dts-dai-copier-playback [
{
index 2

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
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))]"
}
]
}
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
}

Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'EQIIR2.0 eqiir_coef_2'
}
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
}

Object.Widget.dts.1 {
Object.Control.bytes."1" {
max 2048
name 'CODEC_ADAPTER2.0 DTS Codec Setup 2'
}
}
}
{
index 4
Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'EQIIR2.0 eqiir_coef_2'
}
}

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
}
Object.Widget.dts.1 {
Object.Control.bytes."1" {
max 2048
name 'CODEC_ADAPTER2.0 DTS Codec Setup 2'
}
}
}
{
index 4

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
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
}
]
}
}
}

Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'EQIIR1.0 eqiir_coef_1'
}
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}

Object.Widget.dts.1 {
Object.Control.bytes."1" {
max 2048
name 'CODEC_ADAPTER1.0 DTS Codec Setup 1'
}
}
Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'EQIIR1.0 eqiir_coef_1'
}
}

}
]
Object.Widget.dts.1 {
Object.Control.bytes."1" {
max 2048
name 'CODEC_ADAPTER1.0 DTS Codec Setup 1'
}
}
}
]
}

Object.Base.route [
{
source "gain.2.1"
sink "eqiir.2.1"
}
{
source "dts.2.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
{
source "gain.4.1"
sink "eqiir.4.1"
}
{
source "dts.4.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.3.1"
sink "mixout.4.1"
}
{
source "gain.2.1"
sink "eqiir.2.1"
}
{
source "dts.2.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
{
source "gain.4.1"
sink "eqiir.4.1"
}
{
source "dts.4.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.3.1"
sink "mixout.4.1"
}
]
140 changes: 90 additions & 50 deletions tools/topology/topology2/cavs-mixin-mixout-ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Object.Pipeline {

Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
pcm_id $HEADSET_PCM_ID
pcm_id $HEADSET_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand All @@ -27,7 +27,7 @@ Object.Pipeline {

Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
pcm_id $SPEAKER_PCM_ID
pcm_id $SPEAKER_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand All @@ -37,59 +37,99 @@ Object.Pipeline {
}
]

mixout-gain-dai-copier-playback [
{
index $HEADSET_DAI_PIPELINE_ID
mixout-gain-dai-copier-playback [
{
index $HEADSET_DAI_PIPELINE_ID

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
}
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))]"
}
]
}
"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 $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index $SPEAKER_DAI_PIPELINE_ID
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index $SPEAKER_DAI_PIPELINE_ID

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
}
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
}
]
}
}
}

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.Base.route [
{
source "gain.$HEADSET_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
}
{
source "gain.$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"
}
{
source "gain.$HEADSET_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
}
{
source "gain.$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"
}
]
Loading
Loading