sound/soc/fsl/fsl_micfil.c
Source file repositories/reference/linux-study-clean/sound/soc/fsl/fsl_micfil.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/fsl/fsl_micfil.c- Extension
.c- Size
- 50079 bytes
- Lines
- 1750
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/clk.hlinux/device.hlinux/interrupt.hlinux/kobject.hlinux/kernel.hlinux/module.hlinux/of.hlinux/of_address.hlinux/of_irq.hlinux/of_platform.hlinux/pm_runtime.hlinux/regmap.hlinux/sysfs.hlinux/types.hlinux/dma/imx-dma.hlinux/log2.hsound/dmaengine_pcm.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/tlv.hsound/core.hfsl_micfil.hfsl_utils.h
Detected Declarations
struct fsl_micfilstruct fsl_micfil_soc_dataenum qualityfunction micfil_get_max_rangefunction micfil_range_setfunction micfil_set_qualityfunction micfil_quality_getfunction micfil_quality_setfunction micfil_put_dc_remover_statefunction micfil_get_dc_remover_statefunction micfil_put_dc_out_remover_statefunction micfil_get_dc_out_remover_statefunction hwvad_put_enablefunction hwvad_get_enablefunction hwvad_put_init_modefunction hwvad_get_init_modefunction hwvad_detectedfunction fsl_micfil_use_veridfunction fsl_micfil_resetfunction fsl_micfil_startupfunction fsl_micfil_configure_hwvad_interruptsfunction fsl_micfil_init_hwvad_energy_modefunction fsl_micfil_init_hwvad_envelope_modefunction fsl_micfil_hwvad_enablefunction fsl_micfil_hwvad_disablefunction fsl_micfil_triggerfunction fsl_micfil_reparent_rootclkfunction fsl_micfil_hw_paramsfunction fsl_micfil_hw_freefunction fsl_micfil_dai_probefunction fsl_micfil_component_probefunction fsl_micfil_readable_regfunction fsl_micfil_writeable_regfunction fsl_micfil_volatile_regfunction micfil_isrfunction micfil_err_isrfunction voice_detected_fnfunction hwvad_isrfunction hwvad_err_isrfunction fsl_micfil_probefunction fsl_micfil_removefunction fsl_micfil_runtime_suspendfunction fsl_micfil_runtime_resume
Annotated Snippet
struct fsl_micfil {
struct platform_device *pdev;
struct regmap *regmap;
const struct fsl_micfil_soc_data *soc;
struct clk *busclk;
struct clk *mclk;
struct clk *pll8k_clk;
struct clk *pll11k_clk;
struct clk *clk_src[MICFIL_CLK_SRC_NUM];
struct snd_dmaengine_dai_dma_data dma_params_rx;
struct sdma_peripheral_config sdmacfg;
struct snd_soc_card *card;
struct snd_pcm_hw_constraint_list constraint_rates;
unsigned int constraint_rates_list[MICFIL_NUM_RATES];
unsigned int dataline;
char name[32];
int irq[MICFIL_IRQ_LINES];
enum quality quality;
int dc_remover;
int dc_out_remover;
int vad_init_mode;
int vad_enabled;
int vad_detected;
struct fsl_micfil_verid verid;
struct fsl_micfil_param param;
bool mclk_flag; /* mclk enable flag */
bool dec_bypass;
};
struct fsl_micfil_soc_data {
unsigned int fifos;
unsigned int fifo_depth;
unsigned int dataline;
bool imx;
bool use_edma;
bool use_verid;
bool volume_sx;
u64 formats;
int fifo_offset;
enum quality default_quality;
/* stores const value in formula to calculate range */
int rangeadj_const[3][2];
};
static struct fsl_micfil_soc_data fsl_micfil_imx8mm = {
.imx = true,
.fifos = 8,
.fifo_depth = 8,
.dataline = 0xf,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
.volume_sx = true,
.fifo_offset = 0,
.default_quality = QUALITY_VLOW0,
};
static struct fsl_micfil_soc_data fsl_micfil_imx8mp = {
.imx = true,
.fifos = 8,
.fifo_depth = 32,
.dataline = 0xf,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
.volume_sx = false,
.fifo_offset = 0,
.default_quality = QUALITY_MEDIUM,
.rangeadj_const = {{27, 7}, {27, 7}, {26, 7}},
};
static struct fsl_micfil_soc_data fsl_micfil_imx93 = {
.imx = true,
.fifos = 8,
.fifo_depth = 32,
.dataline = 0xf,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
.use_edma = true,
.use_verid = true,
.volume_sx = false,
.fifo_offset = 0,
.default_quality = QUALITY_MEDIUM,
.rangeadj_const = {{30, 6}, {30, 6}, {29, 6}},
};
static struct fsl_micfil_soc_data fsl_micfil_imx943 = {
.imx = true,
.fifos = 8,
.fifo_depth = 32,
.dataline = 0xf,
.formats = SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_DSD_U32_LE,
.use_edma = true,
.use_verid = true,
.volume_sx = false,
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/clk.h`, `linux/device.h`, `linux/interrupt.h`, `linux/kobject.h`, `linux/kernel.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct fsl_micfil`, `struct fsl_micfil_soc_data`, `enum quality`, `function micfil_get_max_range`, `function micfil_range_set`, `function micfil_set_quality`, `function micfil_quality_get`, `function micfil_quality_set`, `function micfil_put_dc_remover_state`, `function micfil_get_dc_remover_state`.
- 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.