mirror of https://github.com/thesofproject/sof.git
Tools: Topology2: Add SRC component to cavs-nocodec.conf topologies
This patch adds 8 - 192 kHz playback and capture SRC to nocodec topologies such sof-tgl-nocodec.tplg. It enables testing of SRC component with IPC4 via the SSP loopback in the nocodec topologies E.g. Play random noise at 44.1 kHz and capture it as 32 kHz. The SSP loopback runs internally at 48 kHz. aplay -Dhw:0,2 -f S32_LE -c 2 -r 44100 -d 10 -t raw /dev/random arecord -Dhw:0,2 -f S16_LE -c 2 -r 32000 -d 10 /tmp/recording.wav Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
961e4a645d
commit
2a7a94d238
|
@ -18,6 +18,7 @@
|
||||||
<dai-kpb-be.conf>
|
<dai-kpb-be.conf>
|
||||||
<wov-detect.conf>
|
<wov-detect.conf>
|
||||||
<host-copier-gain-mixin-playback.conf>
|
<host-copier-gain-mixin-playback.conf>
|
||||||
|
<host-copier-gain-src-mixin-playback.conf>
|
||||||
<mixout-gain-dai-copier-playback.conf>
|
<mixout-gain-dai-copier-playback.conf>
|
||||||
<mixout-gain-smart-amp-dai-copier-playback.conf>
|
<mixout-gain-smart-amp-dai-copier-playback.conf>
|
||||||
<dai-copier-gain-module-copier-capture.conf>
|
<dai-copier-gain-module-copier-capture.conf>
|
||||||
|
@ -166,7 +167,7 @@ Object.Dai.SSP [
|
||||||
# Pipeline definitions
|
# Pipeline definitions
|
||||||
#
|
#
|
||||||
# PCM1 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP1
|
# PCM1 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP1
|
||||||
# PCM2 ---> gain ---> Mixin ---> Mixout ---> gain ---> SSP2
|
# PCM2 ---> gain ---> SRC ---> Mixin ---> Mixout ---> gain ---> SSP2
|
||||||
# PCM4 ---> gain ---> Mixin -------------------------->\
|
# PCM4 ---> gain ---> Mixin -------------------------->\
|
||||||
# PCM3 ---> gain ---> Mixin ---->\ \
|
# PCM3 ---> gain ---> Mixin ---->\ \
|
||||||
# PCM0 ---> gain ---> Mixin ---> Mixout ---> Mixin ---> Mixout ---> gain ---> smart_amp ---> SSP0
|
# PCM0 ---> gain ---> Mixin ---> Mixout ---> Mixin ---> Mixout ---> gain ---> smart_amp ---> SSP0
|
||||||
|
@ -174,7 +175,7 @@ Object.Dai.SSP [
|
||||||
# /---------------------------------------------------------------------->/
|
# /---------------------------------------------------------------------->/
|
||||||
# SSP0 ---> PCM0
|
# SSP0 ---> PCM0
|
||||||
# SSP1 ---> PCM1
|
# SSP1 ---> PCM1
|
||||||
# SSP2 ---> PCM2
|
# SSP2 ---> SRC ---> PCM2
|
||||||
|
|
||||||
IncludeByKey.PASSTHROUGH {
|
IncludeByKey.PASSTHROUGH {
|
||||||
"false" {
|
"false" {
|
||||||
|
@ -192,6 +193,9 @@ IncludeByKey.PASSTHROUGH {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
Object.Pipeline.host-copier-gain-src-mixin-playback [
|
||||||
{
|
{
|
||||||
index 5
|
index 5
|
||||||
|
|
||||||
|
@ -573,6 +577,14 @@ IncludeByKey.PASSTHROUGH {
|
||||||
pcm_id 0
|
pcm_id 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
index 11
|
||||||
|
|
||||||
|
Object.Widget.host-copier.1 {
|
||||||
|
stream_name 'SSP2 Capture'
|
||||||
|
pcm_id 2
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
Object.Pipeline.io-gateway-capture [
|
Object.Pipeline.io-gateway-capture [
|
||||||
|
@ -609,17 +621,6 @@ IncludeByKey.PASSTHROUGH {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.Pipeline.host-gateway-capture [
|
|
||||||
{
|
|
||||||
index 11
|
|
||||||
|
|
||||||
Object.Widget.host-copier.1 {
|
|
||||||
stream_name 'SSP2 Capture'
|
|
||||||
pcm_id 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
Object.Pipeline.io-gateway-capture [
|
Object.Pipeline.io-gateway-capture [
|
||||||
{
|
{
|
||||||
index 12
|
index 12
|
||||||
|
@ -644,6 +645,26 @@ Object.Pipeline.io-gateway-capture [
|
||||||
|
|
||||||
IncludeByKey.PASSTHROUGH {
|
IncludeByKey.PASSTHROUGH {
|
||||||
"false" {
|
"false" {
|
||||||
|
Object.Pipeline.host-gateway-capture [
|
||||||
|
{
|
||||||
|
index 11
|
||||||
|
|
||||||
|
Object.Widget.host-copier.1 {
|
||||||
|
stream_name 'SSP2 Capture'
|
||||||
|
pcm_id 2
|
||||||
|
|
||||||
|
<include/components/src_format_s32_to_sxx_convert.conf>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
Object.Widget.src.1 {
|
||||||
|
index 11
|
||||||
|
rate_in 48000
|
||||||
|
|
||||||
|
<include/components/src_format_s32_convert_from_48k.conf>
|
||||||
|
}
|
||||||
|
|
||||||
IncludeByKey.NUM_DMICS {
|
IncludeByKey.NUM_DMICS {
|
||||||
"[1-4]" {
|
"[1-4]" {
|
||||||
Object.Pipeline.gain-capture [
|
Object.Pipeline.gain-capture [
|
||||||
|
@ -786,26 +807,6 @@ Object.PCM.pcm [
|
||||||
formats 'S16_LE,S24_LE,S32_LE'
|
formats 'S16_LE,S24_LE,S32_LE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name "$SSP2_PCM_NAME"
|
|
||||||
id 2
|
|
||||||
direction "duplex"
|
|
||||||
Object.Base.fe_dai.1 {
|
|
||||||
name "$SSP2_PCM_NAME"
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.PCM.pcm_caps.1 {
|
|
||||||
direction "playback"
|
|
||||||
name "SSP2 Playback"
|
|
||||||
formats 'S16_LE,S24_LE,S32_LE'
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.PCM.pcm_caps.2 {
|
|
||||||
direction "capture"
|
|
||||||
name "SSP2 Capture"
|
|
||||||
formats 'S16_LE,S24_LE,S32_LE'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
IncludeByKey.PASSTHROUGH {
|
IncludeByKey.PASSTHROUGH {
|
||||||
|
@ -851,16 +852,60 @@ IncludeByKey.PASSTHROUGH {
|
||||||
channels_max $NUM_DMICS
|
channels_max $NUM_DMICS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name "$SSP2_PCM_NAME"
|
||||||
|
id 2
|
||||||
|
direction "duplex"
|
||||||
|
Object.Base.fe_dai.1 {
|
||||||
|
name "$SSP2_PCM_NAME"
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.PCM.pcm_caps.1 {
|
||||||
|
direction "playback"
|
||||||
|
name "SSP2 Playback"
|
||||||
|
formats 'S16_LE,S24_LE,S32_LE'
|
||||||
|
rate_min 8000
|
||||||
|
rate_max 192000
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.PCM.pcm_caps.2 {
|
||||||
|
direction "capture"
|
||||||
|
name "SSP2 Capture"
|
||||||
|
formats 'S16_LE,S24_LE,S32_LE'
|
||||||
|
rate_min 8000
|
||||||
|
rate_max 192000
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.Base.route [
|
IncludeByKey.PASSTHROUGH {
|
||||||
|
"true" {
|
||||||
|
Object.PCM.pcm [
|
||||||
{
|
{
|
||||||
source "dai-copier.SSP.NoCodec-2.capture"
|
name "$SSP2_PCM_NAME"
|
||||||
sink "host-copier.2.capture"
|
id 2
|
||||||
|
direction "duplex"
|
||||||
|
Object.Base.fe_dai.1 {
|
||||||
|
name "$SSP2_PCM_NAME"
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.PCM.pcm_caps.1 {
|
||||||
|
direction "playback"
|
||||||
|
name "SSP2 Playback"
|
||||||
|
formats 'S16_LE,S24_LE,S32_LE'
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.PCM.pcm_caps.2 {
|
||||||
|
direction "capture"
|
||||||
|
name "SSP2 Capture"
|
||||||
|
formats 'S16_LE,S24_LE,S32_LE'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IncludeByKey.PASSTHROUGH {
|
IncludeByKey.PASSTHROUGH {
|
||||||
"false" {
|
"false" {
|
||||||
|
@ -936,6 +981,14 @@ IncludeByKey.PASSTHROUGH {
|
||||||
source "gain.17.1"
|
source "gain.17.1"
|
||||||
sink "host-copier.$SSP0_CAPTURE_PCM_ID.capture"
|
sink "host-copier.$SSP0_CAPTURE_PCM_ID.capture"
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
source "dai-copier.SSP.NoCodec-2.capture"
|
||||||
|
sink "src.11.1"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
source "src.11.1"
|
||||||
|
sink "host-copier.2.capture"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
"true" {
|
"true" {
|
||||||
|
@ -952,6 +1005,10 @@ IncludeByKey.PASSTHROUGH {
|
||||||
source "host-copier.2.playback"
|
source "host-copier.2.playback"
|
||||||
sink "dai-copier.SSP.NoCodec-2.playback"
|
sink "dai-copier.SSP.NoCodec-2.playback"
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
source "dai-copier.SSP.NoCodec-2.capture"
|
||||||
|
sink "host-copier.2.capture"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue