sof/tools/topology/topology2/imx8-wm8960.conf

128 lines
2.3 KiB
Plaintext

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