sound/soc/ux500/ux500_msp_i2s.h

Source file repositories/reference/linux-study-clean/sound/soc/ux500/ux500_msp_i2s.h

File Facts

System
Linux kernel
Corpus path
sound/soc/ux500/ux500_msp_i2s.h
Extension
.h
Size
11793 bytes
Lines
488
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 msp_multichannel_config {
	bool rx_multichannel_enable;
	bool tx_multichannel_enable;
	enum msp_rx_comparison_enable_mode rx_comparison_enable_mode;
	u8 padding;
	u32 comparison_value;
	u32 comparison_mask;
	u32 rx_channel_0_enable;
	u32 rx_channel_1_enable;
	u32 rx_channel_2_enable;
	u32 rx_channel_3_enable;
	u32 tx_channel_0_enable;
	u32 tx_channel_1_enable;
	u32 tx_channel_2_enable;
	u32 tx_channel_3_enable;
};

struct msp_protdesc {
	u32 rx_phase_mode;
	u32 tx_phase_mode;
	u32 rx_phase2_start_mode;
	u32 tx_phase2_start_mode;
	u32 rx_byte_order;
	u32 tx_byte_order;
	u32 rx_frame_len_1;
	u32 rx_frame_len_2;
	u32 tx_frame_len_1;
	u32 tx_frame_len_2;
	u32 rx_elem_len_1;
	u32 rx_elem_len_2;
	u32 tx_elem_len_1;
	u32 tx_elem_len_2;
	u32 rx_data_delay;
	u32 tx_data_delay;
	u32 rx_clk_pol;
	u32 tx_clk_pol;
	u32 rx_fsync_pol;
	u32 tx_fsync_pol;
	u32 rx_half_word_swap;
	u32 tx_half_word_swap;
	u32 compression_mode;
	u32 expansion_mode;
	u32 frame_sync_ignore;
	u32 frame_period;
	u32 frame_width;
	u32 clocks_per_frame;
};

struct ux500_msp_config {
	unsigned int f_inputclk;
	unsigned int rx_clk_sel;
	unsigned int tx_clk_sel;
	unsigned int srg_clk_sel;
	unsigned int rx_fsync_pol;
	unsigned int tx_fsync_pol;
	unsigned int rx_fsync_sel;
	unsigned int tx_fsync_sel;
	unsigned int rx_fifo_config;
	unsigned int tx_fifo_config;
	unsigned int loopback_enable;
	unsigned int tx_data_enable;
	unsigned int default_protdesc;
	struct msp_protdesc protdesc;
	int multichannel_configured;
	struct msp_multichannel_config multichannel_config;
	unsigned int direction;
	unsigned int protocol;
	unsigned int frame_freq;
	enum msp_data_size data_size;
	unsigned int def_elem_len;
	unsigned int iodelay;
};

struct ux500_msp {
	int id;
	void __iomem *registers;
	struct device *dev;
	dma_addr_t tx_rx_addr;
	enum msp_state msp_state;
	int def_elem_len;
	unsigned int dir_busy;
	int loopback_enable;
	unsigned int f_bitclk;
};

int ux500_msp_i2s_init_msp(struct platform_device *pdev,
			struct ux500_msp **msp_p);
void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
			struct ux500_msp *msp);
int ux500_msp_i2s_open(struct ux500_msp *msp, struct ux500_msp_config *config);

Annotation

Implementation Notes