summaryrefslogtreecommitdiff
path: root/sound/soc/sof/ipc4-topology.h
diff options
context:
space:
mode:
authorRander Wang <rander.wang@intel.com>2023-03-07 14:06:56 +0300
committerMark Brown <broonie@kernel.org>2023-03-07 16:58:04 +0300
commite45cd86c3a78bfb9875a5eb8ab5dab459b59bbe2 (patch)
tree2d6ae9e81b3181fcf1d8e810550bd162cd431966 /sound/soc/sof/ipc4-topology.h
parentc7e328f1cbf22efe23bc3cd7dd6bb14efccc28d0 (diff)
downloadlinux-e45cd86c3a78bfb9875a5eb8ab5dab459b59bbe2.tar.xz
ASoC: SOF: IPC4: update gain ipc msg definition to align with fw
Recent firmware changes modified the curve duration from 32 to 64 bits, which breaks volume ramps. A simple solution would be to change the definition, but unfortunately the ASoC topology framework only supports up to 32 bit tokens. This patch suggests breaking the 64 bit value in low and high parts, with only the low-part extracted from topology and high-part only zeroes. Since the curve duration is represented in hundred of nanoseconds, we can still represent a 400s ramp, which is just fine. The defacto ABI change has no effect on existing users since the IPC4 firmware has not been released just yet. Link: https://github.com/thesofproject/linux/issues/4026 Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307110656.1816-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4-topology.h')
-rw-r--r--sound/soc/sof/ipc4-topology.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/sof/ipc4-topology.h b/sound/soc/sof/ipc4-topology.h
index c0e457f7f51a..123f1096f326 100644
--- a/sound/soc/sof/ipc4-topology.h
+++ b/sound/soc/sof/ipc4-topology.h
@@ -277,14 +277,16 @@ struct sof_ipc4_control_data {
* @init_val: Initial value
* @curve_type: Curve type
* @reserved: reserved for future use
- * @curve_duration: Curve duration
+ * @curve_duration_l: Curve duration low part
+ * @curve_duration_h: Curve duration high part
*/
struct sof_ipc4_gain_data {
uint32_t channels;
uint32_t init_val;
uint32_t curve_type;
uint32_t reserved;
- uint32_t curve_duration;
+ uint32_t curve_duration_l;
+ uint32_t curve_duration_h;
} __aligned(8);
/**