Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC/SoundWire: Simply interrupt enabling for Intel

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

It is more logical to couple interrupt enabling/disabling with
power-up/down sequences.

+29 -17
+7
drivers/soundwire/intel_ace2x.c
··· 175 175 __func__, ret); 176 176 goto out; 177 177 } 178 + 179 + hdac_bus_eml_enable_interrupt_unlocked(sdw->link_res->hbus, true, 180 + AZX_REG_ML_LEPTR_ID_SDW, true); 178 181 } 179 182 180 183 *shim_mask |= BIT(link_id); ··· 203 200 sdw->cdns.link_up = false; 204 201 205 202 *shim_mask &= ~BIT(link_id); 203 + 204 + if (!*shim_mask) 205 + hdac_bus_eml_enable_interrupt_unlocked(sdw->link_res->hbus, true, 206 + AZX_REG_ML_LEPTR_ID_SDW, false); 206 207 207 208 ret = hdac_bus_eml_sdw_power_down_unlocked(sdw->link_res->hbus, link_id); 208 209 if (ret < 0) {
+4
include/sound/hda-mlink.h
··· 15 15 void hda_bus_ml_free(struct hdac_bus *bus); 16 16 17 17 int hdac_bus_eml_get_count(struct hdac_bus *bus, bool alt, int elid); 18 + void hdac_bus_eml_enable_interrupt_unlocked(struct hdac_bus *bus, bool alt, int elid, bool enable); 18 19 void hdac_bus_eml_enable_interrupt(struct hdac_bus *bus, bool alt, int elid, bool enable); 19 20 bool hdac_bus_eml_check_interrupt(struct hdac_bus *bus, bool alt, int elid); 20 21 ··· 71 70 72 71 static inline int 73 72 hdac_bus_eml_get_count(struct hdac_bus *bus, bool alt, int elid) { return 0; } 73 + 74 + static inline void 75 + hdac_bus_eml_enable_interrupt_unlocked(struct hdac_bus *bus, bool alt, int elid, bool enable) { } 74 76 75 77 static inline void 76 78 hdac_bus_eml_enable_interrupt(struct hdac_bus *bus, bool alt, int elid, bool enable) { }
-5
sound/soc/sof/intel/hda-dsp.c
··· 858 858 859 859 static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume) 860 860 { 861 - const struct sof_intel_dsp_desc *chip; 862 861 int ret; 863 862 864 863 /* display codec must be powered before link reset */ ··· 889 890 hda_dsp_ctrl_ppcap_enable(sdev, true); 890 891 hda_dsp_ctrl_ppcap_int_enable(sdev, true); 891 892 } 892 - 893 - chip = get_chip_info(sdev->pdata); 894 - if (chip && chip->hw_ip_version >= SOF_INTEL_ACE_2_0) 895 - hda_sdw_int_enable(sdev, true); 896 893 897 894 cleanup: 898 895 /* display codec can powered off after controller init */
+18
sound/soc/sof/intel/hda-mlink.c
··· 481 481 } 482 482 EXPORT_SYMBOL_NS(hdac_bus_eml_get_count, SND_SOC_SOF_HDA_MLINK); 483 483 484 + void hdac_bus_eml_enable_interrupt_unlocked(struct hdac_bus *bus, bool alt, int elid, bool enable) 485 + { 486 + struct hdac_ext2_link *h2link; 487 + struct hdac_ext_link *hlink; 488 + 489 + h2link = find_ext2_link(bus, alt, elid); 490 + if (!h2link) 491 + return; 492 + 493 + if (!h2link->intc) 494 + return; 495 + 496 + hlink = &h2link->hext_link; 497 + 498 + hdaml_link_enable_interrupt(hlink->ml_addr + AZX_REG_ML_LCTL, enable); 499 + } 500 + EXPORT_SYMBOL_NS(hdac_bus_eml_enable_interrupt_unlocked, SND_SOC_SOF_HDA_MLINK); 501 + 484 502 void hdac_bus_eml_enable_interrupt(struct hdac_bus *bus, bool alt, int elid, bool enable) 485 503 { 486 504 struct hdac_ext2_link *h2link;
-2
sound/soc/sof/intel/hda.c
··· 866 866 dev_err(sdev->dev, "could not startup SoundWire links\n"); 867 867 goto disable_pp_cap; 868 868 } 869 - 870 - hda_sdw_int_enable(sdev, true); 871 869 } 872 870 873 871 init_waitqueue_head(&hdev->waitq);
-10
sound/soc/sof/intel/lnl.c
··· 192 192 return hdac_bus_eml_check_interrupt(bus, true, AZX_REG_ML_LEPTR_ID_SDW); 193 193 } 194 194 195 - static void lnl_enable_sdw_irq(struct snd_sof_dev *sdev, bool enable) 196 - { 197 - struct hdac_bus *bus = sof_to_bus(sdev); 198 - 199 - hdac_bus_eml_enable_interrupt(bus, true, AZX_REG_ML_LEPTR_ID_SDW, enable); 200 - } 201 - 202 195 static int lnl_dsp_disable_interrupts(struct snd_sof_dev *sdev) 203 196 { 204 - lnl_enable_sdw_irq(sdev, false); 205 197 mtl_disable_ipc_interrupts(sdev); 206 198 return mtl_enable_interrupts(sdev, false); 207 199 } ··· 229 237 .ssp_count = MTL_SSP_COUNT, 230 238 .d0i3_offset = MTL_HDA_VS_D0I3C, 231 239 .read_sdw_lcount = hda_sdw_check_lcount_ext, 232 - .enable_sdw_irq = lnl_enable_sdw_irq, 233 240 .check_sdw_irq = lnl_dsp_check_sdw_irq, 234 241 .check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq, 235 242 .sdw_process_wakeen = hda_sdw_process_wakeen_common, ··· 253 262 .ssp_count = MTL_SSP_COUNT, 254 263 .d0i3_offset = MTL_HDA_VS_D0I3C, 255 264 .read_sdw_lcount = hda_sdw_check_lcount_ext, 256 - .enable_sdw_irq = lnl_enable_sdw_irq, 257 265 .check_sdw_irq = lnl_dsp_check_sdw_irq, 258 266 .check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq, 259 267 .check_ipc_irq = mtl_dsp_check_ipc_irq,