sound/usb/media.h
Source file repositories/reference/linux-study-clean/sound/usb/media.h
File Facts
- System
- Linux kernel
- Corpus path
sound/usb/media.h- Extension
.h- Size
- 2470 bytes
- Lines
- 75
- Domain
- Driver Families
- Bucket
- sound/usb
- 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/media.hmedia/media-device.hmedia/media-entity.hmedia/media-dev-allocator.hsound/asound.h
Detected Declarations
struct media_ctlstruct media_mixer_ctlfunction snd_media_device_createfunction snd_media_device_deletefunction snd_media_stream_deletefunction snd_media_stop_pipeline
Annotated Snippet
struct media_ctl {
struct media_device *media_dev;
struct media_entity media_entity;
struct media_intf_devnode *intf_devnode;
struct media_link *intf_link;
struct media_pad media_pad;
struct media_pipeline media_pipe;
};
/*
* One source pad each for SNDRV_PCM_STREAM_CAPTURE and
* SNDRV_PCM_STREAM_PLAYBACK. One for sink pad to link
* to AUDIO Source
*/
#define MEDIA_MIXER_PAD_MAX (SNDRV_PCM_STREAM_LAST + 2)
struct media_mixer_ctl {
struct media_device *media_dev;
struct media_entity media_entity;
struct media_intf_devnode *intf_devnode;
struct media_link *intf_link;
struct media_pad media_pad[MEDIA_MIXER_PAD_MAX];
struct media_pipeline media_pipe;
};
int snd_media_device_create(struct snd_usb_audio *chip,
struct usb_interface *iface);
void snd_media_device_delete(struct snd_usb_audio *chip);
int snd_media_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
int stream);
void snd_media_stream_delete(struct snd_usb_substream *subs);
int snd_media_start_pipeline(struct snd_usb_substream *subs);
void snd_media_stop_pipeline(struct snd_usb_substream *subs);
#else
static inline int snd_media_device_create(struct snd_usb_audio *chip,
struct usb_interface *iface)
{ return 0; }
static inline void snd_media_device_delete(struct snd_usb_audio *chip) { }
static inline int snd_media_stream_init(struct snd_usb_substream *subs,
struct snd_pcm *pcm, int stream)
{ return 0; }
static inline void snd_media_stream_delete(struct snd_usb_substream *subs) { }
static inline int snd_media_start_pipeline(struct snd_usb_substream *subs)
{ return 0; }
static inline void snd_media_stop_pipeline(struct snd_usb_substream *subs) { }
#endif
#endif /* __MEDIA_H */
Annotation
- Immediate include surface: `linux/media.h`, `media/media-device.h`, `media/media-entity.h`, `media/media-dev-allocator.h`, `sound/asound.h`.
- Detected declarations: `struct media_ctl`, `struct media_mixer_ctl`, `function snd_media_device_create`, `function snd_media_device_delete`, `function snd_media_stream_delete`, `function snd_media_stop_pipeline`.
- Atlas domain: Driver Families / sound/usb.
- 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.