sound/soc/qcom/qdsp6/q6afe.h

Source file repositories/reference/linux-study-clean/sound/soc/qcom/qdsp6/q6afe.h

File Facts

System
Linux kernel
Corpus path
sound/soc/qcom/qdsp6/q6afe.h
Extension
.h
Size
10342 bytes
Lines
276
Domain
Driver Families
Bucket
sound/soc
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 q6afe_hdmi_cfg {
	u16                  datatype;
	u16                  channel_allocation;
	u32                  sample_rate;
	u16                  bit_width;
};

struct q6afe_slim_cfg {
	u32	sample_rate;
	u16	bit_width;
	u16	data_format;
	u16	num_channels;
	u8	ch_mapping[AFE_MAX_CHAN_COUNT];
};

struct q6afe_i2s_cfg {
	u32	sample_rate;
	u16	bit_width;
	u16	data_format;
	u16	num_channels;
	u32	sd_line_mask;
	int fmt;
};

struct q6afe_tdm_cfg {
	u16	num_channels;
	u32	sample_rate;
	u16	bit_width;
	u16	data_format;
	u16	sync_mode;
	u16	sync_src;
	u16	nslots_per_frame;
	u16	slot_width;
	u16	slot_mask;
	u32	data_align_type;
	u16	ch_mapping[AFE_MAX_CHAN_COUNT];
};

struct q6afe_cdc_dma_cfg {
	u16	sample_rate;
	u16	bit_width;
	u16	data_format;
	u16	num_channels;
	u16	active_channels_mask;
};

/**
 * struct q6afe_usb_cfg
 * @cfg_minor_version: Minor version used for tracking USB audio device
 * configuration.
 * Supported values:
 *     AFE_API_MINOR_VERSION_USB_AUDIO_CONFIG
 * @sample_rate: Sampling rate of the port
 *    Supported values:
 *      AFE_PORT_SAMPLE_RATE_8K
 *      AFE_PORT_SAMPLE_RATE_11025
 *      AFE_PORT_SAMPLE_RATE_12K
 *      AFE_PORT_SAMPLE_RATE_16K
 *      AFE_PORT_SAMPLE_RATE_22050
 *      AFE_PORT_SAMPLE_RATE_24K
 *      AFE_PORT_SAMPLE_RATE_32K
 *      AFE_PORT_SAMPLE_RATE_44P1K
 *      AFE_PORT_SAMPLE_RATE_48K
 *      AFE_PORT_SAMPLE_RATE_96K
 *      AFE_PORT_SAMPLE_RATE_192K
 * @bit_width: Bit width of the sample.
 *    Supported values: 16, 24
 * @num_channels: Number of channels
 *    Supported values: 1, 2
 **/
struct q6afe_usb_cfg {
	u32	cfg_minor_version;
	u32     sample_rate;
	u16	bit_width;
	u16	num_channels;
};

struct q6afe_port_config {
	struct q6afe_hdmi_cfg hdmi;
	struct q6afe_slim_cfg slim;
	struct q6afe_i2s_cfg i2s_cfg;
	struct q6afe_tdm_cfg tdm;
	struct q6afe_cdc_dma_cfg dma_cfg;
	struct q6afe_usb_cfg usb_audio;
};

struct q6afe_port;

struct q6afe_port *q6afe_port_get_from_id(struct device *dev, int id);
int q6afe_port_start(struct q6afe_port *port);

Annotation

Implementation Notes