summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/loader.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-12-13 22:27:26 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-12-13 22:27:26 +0300
commit102f9d3d455870844c47b82322c2dfc0a35eb745 (patch)
tree31e2c500794f0827d1319fa28c71a0616c598971 /sound/soc/intel/avs/loader.c
parent8715c6d3100fc7c6edddf29af4a399a1c12d028c (diff)
parent8ec2d95f50c06f5cf2a2b94bcdf47f494f91ad55 (diff)
downloadlinux-102f9d3d455870844c47b82322c2dfc0a35eb745.tar.xz
Merge tag 'sound-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "This looks like a relatively calm development cycle; there have been only few changes in ALSA and ASoC core sides while we get lots of device-specific fixes and updates as usual. Most of commits are about ASoC, including Intel SOF/AVS and many device tree updates. Below are some highlights: Core: - Improvement in memalloc helper for fallback allocations - More cleanups of ASoC DAPM code ASoC: - Factoring out of mapping hw_params onto SoundWire configuration - The ever ongoing overhauls of the Intel DSP code continue, including support for loading libraries and probes with IPC4 on SOF. - Support for more sample formats on JZ4740 - Lots of device tree conversions and fixups - Support for Allwinner D1, a range of AMD and Intel systems, Mediatek systems with multiple DMICs, Nuvoton NAU8318, NXP fsl_rpmsg and i.MX93, Qualcomm AudioReach Enable, MFC and SAL, RealTek RT1318 and Rockchip RK3588 ALSA: - Addition of PCM kselftest; still minimalistic but can be extended in future - Fixes for corner-case XRUNs with USB-audio implicit feedback mode - Usual device-specific quirk updates for USB- and HD-audio - FireWire DICE updates This also contains a few cross-tree updates: - Some OMAP board file updates for removal of relevant OMAP platforms - A new I2C API update for I2C probe API adaption - A DRM update for the further hdmi-codec updates" * tag 'sound-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (417 commits) ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt ALSA: patch_realtek: Fix Dell Inspiron Plus 16 ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock. ASoC: dt-bindings: Correct Alexandre Belloni email ASoC: dt-bindings: maxim,max98504: Convert to DT schema ASoC: dt-bindings: maxim,max98357a: Convert to DT schema ASoC: dt-bindings: Reference common DAI properties ASoC: dt-bindings: Extend name-prefix.yaml into common DAI properties ASoC: rt715: Make read-only arrays capture_reg_H and capture_reg_L static const ASoC: uniphier: aio-core: Make some read-only arrays static const ASoC: wcd938x: Make read-only array minCode_param static const ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM ops ASoC : SOF: amd: Add support for IPC and DSP dumps ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIER ALSA: usb-audio: Workaround for XRUN at prepare ALSA: pcm: Handle XRUN at trigger START ALSA: pcm: Set missing stop_operating flag at undoing trigger start drm: tda99x: Don't advertise non-existent capture support ASoC: hdmi-codec: Allow playback and capture to be disabled kselftest/alsa: Add more coverage of sample rates and channel counts ...
Diffstat (limited to 'sound/soc/intel/avs/loader.c')
-rw-r--r--sound/soc/intel/avs/loader.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c
index 9e3f8ff33a87..56bb0a59249d 100644
--- a/sound/soc/intel/avs/loader.c
+++ b/sound/soc/intel/avs/loader.c
@@ -43,7 +43,7 @@
/* Occasionally, engineering (release candidate) firmware is provided for testing. */
static bool debug_ignore_fw_version;
module_param_named(ignore_fw_version, debug_ignore_fw_version, bool, 0444);
-MODULE_PARM_DESC(ignore_fw_version, "Verify FW version 0=yes (default), 1=no");
+MODULE_PARM_DESC(ignore_fw_version, "Ignore firmware version check 0=no (default), 1=yes");
#define AVS_LIB_NAME_SIZE 8
@@ -224,11 +224,19 @@ static int avs_cldma_load_module(struct avs_dev *adev, struct avs_module_entry *
if (ret < 0)
return ret;
+ avs_hda_power_gating_enable(adev, false);
+ avs_hda_clock_gating_enable(adev, false);
+ avs_hda_l1sen_enable(adev, false);
+
hda_cldma_set_data(cl, (void *)mod->data, mod->size);
hda_cldma_transfer(cl, msecs_to_jiffies(AVS_CLDMA_START_DELAY_MS));
ret = avs_ipc_load_modules(adev, &mentry->module_id, 1);
hda_cldma_stop(cl);
+ avs_hda_l1sen_enable(adev, true);
+ avs_hda_clock_gating_enable(adev, true);
+ avs_hda_power_gating_enable(adev, true);
+
if (ret) {
dev_err(adev->dev, "load module %d failed: %d\n", mentry->module_id, ret);
avs_release_last_firmware(adev);
@@ -369,8 +377,8 @@ int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw)
goto release_stream;
/* enable SPIB for hda stream */
- snd_hdac_ext_stream_spbcap_enable(bus, true, hstream->index);
- ret = snd_hdac_ext_stream_set_spib(bus, estream, fw->size);
+ snd_hdac_stream_spbcap_enable(bus, true, hstream->index);
+ ret = snd_hdac_stream_set_spib(bus, hstream, fw->size);
if (ret)
goto cleanup_resources;
@@ -400,8 +408,8 @@ int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw)
cleanup_resources:
/* disable SPIB for hda stream */
- snd_hdac_ext_stream_spbcap_enable(bus, false, hstream->index);
- snd_hdac_ext_stream_set_spib(bus, estream, 0);
+ snd_hdac_stream_spbcap_enable(bus, false, hstream->index);
+ snd_hdac_stream_set_spib(bus, hstream, 0);
snd_hdac_dsp_cleanup(hstream, &dmab);
release_stream:
@@ -436,8 +444,8 @@ int avs_hda_load_library(struct avs_dev *adev, struct firmware *lib, u32 id)
goto release_stream;
/* enable SPIB for hda stream */
- snd_hdac_ext_stream_spbcap_enable(bus, true, stream->index);
- snd_hdac_ext_stream_set_spib(bus, estream, lib->size);
+ snd_hdac_stream_spbcap_enable(bus, true, stream->index);
+ snd_hdac_stream_set_spib(bus, stream, lib->size);
memcpy(dmab.area, lib->data, lib->size);
@@ -451,8 +459,8 @@ int avs_hda_load_library(struct avs_dev *adev, struct firmware *lib, u32 id)
}
/* disable SPIB for hda stream */
- snd_hdac_ext_stream_spbcap_enable(bus, false, stream->index);
- snd_hdac_ext_stream_set_spib(bus, estream, 0);
+ snd_hdac_stream_spbcap_enable(bus, false, stream->index);
+ snd_hdac_stream_set_spib(bus, stream, 0);
snd_hdac_dsp_cleanup(stream, &dmab);
release_stream:
@@ -605,6 +613,7 @@ int avs_dsp_boot_firmware(struct avs_dev *adev, bool purge)
for (i = 1; i < adev->fw_cfg.max_libs_count; i++)
memset(adev->lib_names[i], 0, AVS_LIB_NAME_SIZE);
+ avs_hda_power_gating_enable(adev, false);
avs_hda_clock_gating_enable(adev, false);
avs_hda_l1sen_enable(adev, false);
@@ -625,6 +634,7 @@ int avs_dsp_boot_firmware(struct avs_dev *adev, bool purge)
reenable_gating:
avs_hda_l1sen_enable(adev, true);
avs_hda_clock_gating_enable(adev, true);
+ avs_hda_power_gating_enable(adev, true);
if (ret < 0)
return ret;