ASoC: SOF: ipc4-control: Implement control update for switch/enum controls
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fri, 24 Nov 2023 15:08:52 +0000 (17:08 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 24 Nov 2023 15:38:00 +0000 (15:38 +0000)
commitf5eb9945cf9c17eb016aa64c7de13875f259ea07
treef4e134f0b0cb85262dfe947afc46ba7d189ae016
parent1a307538c9cc274b3191b9a1380bbceece262626
ASoC: SOF: ipc4-control: Implement control update for switch/enum controls

Implement the sof_ipc_tplg_control_ops.update function to support a control
change notification from the firmware on switch or enum control types.

Based on the module notification message content, look up the swidget, then
the scontrol which was the source of the notification then if the message
contains the changed values update the cached values.
If only a notification without values received, marked the control as dirty
and on next read access fetch the new values from the firmware.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231124150853.18648-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-control.c