sound/core/pcm_local.h

Source file repositories/reference/linux-study-clean/sound/core/pcm_local.h

File Facts

System
Linux kernel
Corpus path
sound/core/pcm_local.h
Extension
.h
Size
3050 bytes
Lines
84
Domain
Driver Families
Bucket
sound/core
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.

Dependency Surface

Detected Declarations

Annotated Snippet

static inline void snd_pcm_timer_init(struct snd_pcm_substream *substream) {}
static inline void snd_pcm_timer_done(struct snd_pcm_substream *substream) {}
#endif

void __snd_pcm_xrun(struct snd_pcm_substream *substream);
void snd_pcm_group_init(struct snd_pcm_group *group);
void snd_pcm_sync_stop(struct snd_pcm_substream *substream, bool sync_irq);

#define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime)

/* loop over all PCM substreams */
#define for_each_pcm_substream(pcm, str, subs) \
	for ((str) = 0; (str) < 2; (str)++) \
		for ((subs) = (pcm)->streams[str].substream; (subs); \
		     (subs) = (subs)->next)

static inline void snd_pcm_dma_buffer_sync(struct snd_pcm_substream *substream,
					   enum snd_dma_sync_mode mode)
{
	if (substream->runtime->info & SNDRV_PCM_INFO_EXPLICIT_SYNC)
		snd_dma_buffer_sync(snd_pcm_get_dma_buf(substream), mode);
}

#endif	/* __SOUND_CORE_PCM_LOCAL_H */

Annotation

Implementation Notes