topology: Modify init params for the Demux Config

This patch creates macros for the channel map of Feedback
and reference streams. Also, modifies the feedback channels and channel map
of the Demux configuration to send voltage and current data to the
smart amplifier component and only voltage data to the host as Feedback
stream.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This commit is contained in:
Dharageswari R 2020-09-15 19:11:54 -07:00 committed by Liam Girdwood
parent 7f74440c51
commit 399b97afe6
1 changed files with 13 additions and 4 deletions

View File

@ -38,6 +38,17 @@ ifdef(`SMART_REF_PPL_ID',`',`errprint(note: Need to define Echo Ref pipeline ID
ifdef(`SMART_REF_CH_NUM',`',`errprint(note: Need to define Echo Ref channel number for sof-smart-amplifier
)')
ifelse(SMART_FB_CHANNELS, `8',
`define(`FB_CHMAP',`0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80')',
`define(`FB_CHMAP',`0x01,0x02,0x04,0x08,0x00,0x00,0x00,0x00')'
)
ifelse(SMART_REF_CHANNELS, `8',
`define(`REF_CHMAP',`0x01,0x02,0x04,0x08,0x00,0x00,0x00,0x00')',
`define(`REF_CHMAP',`0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00')'
)
# should be aligned with struct sof_mux_config, used for mux input/output configuration.
CONTROLBYTES_PRIV(DEMUX_priv,
` bytes "0x53,0x4f,0x46,0x00,0x00,0x00,0x00,0x00,'
@ -45,10 +56,8 @@ CONTROLBYTES_PRIV(DEMUX_priv,
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
` COMP_FORMAT_VALUE(PIPELINE_FORMAT),0x00,DEC2HEX(SMART_RX_CHANNELS),0x00,0x02,0x00,0x00,0x00,'
` DEC2HEX(SMART_PB_PPL_ID),0x00,0x00,0x00,DEC2HEX(SMART_FB_CHANNELS),0x01,0x02,0x04,'
` 0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,'
` DEC2HEX(SMART_REF_PPL_ID),0x00,0x00,0x00,DEC2HEX(SMART_REF_CH_NUM),0x01,0x02,0x04,'
` 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00"'
` DEC2HEX(SMART_PB_PPL_ID),0x00,0x00,0x00,DEC2HEX(SMART_FB_CHANNELS),FB_CHMAP,0x00,0x00,0x00,'
` DEC2HEX(SMART_REF_PPL_ID),0x00,0x00,0x00,DEC2HEX(SMART_REF_CH_NUM),REF_CHMAP,0x00,0x00,0x00"'
)
# demux Bytes control with max value of 255