sound/soc/sof/intel/skl.c
Source file repositories/reference/linux-study-clean/sound/soc/sof/intel/skl.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/intel/skl.c- Extension
.c- Size
- 3236 bytes
- Lines
- 119
- 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.
- 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/delay.hlinux/device.hlinux/dma-mapping.hlinux/firmware.hlinux/fs.hlinux/interrupt.hlinux/module.hlinux/slab.hlinux/pci.hsound/hdaudio_ext.hsound/pcm_params.hsound/sof.hsound/sof/ext_manifest4.h../sof-priv.h../ipc4-priv.h../ops.hhda.h../sof-audio.h
Detected Declarations
function skl_dsp_ipc_get_window_offsetfunction skl_dsp_ipc_get_mailbox_offsetfunction sof_skl_ops_init
Annotated Snippet
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
//
// This file is provided under a dual BSD/GPLv2 license. When using or
// redistributing this file, you may do so under either license.
//
// Copyright(c) 2018-2022 Intel Corporation
//
/*
* Hardware interface for audio DSP on Skylake and Kabylake.
*/
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/firmware.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <sound/hdaudio_ext.h>
#include <sound/pcm_params.h>
#include <sound/sof.h>
#include <sound/sof/ext_manifest4.h>
#include "../sof-priv.h"
#include "../ipc4-priv.h"
#include "../ops.h"
#include "hda.h"
#include "../sof-audio.h"
#define SRAM_MEMORY_WINDOW_BASE 0x8000
static const __maybe_unused struct snd_sof_debugfs_map skl_dsp_debugfs[] = {
{"hda", HDA_DSP_HDA_BAR, 0, 0x4000},
{"pp", HDA_DSP_PP_BAR, 0, 0x1000},
{"dsp", HDA_DSP_BAR, 0, 0x10000},
};
static int skl_dsp_ipc_get_window_offset(struct snd_sof_dev *sdev, u32 id)
{
return SRAM_MEMORY_WINDOW_BASE + (0x2000 * id);
}
static int skl_dsp_ipc_get_mailbox_offset(struct snd_sof_dev *sdev)
{
return SRAM_MEMORY_WINDOW_BASE + 0x1000;
}
/* skylake ops */
struct snd_sof_dsp_ops sof_skl_ops;
EXPORT_SYMBOL_NS(sof_skl_ops, "SND_SOC_SOF_INTEL_HDA_COMMON");
int sof_skl_ops_init(struct snd_sof_dev *sdev)
{
struct sof_ipc4_fw_data *ipc4_data;
/* common defaults */
memcpy(&sof_skl_ops, &sof_hda_common_ops, sizeof(struct snd_sof_dsp_ops));
/* probe/remove/shutdown */
sof_skl_ops.shutdown = hda_dsp_shutdown;
sdev->private = kzalloc_obj(*ipc4_data);
if (!sdev->private)
return -ENOMEM;
ipc4_data = sdev->private;
ipc4_data->manifest_fw_hdr_offset = SOF_MAN4_FW_HDR_OFFSET_CAVS_1_5;
ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_1_5;
sof_skl_ops.get_window_offset = skl_dsp_ipc_get_window_offset;
sof_skl_ops.get_mailbox_offset = skl_dsp_ipc_get_mailbox_offset;
/* doorbell */
sof_skl_ops.irq_thread = hda_dsp_ipc4_irq_thread;
/* ipc */
sof_skl_ops.send_msg = hda_dsp_ipc4_send_msg;
/* set DAI driver ops */
hda_set_dai_drv_ops(sdev, &sof_skl_ops);
/* debug */
sof_skl_ops.debug_map = skl_dsp_debugfs;
sof_skl_ops.debug_map_count = ARRAY_SIZE(skl_dsp_debugfs);
sof_skl_ops.ipc_dump = hda_ipc4_dump;
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/firmware.h`, `linux/fs.h`, `linux/interrupt.h`, `linux/module.h`, `linux/slab.h`.
- Detected declarations: `function skl_dsp_ipc_get_window_offset`, `function skl_dsp_ipc_get_mailbox_offset`, `function sof_skl_ops_init`.
- 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.