sound/pci/mixart/mixart.h
Source file repositories/reference/linux-study-clean/sound/pci/mixart/mixart.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/mixart/mixart.h- Extension
.h- Size
- 5918 bytes
- Lines
- 208
- Domain
- Driver Families
- Bucket
- sound/pci
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/interrupt.hlinux/mutex.hsound/pcm.h
Detected Declarations
struct mixart_uidstruct mem_areastruct mixart_routestruct mixart_mgrstruct mixart_streamstruct mixart_pipestruct snd_mixartstruct mixart_bufferinfostruct mixart_flowinfoenum mixart_pipe_status
Annotated Snippet
struct mixart_uid {
u32 object_id;
u32 desc;
};
struct mem_area {
unsigned long phys;
void __iomem *virt;
struct resource *res;
};
struct mixart_route {
unsigned char connected;
unsigned char phase_inv;
int volume;
};
/* firmware status codes */
#define MIXART_MOTHERBOARD_XLX_INDEX 0
#define MIXART_MOTHERBOARD_ELF_INDEX 1
#define MIXART_AESEBUBOARD_XLX_INDEX 2
#define MIXART_HARDW_FILES_MAX_INDEX 3 /* xilinx, elf, AESEBU xilinx */
#define MIXART_MAX_CARDS 4
#define MSG_FIFO_SIZE 16
#define MIXART_MAX_PHYS_CONNECTORS (MIXART_MAX_CARDS * 2 * 2) /* 4 * stereo * (analog+digital) */
struct mixart_mgr {
unsigned int num_cards;
struct snd_mixart *chip[MIXART_MAX_CARDS];
struct pci_dev *pci;
int irq;
/* memory-maps */
struct mem_area mem[2];
/* one and only blocking message or notification may be pending */
u32 pending_event;
wait_queue_head_t msg_sleep;
/* messages fifo */
u32 msg_fifo[MSG_FIFO_SIZE];
int msg_fifo_readptr;
int msg_fifo_writeptr;
atomic_t msg_processed; /* number of messages to be processed in irq thread */
struct mutex lock; /* interrupt lock */
struct mutex msg_lock; /* mailbox lock */
struct mutex setup_mutex; /* mutex used in hw_params, open and close */
/* hardware interface */
unsigned int dsp_loaded; /* bit flags of loaded dsp indices */
unsigned int board_type; /* read from embedded once elf file is loaded, 250 = miXart8, 251 = with AES, 252 = with Cobranet */
struct snd_dma_buffer flowinfo;
struct snd_dma_buffer bufferinfo;
struct mixart_uid uid_console_manager;
int sample_rate;
int ref_count_rate;
struct mutex mixer_mutex; /* mutex for mixer */
};
#define MIXART_STREAM_STATUS_FREE 0
#define MIXART_STREAM_STATUS_OPEN 1
#define MIXART_STREAM_STATUS_RUNNING 2
#define MIXART_STREAM_STATUS_DRAINING 3
#define MIXART_STREAM_STATUS_PAUSE 4
#define MIXART_PLAYBACK_STREAMS 4
#define MIXART_CAPTURE_STREAMS 1
#define MIXART_PCM_ANALOG 0
#define MIXART_PCM_DIGITAL 1
#define MIXART_PCM_TOTAL 2
#define MIXART_MAX_STREAM_PER_CARD (MIXART_PCM_TOTAL * (MIXART_PLAYBACK_STREAMS + MIXART_CAPTURE_STREAMS) )
#define MIXART_NOTIFY_CARD_MASK 0xF000
#define MIXART_NOTIFY_CARD_OFFSET 12
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/mutex.h`, `sound/pcm.h`.
- Detected declarations: `struct mixart_uid`, `struct mem_area`, `struct mixart_route`, `struct mixart_mgr`, `struct mixart_stream`, `struct mixart_pipe`, `struct snd_mixart`, `struct mixart_bufferinfo`, `struct mixart_flowinfo`, `enum mixart_pipe_status`.
- Atlas domain: Driver Families / sound/pci.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.