ASoC: Intel: add kcontrol to set parameter to sound effect module waves
Each kcontrol command includes a line of parameters up to 128 bytes.
kcontrol command to set param:
cset "name='Waves Set Param' <0x01,0xff,...>"
or
cset-bin-file "name='Waves Set Param' <path/to/binary/config/file>"
The parameter lines are stored in a buffer array, so can be read back from
buffer rather than from DSP, and be relaunched to DSP when resume from RTD3.
The buffer size is 160 parameter lines.
kcontrol command to reset the buffer:
cset "name='Waves Set Param' 0xff"
alsa-lib v1.0.29 or commit 6ea14c36 and f47480af are required to support the
kcontrol commands.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/sound/soc/intel/sst-haswell-ipc.h b/sound/soc/intel/sst-haswell-ipc.h
index 16bec43..06d71ae 100644
--- a/sound/soc/intel/sst-haswell-ipc.h
+++ b/sound/soc/intel/sst-haswell-ipc.h
@@ -38,6 +38,8 @@
#define SST_HSW_MAX_INFO_SIZE 64
#define SST_HSW_BUILD_HASH_LENGTH 40
#define SST_HSW_IPC_MAX_SHORT_PARAMETER_SIZE 500
+#define WAVES_PARAM_COUNT 128
+#define WAVES_PARAM_LINES 160
struct sst_hsw;
struct sst_hsw_stream;
@@ -503,6 +505,10 @@
void sst_hsw_set_module_enabled_rtd3(struct sst_hsw *hsw, u32 module_id);
void sst_hsw_set_module_disabled_rtd3(struct sst_hsw *hsw, u32 module_id);
bool sst_hsw_is_module_enabled_rtd3(struct sst_hsw *hsw, u32 module_id);
+void sst_hsw_reset_param_buf(struct sst_hsw *hsw);
+int sst_hsw_store_param_line(struct sst_hsw *hsw, u8 *buf);
+int sst_hsw_load_param_line(struct sst_hsw *hsw, u8 *buf);
+int sst_hsw_launch_param_buf(struct sst_hsw *hsw);
int sst_hsw_module_load(struct sst_hsw *hsw,
u32 module_id, u32 instance_id, char *name);