From: Takashi Iwai Date: Sat, 21 Oct 2023 07:49:15 +0000 (+0200) Subject: Merge tag 'asoc-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=39cd06e3f7b75b629f2987aa51ab26fb820d167b;p=linux.git Merge tag 'asoc-v6.7' of https://git./linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.7 This is quite a large set of changes but mostly due to API cleanups and in driver specific ways rather than due to anything subsystem wide. Highlights include: - Standardisation of API prefixes on snd_soc_, removing asoc_. - GPIO API usage improvements. - Support for HDA patches. - Lots of work on SOF, including crash dump support. - Support for AMD platforms with es83xx, Awinc AT87390, many Intel platforms, many Mediatek platforms, Qualcomm SM6115, Richtek RTQ9128 and Texas Instruments TAS575x. [ the merge conflicts around SOF Intel HD-audio and CS35L41 subcodec drivers are resolved here -- tiwai ] --- 39cd06e3f7b75b629f2987aa51ab26fb820d167b diff --cc sound/pci/hda/cs35l41_hda.c index 8e0ef11afa0f6,c74faa2ff46c0..28cb10ddd191f --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@@ -598,9 -527,15 +598,9 @@@ static void cs35l41_hda_play_done(struc dev_dbg(dev, "Play (Complete)\n"); - cs35l41_global_enable(dev, reg, cs35l41->hw_cfg.bst_type, 1, NULL, + cs35l41_global_enable(dev, reg, cs35l41->hw_cfg.bst_type, 1, cs35l41->firmware_running); - if (cs35l41->firmware_running) { - regmap_multi_reg_write(reg, cs35l41_hda_unmute_dsp, - ARRAY_SIZE(cs35l41_hda_unmute_dsp)); - } else { - regmap_multi_reg_write(reg, cs35l41_hda_unmute, - ARRAY_SIZE(cs35l41_hda_unmute)); - } + cs35l41_mute(dev, false); } static void cs35l41_hda_pause_start(struct device *dev) @@@ -610,8 -545,8 +610,8 @@@ dev_dbg(dev, "Pause (Start)\n"); - regmap_multi_reg_write(reg, cs35l41_hda_mute, ARRAY_SIZE(cs35l41_hda_mute)); + cs35l41_mute(dev, true); - cs35l41_global_enable(dev, reg, cs35l41->hw_cfg.bst_type, 0, NULL, + cs35l41_global_enable(dev, reg, cs35l41->hw_cfg.bst_type, 0, cs35l41->firmware_running); } diff --cc sound/soc/sof/intel/hda.c index d4e76c58de13a,29f4e043aadef..8342fcf52f52f --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@@ -1366,17 -1371,12 +1380,15 @@@ skip_disable_dsp if (!sdev->dspless_mode_selected) iounmap(sdev->bar[HDA_DSP_BAR]); - - return 0; +} - iounmap(bus->remap_addr); - +int hda_dsp_remove_late(struct snd_sof_dev *sdev) +{ + iounmap(sof_to_bus(sdev)->remap_addr); sof_hda_bus_exit(sdev); - hda_codec_i915_exit(sdev); + + return 0; } int hda_power_down_dsp(struct snd_sof_dev *sdev) diff --cc sound/soc/sof/intel/hda.h index 8e846684279e7,0ebc042c5ce1e..f57a9a4b0b753 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@@ -573,10 -576,8 +576,10 @@@ struct sof_intel_hda_stream /* * DSP Core services. */ +int hda_dsp_probe_early(struct snd_sof_dev *sdev); int hda_dsp_probe(struct snd_sof_dev *sdev); - int hda_dsp_remove(struct snd_sof_dev *sdev); + void hda_dsp_remove(struct snd_sof_dev *sdev); +int hda_dsp_remove_late(struct snd_sof_dev *sdev); int hda_dsp_core_power_up(struct snd_sof_dev *sdev, unsigned int core_mask); int hda_dsp_core_run(struct snd_sof_dev *sdev, unsigned int core_mask); int hda_dsp_enable_core(struct snd_sof_dev *sdev, unsigned int core_mask); diff --cc sound/soc/sof/ops.h index 3ebcfc2373854,5be1cf80bb420..09d1452e37052 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@@ -51,22 -43,12 +51,20 @@@ static inline int snd_sof_probe(struct return sof_ops(sdev)->probe(sdev); } - static inline int snd_sof_remove(struct snd_sof_dev *sdev) + static inline void snd_sof_remove(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->remove) - return sof_ops(sdev)->remove(sdev); - - return 0; + sof_ops(sdev)->remove(sdev); } +static inline int snd_sof_remove_late(struct snd_sof_dev *sdev) +{ + if (sof_ops(sdev)->remove_late) + return sof_ops(sdev)->remove_late(sdev); + + return 0; +} + static inline int snd_sof_shutdown(struct snd_sof_dev *sdev) { if (sof_ops(sdev)->shutdown) diff --cc sound/soc/sof/sof-priv.h index e73a92189fe1f,40bca5f804280..f712bd39d13d1 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@@ -165,10 -165,8 +165,10 @@@ struct sof_firmware struct snd_sof_dsp_ops { /* probe/remove/shutdown */ + int (*probe_early)(struct snd_sof_dev *sof_dev); /* optional */ int (*probe)(struct snd_sof_dev *sof_dev); /* mandatory */ - int (*remove)(struct snd_sof_dev *sof_dev); /* optional */ + void (*remove)(struct snd_sof_dev *sof_dev); /* optional */ + int (*remove_late)(struct snd_sof_dev *sof_dev); /* optional */ int (*shutdown)(struct snd_sof_dev *sof_dev); /* optional */ /* DSP core boot / reset */