mirror of https://github.com/thesofproject/sof.git
topology: Add support for RO_volatile, WO and RW_volatile byte kcontrol
This patch adds the support for read-only volatile byte kcontrol with access type as read and volatile to read the actual values from DSP, write-only byte kcontrol with access type as just write and read-write volatile byte control with access type as read, write and volatile. Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This commit is contained in:
parent
420ef1b6d2
commit
333036f097
|
@ -22,6 +22,9 @@
|
|||
#define SOF_TPLG_KCTL_ENUM_ID 257
|
||||
#define SOF_TPLG_KCTL_BYTES_ID 258
|
||||
#define SOF_TPLG_KCTL_SWITCH_ID 259
|
||||
#define SOF_TPLG_KCTL_BYTES_VOLATILE_RO 260
|
||||
#define SOF_TPLG_KCTL_BYTES_VOLATILE_RW 261
|
||||
#define SOF_TPLG_KCTL_BYTES_WO_ID 262
|
||||
|
||||
/*
|
||||
* Tokens - must match values in topology configurations
|
||||
|
|
|
@ -27,6 +27,22 @@ define(`CONTROLBYTES_EXTOPS',
|
|||
` put STR($3)'
|
||||
` }')
|
||||
|
||||
# Readonly byte control to read the actual value from DSP
|
||||
dnl CONTROLBYTES_EXTOPS_READONLY(info, comment, get)
|
||||
define(`CONTROLBYTES_EXTOPS_READONLY',
|
||||
`extops."extctl" {'
|
||||
` #$1'
|
||||
` get STR($2)'
|
||||
` }')
|
||||
|
||||
# Writeonly byte control
|
||||
dnl CONTROLBYTES_EXTOPS_WRITEONLY(info, comment, put)
|
||||
define(`CONTROLBYTES_EXTOPS_WRITEONLY',
|
||||
`extops."extctl" {'
|
||||
` #$1'
|
||||
` put STR($2)'
|
||||
` }')
|
||||
|
||||
define(`CONTROLBYTES_PRIV',
|
||||
`SectionData.STR($1) {'
|
||||
` $2'
|
||||
|
@ -59,4 +75,88 @@ define(`C_CONTROLBYTES',
|
|||
` ]'
|
||||
`}')
|
||||
|
||||
# Readonly byte control to read the actual value from DSP
|
||||
dnl C_CONTROLBYTES_VOLATILE_READONLY(name, index, ops, base, num_regs, mask, max, tlv, priv)
|
||||
define(`C_CONTROLBYTES_VOLATILE_READONLY',
|
||||
`SectionControlBytes.STR($1) {'
|
||||
`'
|
||||
` # control belongs to this index group'
|
||||
` index STR($2)'
|
||||
`'
|
||||
` # control uses bespoke driver get/put/info ID for io ops'
|
||||
` $3'
|
||||
` # control uses bespoke driver get/put/info ID for ext ops'
|
||||
` $4'
|
||||
`'
|
||||
` base STR($5)'
|
||||
` num_regs STR($6)'
|
||||
` mask STR($7)'
|
||||
` $8'
|
||||
` $9'
|
||||
` access ['
|
||||
` tlv_read'
|
||||
` tlv_callback'
|
||||
` volatile'
|
||||
` ]'
|
||||
` data ['
|
||||
` $10'
|
||||
` ]'
|
||||
`}')
|
||||
|
||||
# Writeonly byte control
|
||||
dnl C_CONTROLBYTES_WRITEONLY(name, index, ops, base, num_regs, mask, max, tlv, priv)
|
||||
define(`C_CONTROLBYTES_WRITEONLY',
|
||||
`SectionControlBytes.STR($1) {'
|
||||
`'
|
||||
` # control belongs to this index group'
|
||||
` index STR($2)'
|
||||
`'
|
||||
` # control uses bespoke driver get/put/info ID for io ops'
|
||||
` $3'
|
||||
` # control uses bespoke driver get/put/info ID for ext ops'
|
||||
` $4'
|
||||
`'
|
||||
` base STR($5)'
|
||||
` num_regs STR($6)'
|
||||
` mask STR($7)'
|
||||
` $8'
|
||||
` $9'
|
||||
` access ['
|
||||
` tlv_write'
|
||||
` tlv_callback'
|
||||
` ]'
|
||||
` data ['
|
||||
` $10'
|
||||
` ]'
|
||||
`}')
|
||||
|
||||
# Read-write volatile byte control
|
||||
dnl C_CONTROLBYTES_VOLATILE_RW(name, index, ops, base, num_regs, mask, max, tlv, priv)
|
||||
define(`C_CONTROLBYTES_VOLATILE_RW',
|
||||
`SectionControlBytes.STR($1) {'
|
||||
`'
|
||||
` # control belongs to this index group'
|
||||
` index STR($2)'
|
||||
`'
|
||||
` # control uses bespoke driver get/put/info ID for io ops'
|
||||
` $3'
|
||||
` # control uses bespoke driver get/put/info ID for ext ops'
|
||||
` $4'
|
||||
`'
|
||||
` base STR($5)'
|
||||
` num_regs STR($6)'
|
||||
` mask STR($7)'
|
||||
` $8'
|
||||
` $9'
|
||||
` access ['
|
||||
` tlv_read'
|
||||
` tlv_write'
|
||||
` tlv_callback'
|
||||
` volatile'
|
||||
` ]'
|
||||
` data ['
|
||||
` $10'
|
||||
` ]'
|
||||
`}')
|
||||
|
||||
divert(0)dnl
|
||||
|
|
Loading…
Reference in New Issue