sound/soc/intel/avs/skl.c
Source file repositories/reference/linux-study-clean/sound/soc/intel/avs/skl.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/intel/avs/skl.c- Extension
.c- Size
- 4805 bytes
- Lines
- 181
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/devcoredump.hlinux/slab.hsound/hdaudio_ext.havs.hcldma.hdebug.hmessages.hregisters.h
Detected Declarations
function avs_skl_ipc_interruptfunction avs_skl_dsp_interruptfunction avs_skl_enable_logsfunction for_each_set_bitfunction avs_skl_log_buffer_offsetfunction avs_skl_log_buffer_statusfunction avs_skl_coredumpfunction avs_skl_d0ix_togglefunction avs_skl_set_d0ix
Annotated Snippet
for_each_set_bit(i, &resource_mask, num_cores) {
info->logs_core[i].enable = enable;
info->logs_core[i].min_priority = *priorities++;
}
else
for_each_set_bit(i, &resource_mask, num_cores)
info->logs_core[i].enable = enable;
ret = avs_ipc_set_enable_logs(adev, (u8 *)info, size);
kfree(info);
if (ret)
return AVS_IPC_RET(ret);
return 0;
}
int avs_skl_log_buffer_offset(struct avs_dev *adev, u32 core)
{
return core * avs_log_buffer_size(adev);
}
/* fw DbgLogWp registers */
#define FW_REGS_DBG_LOG_WP(core) (0x30 + 0x4 * core)
static int avs_skl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg)
{
void __iomem *buf;
u16 size, write, offset;
if (!avs_logging_fw(adev))
return 0;
size = avs_log_buffer_size(adev) / 2;
write = readl(avs_sram_addr(adev, AVS_FW_REGS_WINDOW) + FW_REGS_DBG_LOG_WP(msg->log.core));
/* determine buffer half */
offset = (write < size) ? size : 0;
/* Address is guaranteed to exist in SRAM2. */
buf = avs_log_buffer_addr(adev, msg->log.core) + offset;
avs_dump_fw_log_wakeup(adev, buf, size);
return 0;
}
static int avs_skl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
{
u8 *dump;
dump = vzalloc(AVS_FW_REGS_SIZE);
if (!dump)
return -ENOMEM;
memcpy_fromio(dump, avs_sram_addr(adev, AVS_FW_REGS_WINDOW), AVS_FW_REGS_SIZE);
dev_coredumpv(adev->dev, dump, AVS_FW_REGS_SIZE, GFP_KERNEL);
return 0;
}
static bool avs_skl_d0ix_toggle(struct avs_dev *adev, struct avs_ipc_msg *tx, bool wake)
{
/* unsupported on cAVS 1.5 hw */
return false;
}
static int avs_skl_set_d0ix(struct avs_dev *adev, bool enable)
{
/* unsupported on cAVS 1.5 hw */
return 0;
}
const struct avs_dsp_ops avs_skl_dsp_ops = {
.power = avs_dsp_core_power,
.reset = avs_dsp_core_reset,
.stall = avs_dsp_core_stall,
.dsp_interrupt = avs_skl_dsp_interrupt,
.int_control = avs_dsp_interrupt_control,
.load_basefw = avs_cldma_load_basefw,
.load_lib = avs_cldma_load_library,
.transfer_mods = avs_cldma_transfer_modules,
.log_buffer_offset = avs_skl_log_buffer_offset,
.log_buffer_status = avs_skl_log_buffer_status,
.coredump = avs_skl_coredump,
.d0ix_toggle = avs_skl_d0ix_toggle,
.set_d0ix = avs_skl_set_d0ix,
AVS_SET_ENABLE_LOGS_OP(skl)
};
Annotation
- Immediate include surface: `linux/devcoredump.h`, `linux/slab.h`, `sound/hdaudio_ext.h`, `avs.h`, `cldma.h`, `debug.h`, `messages.h`, `registers.h`.
- Detected declarations: `function avs_skl_ipc_interrupt`, `function avs_skl_dsp_interrupt`, `function avs_skl_enable_logs`, `function for_each_set_bit`, `function avs_skl_log_buffer_offset`, `function avs_skl_log_buffer_status`, `function avs_skl_coredump`, `function avs_skl_d0ix_toggle`, `function avs_skl_set_d0ix`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.