forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add playback topology for i.MX8MP with wm8960 codec Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
- Loading branch information
1 parent
b398933
commit 3ab82dc
Showing
3 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,127 @@ | ||
## | ||
## Example topology for i.MX8MP board with 'CODEC' codec | ||
## | ||
## (source) host-copier.N.playback -> gain.N.1 -> dai-copier.SAI_DAI_INDEX(sink endpoint) | ||
## | ||
|
||
# Include paths | ||
<searchdir:include> | ||
<searchdir:include/common> | ||
<searchdir:include/components> | ||
<searchdir:include/controls> | ||
<searchdir:include/dais> | ||
<searchdir:include/pipelines> | ||
|
||
# Include class definitions | ||
<vendor-token.conf> | ||
<hw_config_simple.conf> | ||
<tokens.conf> | ||
<dai.conf> | ||
<data.conf> | ||
<pcm.conf> | ||
<pcm_caps.conf> | ||
<fe_dai.conf> | ||
<sai.conf> | ||
<manifest.conf> | ||
<route.conf> | ||
<pipeline.conf> | ||
<gain-playback.conf> | ||
<dai-copier.conf> | ||
<host-copier.conf> | ||
<common_definitions.conf> | ||
|
||
Define { | ||
HEADSET_PLAYBACK_PCM_STREAM_NAME "Headset Playback" | ||
HEADSET_PCM_NAME "Headset" | ||
HEADSET_PCM_ID 0 | ||
} | ||
|
||
# | ||
# Pipeline definitions | ||
# | ||
# (source) host.N.playback -> gain.N.1 | ||
# | ||
Object.Pipeline { | ||
gain-playback [ | ||
{ | ||
index 1 | ||
|
||
Object.Widget.host-copier.1 { | ||
stream_name $HEADSET_PLAYBACK_PCM_STREAM_NAME | ||
pcm_id $HEADSET_PCM_ID | ||
} | ||
|
||
Object.Widget.gain.1 { | ||
curve_type "windows_fade" | ||
Object.Control.mixer.1 { | ||
name 'Playback Volume' | ||
} | ||
} | ||
|
||
time_domain "dma" | ||
format "s32le" | ||
num_input_audio_formats 3 | ||
num_output_audio_formats 1 | ||
} | ||
] | ||
} | ||
|
||
Object.Widget { | ||
dai-copier."1" { | ||
dai_index $SAI_DAI_INDEX | ||
dai_type "SAI" | ||
copier_type "SAI" | ||
stream_name $STREAM_CODEC_NAME | ||
node_type $I2S_LINK_OUTPUT_CLASS | ||
type dai_in | ||
num_input_audio_formats 1 | ||
num_output_audio_formats 1 | ||
num_input_pins 1 | ||
direction "playback" | ||
|
||
# copier only supports one format based on mixin/mixout requirements: 32-bit 48KHz 2ch | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
} | ||
|
||
# PCM Definitions | ||
Object.PCM.pcm [ | ||
{ | ||
name $HEADSET_PCM_NAME | ||
direction "playback" | ||
id $HEADSET_PCM_ID | ||
|
||
Object.Base.fe_dai.1 { | ||
name "$HEADSET_PCM_NAME" | ||
} | ||
|
||
Object.PCM.pcm_caps.playback { | ||
name $HEADSET_PLAYBACK_PCM_STREAM_NAME | ||
formats 'S32_LE,S24_LE,S16_LE' | ||
} | ||
} | ||
] | ||
|
||
# Top-level pipeline connection | ||
# gain.1. -> dai.SAI.1.playback | ||
Object.Base.route [ | ||
{ | ||
source "host-copier.$HEADSET_PCM_ID.playback" | ||
sink "gain.1.1" | ||
} | ||
{ | ||
source "gain.1.1" | ||
sink "dai-copier.SAI.$STREAM_CODEC_NAME.playback" | ||
} | ||
] |
This file contains 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
This file contains 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,7 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
# Array of "input-file-name;output-file-name;comma separated pre-processor variables" | ||
list(APPEND TPLGS | ||
# IPC4 topology for i.MX8MP + WM8960 Codec | ||
"imx8-wm8960\;sof-imx8mp-wm8960\;SAI_DAI_INDEX=3,STREAM_CODEC_NAME=sai3-wm8960-hifi" | ||
) |