sound/soc/fsl/fsl_asrc_common.h
Source file repositories/reference/linux-study-clean/sound/soc/fsl/fsl_asrc_common.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/fsl/fsl_asrc_common.h- Extension
.h- Size
- 5281 bytes
- Lines
- 183
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct fsl_asrc_m2m_capstruct fsl_asrc_pairstruct fsl_asrcenum asrc_pair_index
Annotated Snippet
struct fsl_asrc_m2m_cap {
u64 fmt_in;
u64 fmt_out;
int chan_min;
int chan_max;
const unsigned int *rate_in;
int rate_in_count;
const unsigned int *rate_out;
int rate_out_count;
};
/**
* fsl_asrc_pair: ASRC Pair common data
*
* @asrc: pointer to its parent module
* @error: error record
* @index: pair index (ASRC_PAIR_A, ASRC_PAIR_B, ASRC_PAIR_C)
* @channels: occupied channel number
* @desc: input and output dma descriptors
* @dma_chan: inputer and output DMA channels
* @dma_data: private dma data
* @pos: hardware pointer position
* @req_dma_chan: flag to release dev_to_dev chan
* @private: pair private area
* @complete: dma task complete
* @sample_format: format of m2m
* @rate: rate of m2m
* @buf_len: buffer length of m2m
* @dma_buffer: buffer pointers
* @first_convert: start of conversion
* @ratio_mod_flag: flag for new ratio modifier
* @ratio_mod: ratio modification
*/
struct fsl_asrc_pair {
struct fsl_asrc *asrc;
unsigned int error;
enum asrc_pair_index index;
unsigned int channels;
struct dma_async_tx_descriptor *desc[2];
struct dma_chan *dma_chan[2];
struct imx_dma_data dma_data;
unsigned int pos;
bool req_dma_chan;
void *private;
/* used for m2m */
struct completion complete[2];
snd_pcm_format_t sample_format[2];
unsigned int rate[2];
unsigned int buf_len[2];
struct snd_dma_buffer dma_buffer[2];
unsigned int first_convert;
bool ratio_mod_flag;
unsigned int ratio_mod;
};
/**
* fsl_asrc: ASRC common data
*
* @dma_params_rx: DMA parameters for receive channel
* @dma_params_tx: DMA parameters for transmit channel
* @pdev: platform device pointer
* @regmap: regmap handler
* @paddr: physical address to the base address of registers
* @mem_clk: clock source to access register
* @ipg_clk: clock source to drive peripheral
* @spba_clk: SPBA clock (optional, depending on SoC design)
* @card: compress sound card
* @lock: spin lock for resource protection
* @pair: pair pointers
* @channel_avail: non-occupied channel numbers
* @asrc_rate: default sample rate for ASoC Back-Ends
* @asrc_format: default sample format for ASoC Back-Ends
* @use_edma: edma is used
* @start_before_dma: start asrc before dma
* @get_dma_channel: function pointer
* @request_pair: function pointer
* @release_pair: function pointer
* @get_fifo_addr: function pointer
* @m2m_get_cap: function pointer
* @m2m_prepare: function pointer
* @m2m_start: function pointer
* @m2m_unprepare: function pointer
* @m2m_stop: function pointer
* @m2m_output_ready: function pointer, check output fifo ready or not
* @m2m_calc_out_len: function pointer
* @m2m_get_maxburst: function pointer
Annotation
- Detected declarations: `struct fsl_asrc_m2m_cap`, `struct fsl_asrc_pair`, `struct fsl_asrc`, `enum asrc_pair_index`.
- 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.