sound/soc/amd/acp/amd.h
Source file repositories/reference/linux-study-clean/sound/soc/amd/acp/amd.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/amd/acp/amd.h- Extension
.h- Size
- 11444 bytes
- Lines
- 366
- 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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sound/pcm.hsound/soc.hsound/soc-acpi.hsound/soc-dai.hacp_common.hchip_offset_byte.h
Detected Declarations
struct acp_chip_infostruct acp_streamstruct acp_resourcestruct snd_acp_hw_opsenum acp_configfunction acp_hw_initfunction acp_hw_deinitfunction acp_hw_en_interruptsfunction acp_hw_dis_interruptsfunction acp_get_byte_count
Annotated Snippet
struct acp_chip_info {
char *name; /* Platform name */
struct resource *res;
struct device *dev;
struct snd_soc_dai_driver *dai_driver;
unsigned int acp_rev; /* ACP Revision id */
void __iomem *base; /* ACP memory PCI base */
struct snd_acp_hw_ops *acp_hw_ops;
int (*acp_hw_ops_init)(struct acp_chip_info *chip);
struct platform_device *chip_pdev;
struct acp_resource *rsrc; /* Platform specific resources*/
struct list_head stream_list;
spinlock_t acp_lock; /* Used to protect stream_list */
struct platform_device *dmic_codec_dev;
struct platform_device *acp_plat_dev;
struct platform_device *mach_dev;
struct snd_soc_acpi_mach *machines;
int num_dai;
u32 addr;
u32 bclk_div;
u32 lrclk_div;
u32 ch_mask;
u32 tdm_tx_fmt[3];
u32 tdm_rx_fmt[3];
u32 xfer_tx_resolution[3];
u32 xfer_rx_resolution[3];
unsigned int flag; /* Distinguish b/w Legacy or Only PDM */
bool is_pdm_dev; /* flag set to true when ACP PDM controller exists */
bool is_pdm_config; /* flag set to true when PDM configuration is selected from BIOS */
bool is_i2s_config; /* flag set to true when I2S configuration is selected from BIOS */
bool tdm_mode;
};
struct acp_stream {
struct list_head list;
struct snd_pcm_substream *substream;
int irq_bit;
int dai_id;
int id;
int dir;
u64 bytescount;
u32 reg_offset;
u32 pte_offset;
u32 fifo_offset;
};
struct acp_resource {
int offset;
int no_of_ctrls;
int irqp_used;
bool soc_mclk;
u32 irq_reg_offset;
u64 scratch_reg_offset;
u64 sram_pte_offset;
};
/**
* struct snd_acp_hw_ops - ACP PCI driver platform specific ops
* @acp_init: ACP initialization
* @acp_deinit: ACP de-initialization
* @irq: ACP irq handler
* @en_interrupts: ACP enable interrupts
* @dis_interrupts: ACP disable interrupts
*/
struct snd_acp_hw_ops {
/* ACP hardware initilizations */
int (*acp_init)(struct acp_chip_info *chip);
int (*acp_deinit)(struct acp_chip_info *chip);
/* ACP Interrupts*/
irqreturn_t (*irq)(int irq, void *data);
int (*en_interrupts)(struct acp_chip_info *chip);
int (*dis_interrupts)(struct acp_chip_info *chip);
};
enum acp_config {
ACP_CONFIG_0 = 0,
ACP_CONFIG_1,
ACP_CONFIG_2,
ACP_CONFIG_3,
ACP_CONFIG_4,
ACP_CONFIG_5,
ACP_CONFIG_6,
ACP_CONFIG_7,
ACP_CONFIG_8,
ACP_CONFIG_9,
ACP_CONFIG_10,
ACP_CONFIG_11,
ACP_CONFIG_12,
Annotation
- Immediate include surface: `sound/pcm.h`, `sound/soc.h`, `sound/soc-acpi.h`, `sound/soc-dai.h`, `acp_common.h`, `chip_offset_byte.h`.
- Detected declarations: `struct acp_chip_info`, `struct acp_stream`, `struct acp_resource`, `struct snd_acp_hw_ops`, `enum acp_config`, `function acp_hw_init`, `function acp_hw_deinit`, `function acp_hw_en_interrupts`, `function acp_hw_dis_interrupts`, `function acp_get_byte_count`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.