diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-17 17:43:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-17 17:43:33 -0700 |
commit | 6ab8ad31601f29470eb895fd95e5c963e125aa1b (patch) | |
tree | 73327fe9fc2ee62e7815fa0a666fdf46aaab7322 /sound/soc/intel/skylake/skl-sst-utils.c | |
parent | ea982ba7f79141d86eb7a440fcba6796ed718b9b (diff) | |
parent | 9bf9bf5440b99edfba496388c90b52ebcd9df715 (diff) | |
download | linux-6ab8ad31601f29470eb895fd95e5c963e125aa1b.tar.bz2 |
Merge tag 'sound-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"As shown in diffstat and logs, it was again a busy development cycle
at this time, too. The most significant changes are still on-going
refactoring / modernization works for ASoC core and drivers, but there
are lots of other changes as well. Here we go, some highlights below:
ASoC:
- Quite a lot of cleanup / refactoring of ASoC core and APIs; most of
them are systematic, but also including cleanups and modernization
- A bulk of updates for some ASoC platforms, Freescale, sunxi and
Intel SST/SOF
- Initial support for Sound Open Firmware on i.MX8
- Removal of deprecated w90x900 and nuc900 drivers
- New support for Cirrus Logic CS47L15 and CS47L92, Freescale i.MX
7ULP and 8MQ, Meson G12A and NXP UDA1334
USB-audio:
- More validations of descriptor units for hardening against bugs
reported by fuzzers
- PCM device assignment workaround for a past call-order change
- Scarlett Gen2 mixer interface, a few more more quirks
HD-audio:
- Support for audio component with AMD/ATI and Nvidia HDMI codecs
- Clean up HD-audio core and remove indirect access ops for Intel SOF
- DMIC detection at probe; it would make systems automatically
falling back to SST/SOF driver on devices that need DMIC handling.
Needs a new Kconfig to set, and beware that it's still new and a
bit experimental
FireWire:
- Lots of code refactoring and cleanups"
* tag 'sound-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (521 commits)
ASoC: sdm845: remove unneeded semicolon
ASoC: fsl_sai: Implement set_bclk_ratio
ASoC: dmaengine: Replace strncpy() with strscpy_pad() for pcm->name
ASoC: wcd9335: remove redundant use of ret variable
ALSA: firewire-tascam: check intermediate state of clock status and retry
ALSA: firewire-tascam: handle error code when getting current source of clock
ASoC: hdmi-codec: Add an op to set callback function for plug event
ASoC: rt5677: keep analog power register at SND_SOC_BIAS_OFF
ASoC: rt5677: Remove magic number register writes
ASoC: soc-core: self contained soc_unbind_aux_dev()
ASoC: soc-core: add soc_unbind_aux_dev()
ASoC: soc-core: self contained soc_bind_aux_dev()
ASoC: soc-core: move soc_probe_link_dais() next to soc_remove_link_dais()
ASoC: soc-core: self contained soc_probe_link_dais()
ASoC: soc-core: add new soc_link_init()
ASoC: soc-core: move soc_probe_dai() next to soc_remove_dai()
ASoC: soc-core: self contained soc_remove_link_dais()
ASoC: soc-core: self contained soc_remove_link_components()
ASoC: soc-core: self contained soc_probe_link_components()
ASoC: rt1308: make array pd static const, makes object smaller
...
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst-utils.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-utils.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/sound/soc/intel/skylake/skl-sst-utils.c b/sound/soc/intel/skylake/skl-sst-utils.c index 928c677b506c..d43cbf4a71ef 100644 --- a/sound/soc/intel/skylake/skl-sst-utils.c +++ b/sound/soc/intel/skylake/skl-sst-utils.c @@ -8,10 +8,9 @@ #include <linux/device.h> #include <linux/slab.h> #include <linux/uuid.h> -#include "skl-sst-dsp.h" #include "../common/sst-dsp.h" #include "../common/sst-dsp-priv.h" -#include "skl-sst-ipc.h" +#include "skl.h" #define DEFAULT_HASH_SHA256_LEN 32 @@ -99,12 +98,12 @@ static int skl_get_pvtid_map(struct uuid_module *module, int instance_id) return -EINVAL; } -int skl_get_pvt_instance_id_map(struct skl_sst *ctx, +int skl_get_pvt_instance_id_map(struct skl_dev *skl, int module_id, int instance_id) { struct uuid_module *module; - list_for_each_entry(module, &ctx->uuid_list, list) { + list_for_each_entry(module, &skl->uuid_list, list) { if (module->id == module_id) return skl_get_pvtid_map(module, instance_id); } @@ -163,19 +162,19 @@ static inline int skl_pvtid_128(struct uuid_module *module) /** * skl_get_pvt_id: generate a private id for use as module id * - * @ctx: driver context + * @skl: driver context * @uuid_mod: module's uuid * @instance_id: module's instance id * * This generates a 128 bit private unique id for a module TYPE so that * module instance is unique */ -int skl_get_pvt_id(struct skl_sst *ctx, guid_t *uuid_mod, int instance_id) +int skl_get_pvt_id(struct skl_dev *skl, guid_t *uuid_mod, int instance_id) { struct uuid_module *module; int pvt_id; - list_for_each_entry(module, &ctx->uuid_list, list) { + list_for_each_entry(module, &skl->uuid_list, list) { if (guid_equal(uuid_mod, &module->uuid)) { pvt_id = skl_pvtid_128(module); @@ -194,18 +193,18 @@ EXPORT_SYMBOL_GPL(skl_get_pvt_id); /** * skl_put_pvt_id: free up the private id allocated * - * @ctx: driver context + * @skl: driver context * @uuid_mod: module's uuid * @pvt_id: module pvt id * * This frees a 128 bit private unique id previously generated */ -int skl_put_pvt_id(struct skl_sst *ctx, guid_t *uuid_mod, int *pvt_id) +int skl_put_pvt_id(struct skl_dev *skl, guid_t *uuid_mod, int *pvt_id) { int i; struct uuid_module *module; - list_for_each_entry(module, &ctx->uuid_list, list) { + list_for_each_entry(module, &skl->uuid_list, list) { if (guid_equal(uuid_mod, &module->uuid)) { if (*pvt_id != 0) @@ -234,7 +233,7 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw, struct adsp_module_entry *mod_entry; int i, num_entry, size; const char *buf; - struct skl_sst *skl = ctx->thread_context; + struct skl_dev *skl = ctx->thread_context; struct uuid_module *module; struct firmware stripped_fw; unsigned int safe_file; @@ -317,11 +316,11 @@ free_uuid_list: return ret; } -void skl_freeup_uuid_list(struct skl_sst *ctx) +void skl_freeup_uuid_list(struct skl_dev *skl) { struct uuid_module *uuid, *_uuid; - list_for_each_entry_safe(uuid, _uuid, &ctx->uuid_list, list) { + list_for_each_entry_safe(uuid, _uuid, &skl->uuid_list, list) { list_del(&uuid->list); kfree(uuid); } @@ -355,16 +354,12 @@ int skl_dsp_strip_extended_manifest(struct firmware *fw) } int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name, - struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp, + struct skl_dsp_loader_ops dsp_ops, struct skl_dev **dsp, struct sst_dsp_device *skl_dev) { - struct skl_sst *skl; + struct skl_dev *skl = *dsp; struct sst_dsp *sst; - skl = devm_kzalloc(dev, sizeof(*skl), GFP_KERNEL); - if (skl == NULL) - return -ENOMEM; - skl->dev = dev; skl_dev->thread_context = skl; INIT_LIST_HEAD(&skl->uuid_list); @@ -381,13 +376,11 @@ int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name, INIT_LIST_HEAD(&sst->module_list); skl->is_first_boot = true; - if (dsp) - *dsp = skl; return 0; } -int skl_prepare_lib_load(struct skl_sst *skl, struct skl_lib_info *linfo, +int skl_prepare_lib_load(struct skl_dev *skl, struct skl_lib_info *linfo, struct firmware *stripped_fw, unsigned int hdr_offset, int index) { |