sound/soc/fsl/fsl_asrc.h
Source file repositories/reference/linux-study-clean/sound/soc/fsl/fsl_asrc.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/fsl/fsl_asrc.h- Extension
.h- Size
- 16670 bytes
- Lines
- 485
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
fsl_asrc_common.h
Detected Declarations
struct asrc_configstruct asrc_reqstruct asrc_querybufstruct asrc_convert_bufferstruct asrc_status_flagsstruct dma_blockstruct fsl_asrc_soc_datastruct fsl_asrc_pair_privstruct fsl_asrc_privenum asrc_inclkenum asrc_outclkenum asrc_word_widthenum asrc_error_status
Annotated Snippet
struct asrc_config {
enum asrc_pair_index pair;
unsigned int channel_num;
unsigned int buffer_num;
unsigned int dma_buffer_size;
unsigned int input_sample_rate;
unsigned int output_sample_rate;
snd_pcm_format_t input_format;
snd_pcm_format_t output_format;
enum asrc_inclk inclk;
enum asrc_outclk outclk;
};
struct asrc_req {
unsigned int chn_num;
enum asrc_pair_index index;
};
struct asrc_querybuf {
unsigned int buffer_index;
unsigned int input_length;
unsigned int output_length;
unsigned long input_offset;
unsigned long output_offset;
};
struct asrc_convert_buffer {
void *input_buffer_vaddr;
void *output_buffer_vaddr;
unsigned int input_buffer_length;
unsigned int output_buffer_length;
};
struct asrc_status_flags {
enum asrc_pair_index index;
unsigned int overload_error;
};
enum asrc_error_status {
ASRC_TASK_Q_OVERLOAD = 0x01,
ASRC_OUTPUT_TASK_OVERLOAD = 0x02,
ASRC_INPUT_TASK_OVERLOAD = 0x04,
ASRC_OUTPUT_BUFFER_OVERFLOW = 0x08,
ASRC_INPUT_BUFFER_UNDERRUN = 0x10,
};
struct dma_block {
dma_addr_t dma_paddr;
void *dma_vaddr;
unsigned int length;
};
/**
* fsl_asrc_soc_data: soc specific data
*
* @use_edma: using edma as dma device or not
* @channel_bits: width of ASRCNCR register for each pair
* @start_before_dma: start asrc before dma
*/
struct fsl_asrc_soc_data {
bool use_edma;
unsigned int channel_bits;
bool start_before_dma;
};
/**
* fsl_asrc_pair_priv: ASRC Pair private data
*
* @config: configuration profile
*/
struct fsl_asrc_pair_priv {
struct asrc_config *config;
};
/**
* fsl_asrc_priv: ASRC private data
*
* @asrck_clk: clock sources to driver ASRC internal logic
* @soc: soc specific data
* @clk_map: clock map for input/output clock
* @regcache_cfg: store register value of REG_ASRCFG
*/
struct fsl_asrc_priv {
struct clk *asrck_clk[ASRC_CLK_MAX_NUM];
const struct fsl_asrc_soc_data *soc;
unsigned char *clk_map[2];
u32 regcache_cfg;
};
Annotation
- Immediate include surface: `fsl_asrc_common.h`.
- Detected declarations: `struct asrc_config`, `struct asrc_req`, `struct asrc_querybuf`, `struct asrc_convert_buffer`, `struct asrc_status_flags`, `struct dma_block`, `struct fsl_asrc_soc_data`, `struct fsl_asrc_pair_priv`, `struct fsl_asrc_priv`, `enum asrc_inclk`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
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.