sound/soc/fsl/fsl_easrc.h

Source file repositories/reference/linux-study-clean/sound/soc/fsl/fsl_easrc.h

File Facts

System
Linux kernel
Corpus path
sound/soc/fsl/fsl_easrc.h
Extension
.h
Size
24187 bytes
Lines
656
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 dma_block {
	void *dma_vaddr;
	unsigned int length;
	unsigned int max_buf_size;
};

struct fsl_easrc_data_fmt {
	unsigned int width : 2;
	unsigned int endianness : 1;
	unsigned int unsign : 1;
	unsigned int floating_point : 1;
	unsigned int iec958: 1;
	unsigned int sample_pos: 5;
	unsigned int addexp;
};

struct fsl_easrc_io_params {
	struct fsl_easrc_data_fmt fmt;
	unsigned int group_len;
	unsigned int iterations;
	unsigned int access_len;
	unsigned int fifo_wtmk;
	unsigned int sample_rate;
	snd_pcm_format_t sample_format;
	unsigned int norm_rate;
};

struct fsl_easrc_slot {
	bool busy;
	int ctx_index;
	int slot_index;
	int num_channel;  /* maximum is 8 */
	int min_channel;
	int max_channel;
	int pf_mem_used;
};

/**
 * fsl_easrc_ctx_priv: EASRC context private data
 *
 * @in_params: input parameter
 * @out_params:  output parameter
 * @st1_num_taps: tap number of stage 1
 * @st2_num_taps: tap number of stage 2
 * @st1_num_exp: exponent number of stage 1
 * @pf_init_mode: prefilter init mode
 * @rs_init_mode:  resample filter init mode
 * @ctx_streams: stream flag of ctx
 * @rs_ratio: resampler ratio
 * @st1_coeff: pointer of stage 1 coeff
 * @st2_coeff: pointer of stage 2 coeff
 * @in_filled_sample: input filled sample
 * @out_missed_sample: sample missed in output
 * @st1_addexp: exponent added for stage1
 * @st2_addexp: exponent added for stage2
 * @ratio_mod: update ratio
 * @in_filled_len: input filled length
 */
struct fsl_easrc_ctx_priv {
	struct fsl_easrc_io_params in_params;
	struct fsl_easrc_io_params out_params;
	unsigned int st1_num_taps;
	unsigned int st2_num_taps;
	unsigned int st1_num_exp;
	unsigned int pf_init_mode;
	unsigned int rs_init_mode;
	unsigned int ctx_streams;
	u64 rs_ratio;
	u64 *st1_coeff;
	u64 *st2_coeff;
	int in_filled_sample;
	int out_missed_sample;
	int st1_addexp;
	int st2_addexp;
	int ratio_mod;
	unsigned int in_filled_len;
};

/**
 * fsl_easrc_priv: EASRC private data
 *
 * @slot: slot setting
 * @firmware_hdr:  the header of firmware
 * @interp: pointer to interpolation filter coeff
 * @prefil: pointer to prefilter coeff
 * @fw: firmware of coeff table
 * @fw_name: firmware name
 * @rs_num_taps:  resample filter taps, 32, 64, or 128
 * @bps_iec958: bits per sample of iec958
 * @rs_coeff: resampler coefficient

Annotation

Implementation Notes