sound/soc/sof/intel/lnl.c
Source file repositories/reference/linux-study-clean/sound/soc/sof/intel/lnl.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/intel/lnl.c- Extension
.c- Size
- 4647 bytes
- Lines
- 181
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hlinux/firmware.hsound/hda_register.hsound/sof/ipc4/header.htrace/events/sof_intel.h../ipc4-priv.h../ops.hhda.hhda-ipc.h../sof-audio.hmtl.hlnl.hsound/hda-mlink.h
Detected Declarations
function hdac_bus_set_dsp_offloadfunction lnl_hda_dsp_probefunction lnl_hda_dsp_removefunction lnl_hda_dsp_resumefunction lnl_hda_dsp_runtime_resumefunction lnl_dsp_post_fw_runfunction sof_lnl_set_opsfunction lnl_dsp_check_sdw_irqfunction lnl_dsp_disable_interruptsfunction lnl_sdw_check_wakeen_irq
Annotated Snippet
if (!sof_debug_check_flag(SOF_DBG_IGNORE_D3_PERSISTENT)) {
hda->imrboot_supported = true;
debugfs_create_bool("skip_imr_boot",
0644, sdev->debugfs_root,
&hda->skip_imr_boot);
}
}
return 0;
}
int sof_lnl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops)
{
int ret;
ret = sof_mtl_set_ops(sdev, dsp_ops);
if (ret)
return ret;
/* probe/remove */
if (!sdev->dspless_mode_selected) {
dsp_ops->probe = lnl_hda_dsp_probe;
dsp_ops->remove = lnl_hda_dsp_remove;
}
/* post fw run */
dsp_ops->post_fw_run = lnl_dsp_post_fw_run;
/* PM */
if (!sdev->dspless_mode_selected) {
dsp_ops->resume = lnl_hda_dsp_resume;
dsp_ops->runtime_resume = lnl_hda_dsp_runtime_resume;
}
return 0;
}
EXPORT_SYMBOL_NS(sof_lnl_set_ops, "SND_SOC_SOF_INTEL_LNL");
/* Check if an SDW IRQ occurred */
bool lnl_dsp_check_sdw_irq(struct snd_sof_dev *sdev)
{
struct hdac_bus *bus = sof_to_bus(sdev);
return hdac_bus_eml_check_interrupt(bus, true, AZX_REG_ML_LEPTR_ID_SDW);
}
EXPORT_SYMBOL_NS(lnl_dsp_check_sdw_irq, "SND_SOC_SOF_INTEL_LNL");
int lnl_dsp_disable_interrupts(struct snd_sof_dev *sdev)
{
mtl_disable_ipc_interrupts(sdev);
return mtl_enable_interrupts(sdev, false);
}
EXPORT_SYMBOL_NS(lnl_dsp_disable_interrupts, "SND_SOC_SOF_INTEL_LNL");
bool lnl_sdw_check_wakeen_irq(struct snd_sof_dev *sdev)
{
struct hdac_bus *bus = sof_to_bus(sdev);
u16 wake_sts;
/*
* we need to use the global HDaudio WAKEEN/STS to be able to
* detect wakes in low-power modes. The link-specific information
* is handled in the process_wakeen() helper, this helper only
* detects a SoundWire wake without identifying the link.
*/
wake_sts = snd_hdac_chip_readw(bus, STATESTS);
/* filter out the range of SDIs that can be set for SoundWire */
return wake_sts & GENMASK(SDW_MAX_DEVICES, SDW_INTEL_DEV_NUM_IDA_MIN);
}
EXPORT_SYMBOL_NS(lnl_sdw_check_wakeen_irq, "SND_SOC_SOF_INTEL_LNL");
const struct sof_intel_dsp_desc lnl_chip_info = {
.cores_num = 5,
.init_core_mask = BIT(0),
.host_managed_cores_mask = BIT(0),
.ipc_req = MTL_DSP_REG_HFIPCXIDR,
.ipc_req_mask = MTL_DSP_REG_HFIPCXIDR_BUSY,
.ipc_ack = MTL_DSP_REG_HFIPCXIDA,
.ipc_ack_mask = MTL_DSP_REG_HFIPCXIDA_DONE,
.ipc_ctl = MTL_DSP_REG_HFIPCXCTL,
.rom_status_reg = LNL_DSP_REG_HFDSC,
.rom_init_timeout = 300,
.ssp_count = MTL_SSP_COUNT,
.d0i3_offset = MTL_HDA_VS_D0I3C,
.read_sdw_lcount = hda_sdw_check_lcount_ext,
.check_sdw_irq = lnl_dsp_check_sdw_irq,
.check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq,
.sdw_process_wakeen = hda_sdw_process_wakeen_common,
.check_ipc_irq = mtl_dsp_check_ipc_irq,
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/firmware.h`, `sound/hda_register.h`, `sound/sof/ipc4/header.h`, `trace/events/sof_intel.h`, `../ipc4-priv.h`, `../ops.h`, `hda.h`.
- Detected declarations: `function hdac_bus_set_dsp_offload`, `function lnl_hda_dsp_probe`, `function lnl_hda_dsp_remove`, `function lnl_hda_dsp_resume`, `function lnl_hda_dsp_runtime_resume`, `function lnl_dsp_post_fw_run`, `function sof_lnl_set_ops`, `function lnl_dsp_check_sdw_irq`, `function lnl_dsp_disable_interrupts`, `function lnl_sdw_check_wakeen_irq`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.