topology2: cavs: use macro for PCM devices

The same 'Analog Playback' string is used for the copier stream_name
and PCM caps name. This is not a coincidence but a requirement to
match PCM and widgets. Same for 'Analog Capture'

Use a macro to make sure this 1:1 mapping is not broken.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
Pierre-Louis Bossart 2022-03-15 20:33:58 -05:00 committed by Liam Girdwood
parent 80c1cb0deb
commit e21649c109
1 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Define {
ANALOG_PLAYBACK_PCM 'Analog Playback'
ANALOG_CAPTURE_PCM 'Analog Capture'
}
Object.Dai {
HDA.0 {
name 'Analog Playback and Capture'
@ -34,7 +39,7 @@ Object.Pipeline {
stream_name 'copier.HDA.2.1'
}
Object.Widget.copier.1 {
stream_name 'Analog Playback'
stream_name $ANALOG_PLAYBACK_PCM
}
Object.Widget.gain.1 {
@ -52,7 +57,7 @@ Object.Pipeline {
stream_name 'copier.HDA.4.1'
}
Object.Widget.copier.1 {
stream_name 'Analog Capture'
stream_name $ANALOG_CAPTURE_PCM
}
Object.Widget.gain.1 {
@ -91,11 +96,11 @@ Object.PCM {
name 'HDA Analog'
Object.Base.fe_dai.'HDA Analog' {}
Object.PCM.pcm_caps.playback {
name 'Analog Playback'
name $ANALOG_PLAYBACK_PCM
formats 'S32_LE,S24_LE,S16_LE'
}
Object.PCM.pcm_caps.capture {
name 'Analog Capture'
name $ANALOG_CAPTURE_PCM
formats 'S32_LE,S24_LE,S16_LE'
}
direction duplex