]> git.hungrycats.org Git - linux/commitdiff
ASoC: Intel: avs: Fix ASRC module initialization
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 5 Apr 2024 09:09:21 +0000 (11:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:36 +0000 (09:49 +0200)
[ Upstream commit 9d2e26f31c7cc3fa495c423af9b4902ec0dc7be3 ]

The ASRC module configuration consists of several reserved fields. Zero
them out when initializing the module to avoid sending invalid data.

Fixes: 274d79e51875 ("ASoC: Intel: avs: Configure modules according to their type")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/avs/path.c

index 3aa16ee8d34c1f0dbbab6154aa5aba8fb946e47b..2fae84727a3bd93d1f17ec89ee1755007a6778ca 100644 (file)
@@ -367,6 +367,7 @@ static int avs_asrc_create(struct avs_dev *adev, struct avs_path_module *mod)
        struct avs_tplg_module *t = mod->template;
        struct avs_asrc_cfg cfg;
 
+       memset(&cfg, 0, sizeof(cfg));
        cfg.base.cpc = t->cfg_base->cpc;
        cfg.base.ibs = t->cfg_base->ibs;
        cfg.base.obs = t->cfg_base->obs;