include/sound/ad1816a.h

Source file repositories/reference/linux-study-clean/include/sound/ad1816a.h

File Facts

System
Linux kernel
Corpus path
include/sound/ad1816a.h
Extension
.h
Size
4843 bytes
Lines
170
Domain
Driver Families
Bucket
include/sound
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

struct snd_ad1816a {
	unsigned long port;
	struct resource *res_port;
	int irq;
	int dma1;
	int dma2;

	unsigned short hardware;
	unsigned short version;

	spinlock_t lock;

	unsigned short mode;
	unsigned int clock_freq;

	struct snd_card *card;
	struct snd_pcm *pcm;

	struct snd_pcm_substream *playback_substream;
	struct snd_pcm_substream *capture_substream;
	unsigned int p_dma_size;
	unsigned int c_dma_size;

	struct snd_timer *timer;
#ifdef CONFIG_PM
	unsigned short image[48];
#endif
};


#define AD1816A_HW_AUTO		0
#define AD1816A_HW_AD1816A	1
#define AD1816A_HW_AD1815	2
#define AD1816A_HW_AD18MAX10	3

#define AD1816A_MODE_PLAYBACK	0x01
#define AD1816A_MODE_CAPTURE	0x02
#define AD1816A_MODE_TIMER	0x04
#define AD1816A_MODE_OPEN	(AD1816A_MODE_PLAYBACK |	\
				AD1816A_MODE_CAPTURE |		\
				AD1816A_MODE_TIMER)


extern int snd_ad1816a_create(struct snd_card *card, unsigned long port,
			      int irq, int dma1, int dma2,
			      struct snd_ad1816a *chip);

extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device);
extern int snd_ad1816a_mixer(struct snd_ad1816a *chip);
extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device);
#ifdef CONFIG_PM
extern void snd_ad1816a_suspend(struct snd_ad1816a *chip);
extern void snd_ad1816a_resume(struct snd_ad1816a *chip);
#endif

#endif	/* __SOUND_AD1816A_H */

Annotation

Implementation Notes