summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-audio.h
diff options
context:
space:
mode:
authorPaul Olaru <paul.olaru@nxp.com>2023-05-03 11:10:48 +0300
committerMark Brown <broonie@kernel.org>2023-05-23 19:31:14 +0100
commit299f6c752f8f7dabb62fe4df62ebd233b58402bd (patch)
treefd58867fb164fc60760b03ac657f2b031afbbff2 /sound/soc/sof/sof-audio.h
parentf9d790c578d4e0f715213cc7f2f6f2b0d2d91988 (diff)
ASoC: sof: Improve sof_ipc3_bytes_ext_put function
The function is improved in the way that if the firmware returns a validation error on the newly sent bytes, then the kernel will automatically restore to the old bytes value for a given kcontrol. This way, if the firmware rejects a data blob then the kernel will also reject it, instead of saving it for the next suspend/resume cycle. The old behaviour is that the kernel would save it anyway and on next firmware boot it would apply the previously-rejected configuration, leading to errors during playback. Additionally, the function also saves previously validated configurations, so that if the firmware does end up rejecting a new bytes value the kernel can send an old, previously-valid configuration. Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Paul Olaru <paul.olaru@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20230503081049.73847-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.h')
-rw-r--r--sound/soc/sof/sof-audio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index a090a9eb4828..5d5eeb1a1a6f 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -362,6 +362,7 @@ struct snd_sof_control {
size_t priv_size; /* size of private data */
size_t max_size;
void *ipc_control_data;
+ void *old_ipc_control_data;
int max; /* applicable to volume controls */
u32 size; /* cdata size */
u32 *volume_table; /* volume table computed from tlv data*/