sound/ppc/snd_ps3.h
Source file repositories/reference/linux-study-clean/sound/ppc/snd_ps3.h
File Facts
- System
- Linux kernel
- Corpus path
sound/ppc/snd_ps3.h- Extension
.h- Size
- 2976 bytes
- Lines
- 125
- Domain
- Driver Families
- Bucket
- sound/ppc
- 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/irqreturn.h
Detected Declarations
struct snd_ps3_avsetting_infostruct snd_ps3_card_infoenum snd_ps3_out_channelenum snd_ps3_dma_filltypeenum snd_ps3_ch
Annotated Snippet
struct snd_ps3_avsetting_info {
uint32_t avs_audio_ch; /* fixed */
uint32_t avs_audio_rate;
uint32_t avs_audio_width;
uint32_t avs_audio_format; /* fixed */
uint32_t avs_audio_source; /* fixed */
unsigned char avs_cs_info[8];
};
/*
* PS3 audio 'card' instance
* there should be only ONE hardware.
*/
struct snd_ps3_card_info {
struct ps3_system_bus_device *ps3_dev;
struct snd_card *card;
struct snd_pcm *pcm;
struct snd_pcm_substream *substream;
/* hvc info */
u64 audio_lpar_addr;
u64 audio_lpar_size;
/* registers */
void __iomem *mapped_mmio_vaddr;
/* irq */
u64 audio_irq_outlet;
unsigned int irq_no;
/* remember avsetting */
struct snd_ps3_avsetting_info avs;
/* dma buffer management */
spinlock_t dma_lock;
/* dma_lock start */
void * dma_start_vaddr[2]; /* 0 for L, 1 for R */
dma_addr_t dma_start_bus_addr[2];
size_t dma_buffer_size;
void * dma_last_transfer_vaddr[2];
void * dma_next_transfer_vaddr[2];
int silent;
/* dma_lock end */
int running;
/* null buffer */
void *null_buffer_start_vaddr;
dma_addr_t null_buffer_start_dma_addr;
/* start delay */
unsigned int start_delay;
};
/* PS3 audio DMAC block size in bytes */
#define PS3_AUDIO_DMAC_BLOCK_SIZE (128)
/* one stage (stereo) of audio FIFO in bytes */
#define PS3_AUDIO_FIFO_STAGE_SIZE (256)
/* how many stages the fifo have */
#define PS3_AUDIO_FIFO_STAGE_COUNT (8)
/* fifo size 128 bytes * 8 stages * stereo (2ch) */
#define PS3_AUDIO_FIFO_SIZE \
(PS3_AUDIO_FIFO_STAGE_SIZE * PS3_AUDIO_FIFO_STAGE_COUNT)
/* PS3 audio DMAC max block count in one dma shot = 128 (0x80) blocks*/
#define PS3_AUDIO_DMAC_MAX_BLOCKS (PS3_AUDIO_DMASIZE_BLOCKS_MASK + 1)
#define PS3_AUDIO_NORMAL_DMA_START_CH (0)
#define PS3_AUDIO_NORMAL_DMA_COUNT (8)
#define PS3_AUDIO_NULL_DMA_START_CH \
(PS3_AUDIO_NORMAL_DMA_START_CH + PS3_AUDIO_NORMAL_DMA_COUNT)
#define PS3_AUDIO_NULL_DMA_COUNT (2)
#define SND_PS3_MAX_VOL (0x0F)
#define SND_PS3_MIN_VOL (0x00)
#define SND_PS3_MIN_ATT SND_PS3_MIN_VOL
#define SND_PS3_MAX_ATT SND_PS3_MAX_VOL
#define SND_PS3_PCM_PREALLOC_SIZE \
(PS3_AUDIO_DMAC_BLOCK_SIZE * PS3_AUDIO_DMAC_MAX_BLOCKS * 4)
#define SND_PS3_DMA_REGION_SIZE \
(SND_PS3_PCM_PREALLOC_SIZE + PAGE_SIZE)
#define PS3_AUDIO_IOID (1UL)
#endif /* _SND_PS3_H_ */
Annotation
- Immediate include surface: `linux/irqreturn.h`.
- Detected declarations: `struct snd_ps3_avsetting_info`, `struct snd_ps3_card_info`, `enum snd_ps3_out_channel`, `enum snd_ps3_dma_filltype`, `enum snd_ps3_ch`.
- Atlas domain: Driver Families / sound/ppc.
- 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.