sound/soc/intel/boards/sof_sdw_hdmi.c
Source file repositories/reference/linux-study-clean/sound/soc/intel/boards/sof_sdw_hdmi.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/intel/boards/sof_sdw_hdmi.c- Extension
.c- Size
- 1147 bytes
- Lines
- 44
- 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/acpi.hlinux/device.hlinux/errno.hlinux/kernel.hlinux/list.hlinux/soundwire/sdw_intel.hsound/soc.hsound/soc-acpi.hsound/jack.hsof_sdw_common.hhda_dsp_common.h
Detected Declarations
function sof_sdw_hdmi_initfunction sof_sdw_hdmi_card_late_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) 2020 Intel Corporation
/*
* sof_sdw_hdmi - Helpers to handle HDMI from generic machine driver
*/
#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/soundwire/sdw_intel.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include <sound/jack.h>
#include "sof_sdw_common.h"
#include "hda_dsp_common.h"
int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd)
{
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(rtd->card);
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0);
intel_ctx->hdmi.hdmi_comp = dai->component;
return 0;
}
int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
{
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
if (!intel_ctx->hdmi.idisp_codec)
return 0;
if (!intel_ctx->hdmi.hdmi_comp)
return -EINVAL;
return hda_dsp_hdmi_build_controls(card, intel_ctx->hdmi.hdmi_comp);
}
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/device.h`, `linux/errno.h`, `linux/kernel.h`, `linux/list.h`, `linux/soundwire/sdw_intel.h`, `sound/soc.h`, `sound/soc-acpi.h`.
- Detected declarations: `function sof_sdw_hdmi_init`, `function sof_sdw_hdmi_card_late_probe`.
- 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.