include/sound/ac97/codec.h
Source file repositories/reference/linux-study-clean/include/sound/ac97/codec.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/ac97/codec.h- Extension
.h- Size
- 3347 bytes
- Lines
- 117
- Domain
- Driver Families
- Bucket
- include/sound
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.h
Detected Declarations
struct ac97_controllerstruct clkstruct ac97_idstruct ac97_codec_devicestruct ac97_codec_driverfunction snd_ac97_codec_driver_registerfunction snd_ac97_codec_driver_unregisterfunction ac97_set_drvdata
Annotated Snippet
struct device_driver driver;
int (*probe)(struct ac97_codec_device *);
void (*remove)(struct ac97_codec_device *dev);
void (*shutdown)(struct ac97_codec_device *);
const struct ac97_id *id_table;
};
static inline struct ac97_codec_device *to_ac97_device(struct device *d)
{
return container_of(d, struct ac97_codec_device, dev);
}
#define to_ac97_driver(__drv) container_of_const(__drv, struct ac97_codec_driver, driver)
#if IS_ENABLED(CONFIG_AC97_BUS_NEW)
int snd_ac97_codec_driver_register(struct ac97_codec_driver *drv);
void snd_ac97_codec_driver_unregister(struct ac97_codec_driver *drv);
#else
static inline int
snd_ac97_codec_driver_register(struct ac97_codec_driver *drv)
{
return 0;
}
static inline void
snd_ac97_codec_driver_unregister(struct ac97_codec_driver *drv)
{
}
#endif
static inline struct device *
ac97_codec_dev2dev(struct ac97_codec_device *adev)
{
return &adev->dev;
}
static inline void *ac97_get_drvdata(struct ac97_codec_device *adev)
{
return dev_get_drvdata(ac97_codec_dev2dev(adev));
}
static inline void ac97_set_drvdata(struct ac97_codec_device *adev,
void *data)
{
dev_set_drvdata(ac97_codec_dev2dev(adev), data);
}
static inline void *snd_ac97_codec_get_platdata(const struct ac97_codec_device *adev)
{
return NULL;
}
#endif
Annotation
- Immediate include surface: `linux/device.h`.
- Detected declarations: `struct ac97_controller`, `struct clk`, `struct ac97_id`, `struct ac97_codec_device`, `struct ac97_codec_driver`, `function snd_ac97_codec_driver_register`, `function snd_ac97_codec_driver_unregister`, `function ac97_set_drvdata`.
- Atlas domain: Driver Families / include/sound.
- Implementation status: pattern 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.