-
Notifications
You must be signed in to change notification settings - Fork 349
Audio: add CTC to PTL rt5682 path. #10696
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
Open
eddy1021
wants to merge
1
commit into
thesofproject:main
Choose a base branch
from
eddy1021:ctc_ptl_rt5682_2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
302 changes: 302 additions & 0 deletions
302
tools/topology/topology2/cavs-mixin-mixout-dax-ctc-ssp.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,302 @@ | ||
| # | ||
| # Pipeline definitions | ||
| # | ||
| # 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" | ||
| } | ||
|
|
||
| <include/pipelines/cavs/mixout-gain-dax-ctc-dai-copier-playback.conf> | ||
|
|
||
| # Pipeline ID:1 PCM ID: 0 | ||
| Object.Pipeline { | ||
| # playback pipelines | ||
| host-copier-gain-mixin-playback [ | ||
| { | ||
| index $HEADSET_HOST_PIPELINE_ID | ||
|
|
||
| Object.Widget.host-copier.1 { | ||
| stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' | ||
| pcm_id $HEADSET_PCM_ID | ||
| } | ||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume' | ||
| } | ||
| } | ||
| } | ||
| { | ||
| index $SPEAKER_HOST_PIPELINE_ID | ||
| core_id $SPEAKER_PCM_CORE_ID | ||
|
|
||
| Object.Widget.host-copier.1 { | ||
| stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' | ||
| pcm_id $SPEAKER_PCM_ID | ||
| } | ||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume' | ||
| } | ||
| } | ||
| Object.Widget.pipeline.1 { | ||
| core $SPEAKER_PCM_CORE_ID | ||
| } | ||
| } | ||
| ] | ||
|
|
||
| IncludeByKey.SSP_HEADSET_DAX { | ||
| "true" { | ||
| mixout-gain-dax-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 | ||
| 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' | ||
| } | ||
| } | ||
|
|
||
| Object.Widget.dolby-dax.1 { | ||
| core_id $DOLBY_DAX_CORE_ID | ||
| num_input_audio_formats 1 | ||
| num_output_audio_formats 1 | ||
| Object.Base.input_audio_format [ | ||
| { | ||
| in_rate 48000 | ||
| in_bit_depth 32 | ||
| in_valid_bit_depth 32 | ||
| ibs "$[(256 * ($[($in_bit_depth / 8)])) * ($in_channels)]" | ||
| } | ||
| ] | ||
| Object.Base.output_audio_format [ | ||
| { | ||
| out_rate 48000 | ||
| out_bit_depth 32 | ||
| out_valid_bit_depth 32 | ||
| obs "$[(256 * ($[($out_bit_depth / 8)])) * ($out_channels)]" | ||
| } | ||
| ] | ||
| Object.Control { | ||
| mixer."1" { | ||
| name 'DAX Headphone Switch' | ||
| } | ||
| mixer."2" { | ||
| name 'DAX Headphone Switch CP' | ||
| } | ||
| mixer."3" { | ||
| name 'DAX Headphone Switch CTC' | ||
| } | ||
| mixer."4" { | ||
| name 'DAX Headphone Volume' | ||
| } | ||
| enum."1" { | ||
| name 'DAX Headphone Profile' | ||
| } | ||
| enum."2" { | ||
| name 'DAX Headphone Device' | ||
| } | ||
| bytes."1" { | ||
| name 'DAX Headphone Tuning' | ||
| max 8192 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| "false" { | ||
| 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 | ||
| 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' | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| # For speaker, we want DAX -> CTC | ||
| mixout-gain-dax-ctc-dai-copier-playback [ | ||
| { | ||
| index $SPEAKER_DAI_PIPELINE_ID | ||
| core_id $SPEAKER_PCM_CORE_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 | ||
| 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.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 | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Object.Widget.ctc.1 { | ||
| Object.Control { | ||
| mixer."1" { | ||
| name 'CTC Switch' | ||
| } | ||
| bytes."1" { | ||
| name 'CTC.0' | ||
| max 4160 | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| core $SPEAKER_PCM_CORE_ID | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| IncludeByKey.SSP_HEADSET_DAX { | ||
| "true" { | ||
| Object.Base.route [ | ||
| { | ||
| source "dolby-dax.$HEADSET_DAI_PIPELINE_ID.1" | ||
| sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" | ||
| } | ||
| ] | ||
| } | ||
| "false" { | ||
| Object.Base.route [ | ||
| { | ||
| source "gain.$HEADSET_DAI_PIPELINE_ID.1" | ||
| sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| Object.Base.route [ | ||
| { | ||
| source "mixin.$HEADSET_HOST_PIPELINE_ID.1" | ||
| sink "mixout.$HEADSET_DAI_PIPELINE_ID.1" | ||
| } | ||
| { | ||
| 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" | ||
| } | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <cavs-rt5682.conf> | ||
|
|
||
| Define { | ||
| PLAYBACK_PIPELINE_SRC "none" | ||
| } | ||
|
|
||
| <cavs-mixin-mixout-dax-ctc-ssp.conf> | ||
|
|
||
| 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" | ||
| } | ||
| ] | ||
| } |
49 changes: 49 additions & 0 deletions
49
tools/topology/topology2/include/pipelines/cavs/mixout-gain-dax-ctc-dai-copier-playback.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # | ||
| # BE playback pipeline: mixout-gain-dax-ctc-dai-copier-playback. | ||
| # This pipeline is an extension of the mixout-gain-dax-dai-copier-playback pipeline class. | ||
| # | ||
|
|
||
| <include/components/ctc.conf> | ||
| <include/pipelines/cavs/mixout-gain-dax-dai-copier-playback.conf> | ||
|
|
||
| Class.Pipeline."mixout-gain-dax-ctc-dai-copier-playback" { | ||
| SubTreeCopy.baseclass { | ||
| # this class extends the mixout-gain-dax-dai-copier-playback class definition | ||
| source "Class.Pipeline.mixout-gain-dax-dai-copier-playback" | ||
|
|
||
| tree { | ||
| Object.Widget { | ||
| ctc."1" { | ||
| num_input_audio_formats 1 | ||
| num_output_audio_formats 1 | ||
|
|
||
| Object.Base.input_audio_format [ | ||
| { | ||
| in_rate 48000 | ||
| in_bit_depth 32 | ||
| in_valid_bit_depth 32 | ||
| ibs "$[(256 * ($[($in_bit_depth / 8)])) * ($in_channels)]" | ||
| } | ||
| ] | ||
| Object.Base.output_audio_format [ | ||
| { | ||
| out_rate 48000 | ||
| out_bit_depth 32 | ||
| out_valid_bit_depth 32 | ||
| obs "$[(256 * ($[($out_bit_depth / 8)])) * ($out_channels)]" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| Object.Base { | ||
| ! route [ | ||
| { | ||
| source dolby-dax.$index.1 | ||
| sink ctc.$index.1 | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,10 +188,18 @@ HDMI_IN_1_ID=0,HDMI_IN_2_ID=1" | |
| NHLT_BIN=nhlt-sof-ptl-tas2563-rt5682.bin,SPK_ID=6,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ | ||
| BT_NAME=SSP2-BT,BT_ID=7,BT_PCM_NAME=Bluetooth,DEEP_BUF_SPK=true" | ||
|
|
||
| "cavs-rt5682\;sof-ptl-tas2563-rt5682-ctc\;PLATFORM=ptl,NUM_DMICS=2,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,\ | ||
| NHLT_BIN=nhlt-sof-ptl-tas2563-rt5682-ctc.bin,SPK_ID=6,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\ | ||
| BT_NAME=SSP2-BT,BT_ID=7,BT_PCM_NAME=Bluetooth,DEEP_BUF_SPK=true,PLAYBACK_PIPELINE_SRC=ctc" | ||
|
|
||
| "cavs-rt5682\;sof-ptl-tas2563-rt5682-dax\;PLATFORM=ptl,NUM_DMICS=2,DMIC0_PCM_ID=99,\ | ||
| PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-tas2563-rt5682-dax.bin,SPK_ID=6,DEEPBUFFER_FW_DMA_MS=10,\ | ||
| INCLUDE_ECHO_REF=true,BT_NAME=SSP2-BT,BT_ID=7,BT_PCM_NAME=Bluetooth,DEEP_BUF_SPK=true,\ | ||
| PLAYBACK_PIPELINE_SRC=dax,DOLBY_DAX_CORE_ID=0" | ||
| "cavs-rt5682-dax-ctc\;sof-ptl-tas2563-rt5682-dax-ctc\;PLATFORM=ptl,NUM_DMICS=2,DMIC0_PCM_ID=99,\ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should keep using |
||
| PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-tas2563-rt5682-dax-ctc.bin,SPK_ID=6,DEEPBUFFER_FW_DMA_MS=10,\ | ||
| INCLUDE_ECHO_REF=true,BT_NAME=SSP2-BT,BT_ID=7,BT_PCM_NAME=Bluetooth,DEEP_BUF_SPK=true,\ | ||
| DOLBY_DAX_CORE_ID=0" | ||
|
|
||
| # Split topologies | ||
| "cavs-sdw\;sof-ptl-dmic-2ch-id2\;PLATFORM=ptl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\ | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge this into
cavs-mixin-maxout-dax-ssp.conf, useUSE_CTC_SPKto determine whether attaching CTC module or not