sound/pci/lola/lola.h

Source file repositories/reference/linux-study-clean/sound/pci/lola/lola.h

File Facts

System
Linux kernel
Corpus path
sound/pci/lola/lola.h
Extension
.h
Size
15888 bytes
Lines
512
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct lola_bar {
	unsigned long addr;
	void __iomem *remap_addr;
};

/* CORB/RIRB */
struct lola_rb {
	__le32 *buf;		/* CORB/RIRB buffer, 8 byte per each entry */
	dma_addr_t addr;	/* physical address of CORB/RIRB buffer */
	unsigned short rp, wp;	/* read/write pointers */
	int cmds;		/* number of pending requests */
};

/* Pin widget setup */
struct lola_pin {
	unsigned int nid;
	bool is_analog;
	unsigned int amp_mute;
	unsigned int amp_step_size;
	unsigned int amp_num_steps;
	unsigned int amp_offset;
	unsigned int max_level;
	unsigned int config_default_reg;
	unsigned int fixed_gain_list_len;
	unsigned int cur_gain_step;
};

struct lola_pin_array {
	unsigned int num_pins;
	unsigned int num_analog_pins;
	struct lola_pin pins[MAX_PINS];
};

/* Clock widget setup */
struct lola_sample_clock {
	unsigned int type;
	unsigned int format;
	unsigned int freq;
};

struct lola_clock_widget {
	unsigned int nid;
	unsigned int items;
	unsigned int cur_index;
	unsigned int cur_freq;
	bool cur_valid;
	struct lola_sample_clock sample_clock[MAX_SAMPLE_CLOCK_COUNT];
	unsigned int idx_lookup[MAX_SAMPLE_CLOCK_COUNT];
};

#define LOLA_MIXER_DIM      32
struct lola_mixer_array {
	u32 src_gain_enable;
	u32 dest_mix_gain_enable[LOLA_MIXER_DIM];
	u16 src_gain[LOLA_MIXER_DIM];
	u16 dest_mix_gain[LOLA_MIXER_DIM][LOLA_MIXER_DIM];
};

/* Mixer widget setup */
struct lola_mixer_widget {
	unsigned int nid;
	unsigned int caps;
	struct lola_mixer_array __iomem *array;
	struct lola_mixer_array *array_saved;
	unsigned int src_stream_outs;
	unsigned int src_phys_ins;
	unsigned int dest_stream_ins;
	unsigned int dest_phys_outs;
	unsigned int src_stream_out_ofs;
	unsigned int dest_phys_out_ofs;
	unsigned int src_mask;
	unsigned int dest_mask;
};

/* Audio stream */
struct lola_stream {
	unsigned int nid;	/* audio widget NID */
	unsigned int index;	/* array index */
	unsigned int dsd;	/* DSD index */
	bool can_float;
	struct snd_pcm_substream *substream; /* assigned PCM substream */
	struct lola_stream *master;	/* master stream (for multi-channel) */

	/* buffer setup */
	unsigned int bufsize;
	unsigned int period_bytes;
	unsigned int frags;

	/* format + channel setup */
	unsigned int format_verb;

Annotation

Implementation Notes