sound/soc/sof/imx/imx9.c
Source file repositories/reference/linux-study-clean/sound/soc/sof/imx/imx9.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/imx/imx9.c- Extension
.c- Size
- 2812 bytes
- Lines
- 118
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/firmware/imx/sm.himx-common.h
Detected Declarations
function imx95_ops_initfunction imx95_chip_probefunction imx95_core_kickfunction imx95_core_shutdown
Annotated Snippet
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
/*
* Copyright 2025 NXP
*/
#include <linux/firmware/imx/sm.h>
#include "imx-common.h"
#define IMX95_M7_CPU_ID 0x1
#define IMX95_M7_LM_ID 0x1
static struct snd_soc_dai_driver imx95_dai[] = {
IMX_SOF_DAI_DRV_ENTRY_BIDIR("sai3", 1, 32),
};
static struct snd_sof_dsp_ops sof_imx9_ops;
static int imx95_ops_init(struct snd_sof_dev *sdev)
{
/* first copy from template */
memcpy(&sof_imx9_ops, &sof_imx_ops, sizeof(sof_imx_ops));
/* ... and finally set DAI driver */
sof_imx9_ops.drv = get_chip_info(sdev)->drv;
sof_imx9_ops.num_drv = get_chip_info(sdev)->num_drv;
return 0;
}
static int imx95_chip_probe(struct snd_sof_dev *sdev)
{
struct platform_device *pdev;
struct resource *res;
pdev = to_platform_device(sdev->dev);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sram");
if (!res)
return dev_err_probe(sdev->dev, -ENODEV,
"failed to fetch SRAM region\n");
return scmi_imx_lmm_reset_vector_set(IMX95_M7_LM_ID, IMX95_M7_CPU_ID,
0, res->start);
}
static int imx95_core_kick(struct snd_sof_dev *sdev)
{
return scmi_imx_lmm_operation(IMX95_M7_LM_ID, SCMI_IMX_LMM_BOOT, 0);
}
static int imx95_core_shutdown(struct snd_sof_dev *sdev)
{
return scmi_imx_lmm_operation(IMX95_M7_LM_ID,
SCMI_IMX_LMM_SHUTDOWN,
SCMI_IMX_LMM_OP_FORCEFUL);
}
static const struct imx_chip_ops imx95_chip_ops = {
.probe = imx95_chip_probe,
.core_kick = imx95_core_kick,
.core_shutdown = imx95_core_shutdown,
};
static struct imx_memory_info imx95_memory_regions[] = {
{ .name = "sram", .reserved = false },
{ }
};
static const struct imx_chip_info imx95_chip_info = {
.ipc_info = {
.boot_mbox_offset = 0x6001000,
.window_offset = 0x6000000,
},
.has_dma_reserved = true,
.memory = imx95_memory_regions,
.drv = imx95_dai,
.num_drv = ARRAY_SIZE(imx95_dai),
.ops = &imx95_chip_ops,
};
static struct snd_sof_of_mach sof_imx9_machs[] = {
{
.compatible = "fsl,imx95-19x19-evk",
.sof_tplg_filename = "sof-imx95-wm8962.tplg",
.drv_name = "asoc-audio-graph-card2",
},
{
}
};
Annotation
- Immediate include surface: `linux/firmware/imx/sm.h`, `imx-common.h`.
- Detected declarations: `function imx95_ops_init`, `function imx95_chip_probe`, `function imx95_core_kick`, `function imx95_core_shutdown`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source 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.