sound/soc/amd/acp.h

Source file repositories/reference/linux-study-clean/sound/soc/amd/acp.h

File Facts

System
Linux kernel
Corpus path
sound/soc/amd/acp.h
Extension
.h
Size
6289 bytes
Lines
224
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 audio_substream_data {
	dma_addr_t dma_addr;
	unsigned int order;
	u16 num_of_pages;
	u16 i2s_instance;
	u16 capture_channel;
	u16 direction;
	u16 ch1;
	u16 ch2;
	u16 destination;
	u16 dma_dscr_idx_1;
	u16 dma_dscr_idx_2;
	u32 pte_offset;
	u32 sram_bank;
	u32 byte_cnt_high_reg_offset;
	u32 byte_cnt_low_reg_offset;
	u32 dma_curr_dscr;
	uint64_t size;
	u64 bytescount;
	void __iomem *acp_mmio;
};

struct audio_drv_data {
	struct snd_pcm_substream *play_i2ssp_stream;
	struct snd_pcm_substream *capture_i2ssp_stream;
	struct snd_pcm_substream *play_i2sbt_stream;
	struct snd_pcm_substream *capture_i2sbt_stream;
	struct snd_pcm_substream *play_i2s_micsp_stream;
	void __iomem *acp_mmio;
	u32 asic_type;
	snd_pcm_sframes_t delay;
};

/*
 * this structure used for platform data transfer between machine driver
 * and dma driver
 */
struct acp_platform_info {
	u16 play_i2s_instance;
	u16 cap_i2s_instance;
	u16 capture_channel;
};

union acp_dma_count {
	struct {
	u32 low;
	u32 high;
	} bcount;
	u64 bytescount;
};

enum {
	ACP_TILE_P1 = 0,
	ACP_TILE_P2,
	ACP_TILE_DSP0,
	ACP_TILE_DSP1,
	ACP_TILE_DSP2,
};

enum {
	ACP_DMA_ATTR_SHAREDMEM_TO_DAGB_ONION = 0x0,
	ACP_DMA_ATTR_SHARED_MEM_TO_DAGB_GARLIC = 0x1,
	ACP_DMA_ATTR_DAGB_ONION_TO_SHAREDMEM = 0x8,
	ACP_DMA_ATTR_DAGB_GARLIC_TO_SHAREDMEM = 0x9,
	ACP_DMA_ATTR_FORCE_SIZE = 0xF
};

typedef struct acp_dma_dscr_transfer {
	/* Specifies the source memory location for the DMA data transfer. */
	u32 src;
	/*
	 * Specifies the destination memory location to where the data will
	 * be transferred.
	 */
	u32 dest;
	/*
	 * Specifies the number of bytes need to be transferred
	 * from source to destination memory.Transfer direction & IOC enable
	 */
	u32 xfer_val;
	/* Reserved for future use */
	u32 reserved;
} acp_dma_dscr_transfer_t;

extern bool acp_bt_uart_enable;

#endif /*__ACP_HW_H */

Annotation

Implementation Notes