mirror of https://github.com/thesofproject/sof.git
Topology: Add volume ramp tokens into topologies
This patch adds volume configuration tokens as fifth parameter for pga.m. All the topologies those use W_PGA() are updated to use a linear (type=0) ramp with length of 250 ms. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
a81ce180ca
commit
7dd76db0a8
|
@ -33,9 +33,10 @@ define(`W_PGA',
|
|||
` data ['
|
||||
` "'N_PGA($1)`_data_w"'
|
||||
` "'N_PGA($1)`_data_str"'
|
||||
` "'$5`"'
|
||||
` ]'
|
||||
` mixer ['
|
||||
$5
|
||||
$6
|
||||
` ]'
|
||||
|
||||
`}')
|
||||
|
|
|
@ -29,6 +29,16 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
|||
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
|
||||
|
||||
|
||||
#
|
||||
# Volume configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
# Use coefficients for flat frequency response
|
||||
include(`eq_iir_coef_flat.m4')
|
||||
|
||||
|
@ -62,7 +72,7 @@ C_CONTROLBYTES(EQFIR, PIPELINE_ID,
|
|||
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0)
|
||||
|
||||
# "Volume" has 2 source and 2 sink periods
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
|
||||
# "EQ 0" has 2 sink period and 2 source periods
|
||||
W_EQ_IIR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "EQIIR"))
|
||||
|
|
|
@ -23,6 +23,16 @@ C_CONTROLMIXER(PCM PCM_ID Capture Volume, PIPELINE_ID,
|
|||
Channel register and shift for Front Left/Right,
|
||||
LIST(` ', KCONTROL_CHANNEL(FL, 0, 0), KCONTROL_CHANNEL(FR, 0, 1)))
|
||||
|
||||
#
|
||||
# Volume configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(capture_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(capture_pga_conf, capture_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -32,7 +42,7 @@ C_CONTROLMIXER(PCM PCM_ID Capture Volume, PIPELINE_ID,
|
|||
W_PCM_CAPTURE(PCM_ID, Low Latency Capture, 0, 2)
|
||||
|
||||
# "Capture Volume" has 2 sink and source periods for host and DAI ping-pong
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID PCM PCM_ID Capture Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, capture_pga_conf, LIST(` ', "PIPELINE_ID PCM PCM_ID Capture Volume"))
|
||||
|
||||
# Capture Buffers
|
||||
W_BUFFER(0, COMP_BUFFER_SIZE(2,
|
||||
|
|
|
@ -48,6 +48,16 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
|||
Channel register and shift for Front Left/Right,
|
||||
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
|
||||
|
||||
#
|
||||
# Volume configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -57,10 +67,10 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
|||
W_PCM_PLAYBACK(PCM_ID, Low Latency Playback, 2, 0)
|
||||
|
||||
# "Playback Volume" has 2 sink periods and 2 source periods for host ping-pong
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
||||
|
||||
# "Master Playback Volume" has 2 source and 2 sink periods for DAI ping-pong
|
||||
W_PGA(1, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
W_PGA(1, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
|
||||
# Mixer 0 has 2 sink and source periods.
|
||||
W_MIXER(0, PIPELINE_FORMAT, 2, 2)
|
||||
|
|
|
@ -36,6 +36,16 @@ W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OU
|
|||
|
||||
W_DATA(media_src_conf, media_src_tokens)
|
||||
|
||||
#
|
||||
# Volume Configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -45,7 +55,7 @@ W_DATA(media_src_conf, media_src_tokens)
|
|||
W_PCM_PLAYBACK(PCM_ID, Media Playback, 2, 0)
|
||||
|
||||
# "Playback Volume" has 2 sink period and 2 source periods for host ping-pong
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID PCM PCM_ID Playback Volume"))
|
||||
|
||||
# "SRC 0" has 2 sink and source periods.
|
||||
W_SRC(0, PIPELINE_FORMAT, 2, 2, media_src_conf)
|
||||
|
|
|
@ -45,8 +45,19 @@ W_DATA(media_src_conf, media_src_tokens)
|
|||
# "SRC" has 3 source and 3 sink periods
|
||||
W_SRC(0, PIPELINE_FORMAT, 3, 3, media_src_conf)
|
||||
|
||||
#
|
||||
# Volume Configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
# "Volume" has 2 source and 2 sink periods
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
|
||||
# Playback Buffers
|
||||
W_BUFFER(0, COMP_BUFFER_SIZE(3,
|
||||
|
|
|
@ -37,6 +37,16 @@ C_CONTROLMIXER(Tone Switch, PIPELINE_ID,
|
|||
Channel register and shift for Front Left/Right,
|
||||
LIST(` ', KCONTROL_CHANNEL(FL, 2, 0), KCONTROL_CHANNEL(FR, 2, 1)))
|
||||
|
||||
#
|
||||
# Volume configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -45,7 +55,7 @@ C_CONTROLMIXER(Tone Switch, PIPELINE_ID,
|
|||
W_TONE(0, PIPELINE_FORMAT, 2, 0, LIST(` ', "PIPELINE_ID Tone Switch"))
|
||||
|
||||
# "Tone Volume" has 2 sink period and 2 source periods
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Tone Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Tone Volume"))
|
||||
|
||||
# Low Latency Buffers
|
||||
W_BUFFER(0,COMP_BUFFER_SIZE(2,
|
||||
|
|
|
@ -28,6 +28,16 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
|
|||
Channel register and shift for Front Left/Right,
|
||||
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
|
||||
|
||||
#
|
||||
# Volume configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -37,7 +47,7 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
|
|||
W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2)
|
||||
|
||||
# "Volume" has 2 source and 2 sink periods
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Capture Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Master Capture Volume"))
|
||||
|
||||
# Capture Buffers
|
||||
W_BUFFER(0, COMP_BUFFER_SIZE(2,
|
||||
|
|
|
@ -25,6 +25,16 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
|
|||
Channel register and shift for Front Left/Right,
|
||||
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
|
||||
|
||||
#
|
||||
# Volume Configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(capture_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(capture_pga_conf, capture_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -34,7 +44,7 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
|
|||
W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2)
|
||||
|
||||
# "Volume" has 2 source and 2 sink periods
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Capture Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, capture_pga_conf, LIST(` ', "PIPELINE_ID Master Capture Volume"))
|
||||
|
||||
# Capture Buffers
|
||||
W_BUFFER(0, COMP_BUFFER_SIZE(2,
|
||||
|
|
|
@ -25,6 +25,16 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
|||
Channel register and shift for Front Left/Right,
|
||||
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
|
||||
|
||||
#
|
||||
# Volume configuration
|
||||
#
|
||||
|
||||
W_VENDORTUPLES(playback_pga_tokens, sof_volume_tokens,
|
||||
LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
|
||||
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
|
||||
|
||||
W_DATA(playback_pga_conf, playback_pga_tokens)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
@ -33,8 +43,9 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
|
|||
# with 2 sink and 0 source periods
|
||||
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0)
|
||||
|
||||
|
||||
# "Volume" has 2 source and 2 sink periods
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Master Playback Volume"))
|
||||
|
||||
# Playback Buffers
|
||||
W_BUFFER(0, COMP_BUFFER_SIZE(2,
|
||||
|
|
Loading…
Reference in New Issue