sound/hda/core/i915.c
Source file repositories/reference/linux-study-clean/sound/hda/core/i915.c
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/core/i915.c- Extension
.c- Size
- 6096 bytes
- Lines
- 209
- Domain
- Driver Families
- Bucket
- sound/hda
- 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/init.hlinux/module.hlinux/pci.hsound/core.hsound/hdaudio.hsound/hda_i915.hsound/hda_register.hvideo/nomodeset.h
Detected Declarations
function CDClkfunction connectivity_checkfunction i915_component_master_matchfunction i915_gfx_presentfunction for_each_pci_devfunction snd_hdac_i915_initexport snd_hdac_i915_set_bclkexport snd_hdac_i915_init
Annotated Snippet
if (connectivity_check(display_dev, hdac_pci)) {
pci_dev_put(display_dev);
return true;
}
}
return false;
}
/**
* snd_hdac_i915_init - Initialize i915 audio component
* @bus: HDA core bus
*
* This function is supposed to be used only by a HD-audio controller
* driver that needs the interaction with i915 graphics.
*
* This function initializes and sets up the audio component to communicate
* with i915 graphics driver.
*
* Returns zero for success or a negative error code.
*/
int snd_hdac_i915_init(struct hdac_bus *bus)
{
struct drm_audio_component *acomp;
int err;
if (!i915_gfx_present(to_pci_dev(bus->dev)))
return -ENODEV;
err = snd_hdac_acomp_init(bus, NULL,
i915_component_master_match,
sizeof(struct i915_audio_component) - sizeof(*acomp));
if (err < 0)
return err;
acomp = bus->audio_component;
if (!acomp)
return -ENODEV;
if (!acomp->ops) {
snd_hdac_acomp_exit(bus);
return dev_err_probe(bus->dev, -EPROBE_DEFER,
"couldn't bind with audio component\n");
}
return 0;
}
EXPORT_SYMBOL_GPL(snd_hdac_i915_init);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/pci.h`, `sound/core.h`, `sound/hdaudio.h`, `sound/hda_i915.h`, `sound/hda_register.h`, `video/nomodeset.h`.
- Detected declarations: `function CDClk`, `function connectivity_check`, `function i915_component_master_match`, `function i915_gfx_present`, `function for_each_pci_dev`, `function snd_hdac_i915_init`, `export snd_hdac_i915_set_bclk`, `export snd_hdac_i915_init`.
- Atlas domain: Driver Families / sound/hda.
- 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.