diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2021-09-13 17:00:50 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-27 13:00:35 +0100 |
commit | 6092be2d93b3b28dfeca4e5944052a1a21f51ca3 (patch) | |
tree | 33c5f066f3dda3e0a570dfdaa66ed1a7e03c4273 /sound/soc/codecs/wm_adsp.c | |
parent | 186152df4d431650154c3e3aefc7d3e1004987c8 (diff) |
ASoC: wm_adsp: Move sys_config_size to wm_adsp
sys_config_size is part of the compressed stream support, move it from
what will become generic DSP code so that it remains in ASoC.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-10-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 1bca3922a6b8..82038cac4286 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -3467,6 +3467,8 @@ int wm_adsp2_init(struct wm_adsp *dsp) { INIT_WORK(&dsp->boot_work, wm_adsp_boot_work); + dsp->sys_config_size = sizeof(struct wm_adsp_system_config_xm_hdr); + wm_adsp_common_init(dsp); return cs_dsp_adsp2_init(dsp); @@ -3484,6 +3486,8 @@ int wm_halo_init(struct wm_adsp *dsp) { INIT_WORK(&dsp->boot_work, wm_adsp_boot_work); + dsp->sys_config_size = sizeof(struct wm_halo_system_config_xm_hdr); + wm_adsp_common_init(dsp); return cs_dsp_halo_init(dsp); @@ -3895,7 +3899,7 @@ static int wm_adsp_buffer_parse_legacy(struct wm_adsp *dsp) if (!buf) return -ENOMEM; - xmalg = dsp->ops->sys_config_size / sizeof(__be32); + xmalg = dsp->sys_config_size / sizeof(__be32); addr = alg_region->base + xmalg + ALG_XM_FIELD(magic); ret = cs_dsp_read_data_word(dsp, WMFW_ADSP2_XM, addr, &magic); @@ -4588,7 +4592,6 @@ static const struct cs_dsp_ops cs_dsp_adsp1_ops = { static const struct cs_dsp_ops cs_dsp_adsp2_ops[] = { { - .sys_config_size = sizeof(struct wm_adsp_system_config_xm_hdr), .parse_sizes = cs_dsp_adsp2_parse_sizes, .validate_version = cs_dsp_validate_version, .setup_algs = cs_dsp_adsp2_setup_algs, @@ -4607,7 +4610,6 @@ static const struct cs_dsp_ops cs_dsp_adsp2_ops[] = { }, { - .sys_config_size = sizeof(struct wm_adsp_system_config_xm_hdr), .parse_sizes = cs_dsp_adsp2_parse_sizes, .validate_version = cs_dsp_validate_version, .setup_algs = cs_dsp_adsp2_setup_algs, @@ -4626,7 +4628,6 @@ static const struct cs_dsp_ops cs_dsp_adsp2_ops[] = { .stop_core = cs_dsp_adsp2_stop_core, }, { - .sys_config_size = sizeof(struct wm_adsp_system_config_xm_hdr), .parse_sizes = cs_dsp_adsp2_parse_sizes, .validate_version = cs_dsp_validate_version, .setup_algs = cs_dsp_adsp2_setup_algs, @@ -4648,7 +4649,6 @@ static const struct cs_dsp_ops cs_dsp_adsp2_ops[] = { }; static const struct cs_dsp_ops cs_dsp_halo_ops = { - .sys_config_size = sizeof(struct wm_halo_system_config_xm_hdr), .parse_sizes = cs_dsp_adsp2_parse_sizes, .validate_version = cs_dsp_halo_validate_version, .setup_algs = cs_dsp_halo_setup_algs, |