sound/parisc/harmony.h
Source file repositories/reference/linux-study-clean/sound/parisc/harmony.h
File Facts
- System
- Linux kernel
- Corpus path
sound/parisc/harmony.h- Extension
.h- Size
- 4952 bytes
- Lines
- 156
- Domain
- Driver Families
- Bucket
- sound/parisc
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct harmony_bufferstruct snd_harmony
Annotated Snippet
struct harmony_buffer {
unsigned long addr;
int buf;
int count;
int size;
int coherent;
};
struct snd_harmony {
int irq;
unsigned long hpa; /* hard physical address */
void __iomem *iobase; /* remapped io address */
struct parisc_device *dev;
struct {
u32 gain;
u32 rate;
u32 format;
u32 stereo;
int playing;
int capturing;
} st;
struct snd_dma_device dma; /* playback/capture */
struct harmony_buffer pbuf;
struct harmony_buffer cbuf;
struct snd_dma_buffer gdma; /* graveyard */
struct snd_dma_buffer sdma; /* silence */
struct {
unsigned long play_intr;
unsigned long rec_intr;
unsigned long graveyard_intr;
unsigned long silence_intr;
} stats;
struct snd_pcm *pcm;
struct snd_card *card;
struct snd_pcm_substream *psubs;
struct snd_pcm_substream *csubs;
struct snd_info_entry *proc;
spinlock_t lock;
spinlock_t mixer_lock;
};
#define MAX_PCM_DEVICES 1
#define MAX_PCM_SUBSTREAMS 4
#define MAX_MIDI_DEVICES 0
#define HARMONY_SIZE 64
#define BUF_SIZE PAGE_SIZE
#define MAX_BUFS 16
#define MAX_BUF_SIZE (MAX_BUFS * BUF_SIZE)
#define PLAYBACK_BUFS MAX_BUFS
#define RECORD_BUFS MAX_BUFS
#define GRAVEYARD_BUFS 1
#define GRAVEYARD_BUFSZ (GRAVEYARD_BUFS*BUF_SIZE)
#define SILENCE_BUFS 1
#define SILENCE_BUFSZ (SILENCE_BUFS*BUF_SIZE)
#define HARMONY_ID 0x000
#define HARMONY_RESET 0x004
#define HARMONY_CNTL 0x008
#define HARMONY_GAINCTL 0x00c
#define HARMONY_PNXTADD 0x010
#define HARMONY_PCURADD 0x014
#define HARMONY_RNXTADD 0x018
#define HARMONY_RCURADD 0x01c
#define HARMONY_DSTATUS 0x020
#define HARMONY_OV 0x024
#define HARMONY_PIO 0x028
#define HARMONY_DIAG 0x03c
#define HARMONY_CNTL_C 0x80000000
#define HARMONY_CNTL_ST 0x00000020
#define HARMONY_CNTL_44100 0x00000015 /* HARMONY_SR_44KHZ */
#define HARMONY_CNTL_8000 0x00000008 /* HARMONY_SR_8KHZ */
#define HARMONY_DSTATUS_ID 0x00000000 /* interrupts off */
#define HARMONY_DSTATUS_PN 0x00000200 /* playback fill */
#define HARMONY_DSTATUS_RN 0x00000002 /* record fill */
#define HARMONY_DSTATUS_IE 0x80000000 /* interrupts on */
#define HARMONY_DF_16BIT_LINEAR 0x00000000
Annotation
- Detected declarations: `struct harmony_buffer`, `struct snd_harmony`.
- Atlas domain: Driver Families / sound/parisc.
- 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.