sound/xen/xen_snd_front_evtchnl.h
Source file repositories/reference/linux-study-clean/sound/xen/xen_snd_front_evtchnl.h
File Facts
- System
- Linux kernel
- Corpus path
sound/xen/xen_snd_front_evtchnl.h- Extension
.h- Size
- 2268 bytes
- Lines
- 89
- Domain
- Driver Families
- Bucket
- sound/xen
- 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
xen/interface/io/sndif.h
Detected Declarations
struct xen_snd_front_infostruct xen_snd_front_evtchnlstruct xen_snd_front_evtchnl_pairenum xen_snd_front_evtchnl_stateenum xen_snd_front_evtchnl_type
Annotated Snippet
struct xen_snd_front_evtchnl {
struct xen_snd_front_info *front_info;
int gref;
int port;
int irq;
int index;
/* State of the event channel. */
enum xen_snd_front_evtchnl_state state;
enum xen_snd_front_evtchnl_type type;
/* Current response id or next expected incoming event id. */
u16 evt_id;
/* Next request id. */
u16 evt_next_id;
/* Shared ring access lock. */
struct mutex ring_io_lock;
union {
struct {
struct xen_sndif_front_ring ring;
struct completion completion;
/* Serializer for backend IO: request/response. */
struct mutex req_io_lock;
/* Latest response status. */
int resp_status;
union {
struct xensnd_query_hw_param hw_param;
} resp;
} req;
struct {
struct xensnd_event_page *page;
/* This is needed to handle XENSND_EVT_CUR_POS event. */
struct snd_pcm_substream *substream;
} evt;
} u;
};
struct xen_snd_front_evtchnl_pair {
struct xen_snd_front_evtchnl req;
struct xen_snd_front_evtchnl evt;
};
int xen_snd_front_evtchnl_create_all(struct xen_snd_front_info *front_info,
int num_streams);
void xen_snd_front_evtchnl_free_all(struct xen_snd_front_info *front_info);
int xen_snd_front_evtchnl_publish_all(struct xen_snd_front_info *front_info);
void xen_snd_front_evtchnl_flush(struct xen_snd_front_evtchnl *evtchnl);
void xen_snd_front_evtchnl_set_connected(struct xen_snd_front_evtchnl *channel,
bool is_connected);
void xen_snd_front_evtchnl_pair_set_connected(struct xen_snd_front_evtchnl_pair *evt_pair,
bool is_connected);
void xen_snd_front_evtchnl_pair_clear(struct xen_snd_front_evtchnl_pair *evt_pair);
#endif /* __XEN_SND_FRONT_EVTCHNL_H */
Annotation
- Immediate include surface: `xen/interface/io/sndif.h`.
- Detected declarations: `struct xen_snd_front_info`, `struct xen_snd_front_evtchnl`, `struct xen_snd_front_evtchnl_pair`, `enum xen_snd_front_evtchnl_state`, `enum xen_snd_front_evtchnl_type`.
- Atlas domain: Driver Families / sound/xen.
- 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.