mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
ASoC: Intel: Skylake: modify snd_skl_get_module_info args
snd_skl_get_module_info() takes skl_dfw_module as an argument. The users then updates the topology data, so instead pass skl_module_cfg and let snd_skl_get_module_info() fill that up. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
da74273c49
commit
0556ba463b
3 changed files with 10 additions and 21 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include <sound/memalloc.h>
|
#include <sound/memalloc.h>
|
||||||
#include "skl-sst-cldma.h"
|
#include "skl-sst-cldma.h"
|
||||||
#include "skl-tplg-interface.h"
|
#include "skl-tplg-interface.h"
|
||||||
|
#include "skl-topology.h"
|
||||||
|
|
||||||
struct sst_dsp;
|
struct sst_dsp;
|
||||||
struct skl_sst;
|
struct skl_sst;
|
||||||
|
@ -210,10 +211,10 @@ int bxt_sst_init_fw(struct device *dev, struct skl_sst *ctx);
|
||||||
void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx);
|
void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx);
|
||||||
void bxt_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx);
|
void bxt_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx);
|
||||||
|
|
||||||
int snd_skl_get_module_info(struct skl_sst *ctx, u8 *uuid,
|
int snd_skl_get_module_info(struct skl_sst *ctx,
|
||||||
struct skl_dfw_module *dfw_config);
|
struct skl_module_cfg *mconfig);
|
||||||
int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
|
int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
|
||||||
unsigned int offset, int index);
|
unsigned int offset, int index);
|
||||||
void skl_freeup_uuid_list(struct skl_sst *ctx);
|
void skl_freeup_uuid_list(struct skl_sst *ctx);
|
||||||
|
|
||||||
int skl_dsp_strip_extended_manifest(struct firmware *fw);
|
int skl_dsp_strip_extended_manifest(struct firmware *fw);
|
||||||
|
|
|
@ -115,18 +115,18 @@ struct skl_ext_manifest_hdr {
|
||||||
u32 entries;
|
u32 entries;
|
||||||
};
|
};
|
||||||
|
|
||||||
int snd_skl_get_module_info(struct skl_sst *ctx, u8 *uuid,
|
int snd_skl_get_module_info(struct skl_sst *ctx,
|
||||||
struct skl_dfw_module *dfw_config)
|
struct skl_module_cfg *mconfig)
|
||||||
{
|
{
|
||||||
struct uuid_module *module;
|
struct uuid_module *module;
|
||||||
uuid_le *uuid_mod;
|
uuid_le *uuid_mod;
|
||||||
|
|
||||||
uuid_mod = (uuid_le *)uuid;
|
uuid_mod = (uuid_le *)mconfig->guid;
|
||||||
|
|
||||||
list_for_each_entry(module, &ctx->uuid_list, list) {
|
list_for_each_entry(module, &ctx->uuid_list, list) {
|
||||||
if (uuid_le_cmp(*uuid_mod, module->uuid) == 0) {
|
if (uuid_le_cmp(*uuid_mod, module->uuid) == 0) {
|
||||||
dfw_config->module_id = module->id;
|
mconfig->id.module_id = module->id;
|
||||||
dfw_config->is_loadable = module->is_loadable;
|
mconfig->is_loadable = module->is_loadable;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,24 +475,12 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
|
||||||
|
|
||||||
/* check if module ids are populated */
|
/* check if module ids are populated */
|
||||||
if (mconfig->id.module_id < 0) {
|
if (mconfig->id.module_id < 0) {
|
||||||
struct skl_dfw_module *dfw_config;
|
ret = snd_skl_get_module_info(skl->skl_sst, mconfig);
|
||||||
|
|
||||||
dfw_config = kzalloc(sizeof(*dfw_config), GFP_KERNEL);
|
|
||||||
if (!dfw_config)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
ret = snd_skl_get_module_info(skl->skl_sst,
|
|
||||||
mconfig->guid, dfw_config);
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(skl->skl_sst->dev,
|
dev_err(skl->skl_sst->dev,
|
||||||
"query module info failed: %d\n", ret);
|
"query module info failed: %d\n", ret);
|
||||||
kfree(dfw_config);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
mconfig->id.module_id = dfw_config->module_id;
|
|
||||||
mconfig->is_loadable = dfw_config->is_loadable;
|
|
||||||
|
|
||||||
kfree(dfw_config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check resource available */
|
/* check resource available */
|
||||||
|
|
Loading…
Reference in a new issue