diff options
author | Simon Trimmer <simont@opensource.cirrus.com> | 2021-09-13 18:00:56 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-27 14:00:41 +0200 |
commit | 2dd044641ec3672433b9fe3ec47b236621757aa8 (patch) | |
tree | 6020339d9bbd11ef638824da3733cbd083762092 /sound/soc/codecs/wm_adsp.h | |
parent | ASoC: wm_adsp: Split out struct cs_dsp from struct wm_adsp (diff) | |
download | linux-2dd044641ec3672433b9fe3ec47b236621757aa8.tar.xz linux-2dd044641ec3672433b9fe3ec47b236621757aa8.zip |
ASoC: wm_adsp: Separate wm_adsp specifics in cs_dsp_client_ops
This is preparation for moving the generic DSP support out of ASoC.
The event callbacks let the client add custom handling of events.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-16-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.h')
-rw-r--r-- | sound/soc/codecs/wm_adsp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h index 5a70b6679fa3..25aaef74654c 100644 --- a/sound/soc/codecs/wm_adsp.h +++ b/sound/soc/codecs/wm_adsp.h @@ -52,6 +52,7 @@ struct cs_dsp_alg_region { struct wm_adsp_compr; struct wm_adsp_compr_buf; struct cs_dsp_ops; +struct cs_dsp_client_ops; struct cs_dsp_coeff_ctl { const char *fw_name; @@ -81,6 +82,7 @@ struct cs_dsp { struct regmap *regmap; const struct cs_dsp_ops *ops; + const struct cs_dsp_client_ops *client_ops; unsigned int base; unsigned int base_sysinfo; @@ -237,4 +239,12 @@ int wm_adsp_write_ctl(struct wm_adsp *dsp, const char *name, int type, int wm_adsp_read_ctl(struct wm_adsp *dsp, const char *name, int type, unsigned int alg, void *buf, size_t len); +struct cs_dsp_client_ops { + int (*control_add)(struct cs_dsp_coeff_ctl *ctl); + void (*control_remove)(struct cs_dsp_coeff_ctl *ctl); + int (*post_run)(struct cs_dsp *dsp); + void (*post_stop)(struct cs_dsp *dsp); + void (*watchdog_expired)(struct cs_dsp *dsp); +}; + #endif |