mirror of https://github.com/thesofproject/sof.git
Tools: Topology: Make PGA token objects unique
This patch avoids the issue that topology .conf file after m4 processing can contain multiple same name objects playback_pga_conf for volume component tokens with possibly different settings. Alsatplg does not error from such input and it's not defined which impacs topology binary. The new naming is pga_conf_X and and_pga_tokens_X where X is the pipeline number. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
7fdd59844d
commit
b3b937eb3d
|
@ -29,11 +29,14 @@ C_CONTROLMIXER(Playback Volume, PIPELINE_ID,
|
||||||
# Volume configuration
|
# Volume configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Components and Buffers
|
# Components and Buffers
|
||||||
|
@ -44,7 +47,7 @@ W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||||
W_PCM_PLAYBACK(PCM_ID, Playback, 2, 0, SCHEDULE_CORE)
|
W_PCM_PLAYBACK(PCM_ID, Playback, 2, 0, SCHEDULE_CORE)
|
||||||
|
|
||||||
# "Volume" has 2 source and x sink periods
|
# "Volume" has 2 source and x sink periods
|
||||||
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Playback Volume"))
|
LIST(` ', "PIPELINE_ID Playback Volume"))
|
||||||
|
|
||||||
# Playback Buffers
|
# Playback Buffers
|
||||||
|
@ -84,3 +87,5 @@ W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDU
|
||||||
#
|
#
|
||||||
PCM_CAPABILITIES(Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)
|
PCM_CAPABILITIES(Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)
|
||||||
|
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
|
@ -52,11 +52,14 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
||||||
# Volume configuration
|
# Volume configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Components and Buffers
|
# Components and Buffers
|
||||||
|
@ -67,11 +70,11 @@ W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||||
W_PCM_PLAYBACK(PCM_ID, Low Latency Playback, 2, 0, SCHEDULE_CORE)
|
W_PCM_PLAYBACK(PCM_ID, Low Latency Playback, 2, 0, SCHEDULE_CORE)
|
||||||
|
|
||||||
# "Playback Volume" has 2 sink periods and 2 source periods for host ping-pong
|
# "Playback Volume" has 2 sink periods and 2 source periods for host ping-pong
|
||||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, 2, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
||||||
|
|
||||||
# "Master Playback Volume" has 2 source and x sink periods for DAI ping-pong
|
# "Master Playback Volume" has 2 source and x sink periods for DAI ping-pong
|
||||||
W_PGA(1, PIPELINE_FORMAT, DAI_PERIODS, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(1, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||||
|
|
||||||
# Mixer 0 has 2 sink and source periods.
|
# Mixer 0 has 2 sink and source periods.
|
||||||
|
@ -124,7 +127,8 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Low Latency Playback PCM_I
|
||||||
# PCM Configuration
|
# PCM Configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# PCM capabilities supported by FW
|
# PCM capabilities supported by FW
|
||||||
PCM_CAPABILITIES(Low Latency Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)
|
PCM_CAPABILITIES(Low Latency Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)
|
||||||
|
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
|
@ -38,11 +38,14 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
||||||
# Volume configuration
|
# Volume configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
# Mixer 0 has 2 sink and source periods.
|
# Mixer 0 has 2 sink and source periods.
|
||||||
W_MIXER(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE)
|
W_MIXER(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE)
|
||||||
|
@ -96,7 +99,7 @@ W_EQ_FIR(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE,
|
||||||
LIST(` ', "DEF_EQFIR_COEF"))
|
LIST(` ', "DEF_EQFIR_COEF"))
|
||||||
|
|
||||||
# "Master Playback Volume" has 2 source and x sink periods for DAI ping-pong
|
# "Master Playback Volume" has 2 source and x sink periods for DAI ping-pong
|
||||||
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -143,3 +146,5 @@ indir(`define', concat(`PIPELINE_MIXER_', PIPELINE_ID), N_MIXER(0))
|
||||||
|
|
||||||
undefine(`DEF_EQIIR_COEF')
|
undefine(`DEF_EQIIR_COEF')
|
||||||
undefine(`DEF_EQIIR_PRIV')
|
undefine(`DEF_EQIIR_PRIV')
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
|
@ -36,17 +36,20 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
||||||
# Volume configuration
|
# Volume configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
# Mixer 0 has 2 sink and source periods.
|
# Mixer 0 has 2 sink and source periods.
|
||||||
W_MIXER(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE)
|
W_MIXER(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE)
|
||||||
|
|
||||||
# "Master Playback Volume" has 2 source and x sink periods for DAI ping-pong
|
# "Master Playback Volume" has 2 source and x sink periods for DAI ping-pong
|
||||||
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -81,3 +84,5 @@ P_GRAPH(DAI_NAME, PIPELINE_ID,
|
||||||
indir(`define', concat(`PIPELINE_PLAYBACK_SCHED_COMP_', PIPELINE_ID), N_DAI_OUT)
|
indir(`define', concat(`PIPELINE_PLAYBACK_SCHED_COMP_', PIPELINE_ID), N_DAI_OUT)
|
||||||
indir(`define', concat(`PIPELINE_MIXER_', PIPELINE_ID), N_MIXER(0))
|
indir(`define', concat(`PIPELINE_MIXER_', PIPELINE_ID), N_MIXER(0))
|
||||||
|
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
|
@ -40,11 +40,14 @@ W_DATA(media_src_conf, media_src_tokens)
|
||||||
# Volume Configuration
|
# Volume Configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Components and Buffers
|
# Components and Buffers
|
||||||
|
@ -55,7 +58,7 @@ W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||||
W_PCM_PLAYBACK(PCM_ID, Media Playback, 2, 0, SCHEDULE_CORE)
|
W_PCM_PLAYBACK(PCM_ID, Media Playback, 2, 0, SCHEDULE_CORE)
|
||||||
|
|
||||||
# "Playback Volume" has 3 sink period and 2 source periods for host ping-pong
|
# "Playback Volume" has 3 sink period and 2 source periods for host ping-pong
|
||||||
W_PGA(0, PIPELINE_FORMAT, 3, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, 3, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
||||||
|
|
||||||
# "SRC 0" has 3 sink and source periods.
|
# "SRC 0" has 3 sink and source periods.
|
||||||
|
@ -127,3 +130,6 @@ SectionPCM.STR(Media Playback PCM_ID) {
|
||||||
capabilities STR(Media Playback PCM_ID)
|
capabilities STR(Media Playback PCM_ID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
|
@ -41,11 +41,14 @@ C_CONTROLMIXER(Tone Switch, PIPELINE_ID,
|
||||||
# Volume configuration
|
# Volume configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Components and Buffers
|
# Components and Buffers
|
||||||
|
@ -56,7 +59,7 @@ W_TONE(0, PIPELINE_FORMAT, 2, 0, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Tone Switch"))
|
LIST(` ', "PIPELINE_ID Tone Switch"))
|
||||||
|
|
||||||
# "Tone Volume" has 2 sink period and 2 source periods
|
# "Tone Volume" has 2 sink period and 2 source periods
|
||||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, 2, 2, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Tone Volume"))
|
LIST(` ', "PIPELINE_ID Tone Volume"))
|
||||||
|
|
||||||
# Low Latency Buffers
|
# Low Latency Buffers
|
||||||
|
@ -90,3 +93,6 @@ indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1))
|
||||||
#
|
#
|
||||||
|
|
||||||
W_PIPELINE(N_TONE(0), SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_tone_schedule_plat)
|
W_PIPELINE(N_TONE(0), SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_tone_schedule_plat)
|
||||||
|
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
|
@ -32,11 +32,14 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
|
||||||
# Volume configuration
|
# Volume configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
define(DEF_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
|
||||||
|
define(DEF_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
|
||||||
|
|
||||||
|
W_VENDORTUPLES(DEF_PGA_TOKENS, sof_volume_tokens,
|
||||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||||
|
|
||||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
W_DATA(DEF_PGA_CONF, DEF_PGA_TOKENS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Components and Buffers
|
# Components and Buffers
|
||||||
|
@ -47,7 +50,7 @@ W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||||
W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2, SCHEDULE_CORE)
|
W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2, SCHEDULE_CORE)
|
||||||
|
|
||||||
# "Volume" has x source and 2 sink periods
|
# "Volume" has x source and 2 sink periods
|
||||||
W_PGA(0, PIPELINE_FORMAT, 2, DAI_PERIODS, playback_pga_conf, SCHEDULE_CORE,
|
W_PGA(0, PIPELINE_FORMAT, 2, DAI_PERIODS, DEF_PGA_CONF, SCHEDULE_CORE,
|
||||||
LIST(` ', "PIPELINE_ID Master Capture Volume"))
|
LIST(` ', "PIPELINE_ID Master Capture Volume"))
|
||||||
|
|
||||||
# Capture Buffers
|
# Capture Buffers
|
||||||
|
@ -82,3 +85,6 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID
|
||||||
PCM_CAPABILITIES(Passthrough Capture PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT),
|
PCM_CAPABILITIES(Passthrough Capture PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT),
|
||||||
16000, 16000, PIPELINE_CHANNELS, PIPELINE_CHANNELS,
|
16000, 16000, PIPELINE_CHANNELS, PIPELINE_CHANNELS,
|
||||||
2, 16, 192, 16384, 65536, 65536)
|
2, 16, 192, 16384, 65536, 65536)
|
||||||
|
|
||||||
|
undefine(`DEF_PGA_TOKENS')
|
||||||
|
undefine(`DEF_PGA_CONF')
|
||||||
|
|
Loading…
Reference in New Issue