sound/soc/mediatek/mt8189/mt8189-dai-pcm.c
Source file repositories/reference/linux-study-clean/sound/soc/mediatek/mt8189/mt8189-dai-pcm.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/mediatek/mt8189/mt8189-dai-pcm.c- Extension
.c- Size
- 8646 bytes
- Lines
- 333
- 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.
- 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/regmap.hsound/pcm_params.hmt8189-afe-common.hmt8189-interconnection.hmt8189-afe-clk.h
Detected Declarations
enum AUD_TX_LCH_RPTenum AUD_VBT_16K_MODEenum AUD_EXT_MODEMenum AUD_PCM_SYNC_TYPEenum AUD_BT_MODEenum AUD_PCM_AFIFO_SRCenum AUD_PCM_CLOCK_SOURCEenum AUD_PCM_WLENenum AUD_PCM_MODEenum AUD_PCM_FMTenum AUD_BCLK_OUT_INVenum AUD_PCM_ENenum AUD_PCM1_1X_EN_DOMAINenum AUD_PCM1_1X_EN_SLAVE_MODEfunction pcm_1x_rate_transformfunction pcm_rate_transformfunction mtk_dai_pcm_hw_paramsfunction mt8189_dai_pcm_register
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* MediaTek ALSA SoC Audio DAI I2S Control
*
* Copyright (c) 2025 MediaTek Inc.
* Author: Darren Ye <darren.ye@mediatek.com>
*/
#include <linux/regmap.h>
#include <sound/pcm_params.h>
#include "mt8189-afe-common.h"
#include "mt8189-interconnection.h"
#include "mt8189-afe-clk.h"
enum AUD_TX_LCH_RPT {
AUD_TX_LCH_RPT_NO_REPEAT,
AUD_TX_LCH_RPT_REPEAT
};
enum AUD_VBT_16K_MODE {
AUD_VBT_16K_MODE_DISABLE,
AUD_VBT_16K_MODE_ENABLE
};
enum AUD_EXT_MODEM {
AUD_EXT_MODEM_SELECT_INTERNAL,
AUD_EXT_MODEM_SELECT_EXTERNAL
};
enum AUD_PCM_SYNC_TYPE {
/* bck sync length = 1 */
AUD_PCM_ONE_BCK_CYCLE_SYNC,
/* bck sync length = PCM_INTF_CON1[9:13] */
AUD_PCM_EXTENDED_BCK_CYCLE_SYNC
};
enum AUD_BT_MODE {
AUD_BT_MODE_DUAL_MIC_ON_TX,
AUD_BT_MODE_SINGLE_MIC_ON_TX
};
enum AUD_PCM_AFIFO_SRC {
/* slave mode & external modem uses different crystal */
AUD_PCM_AFIFO_ASRC,
/* slave mode & external modem uses the same crystal */
AUD_PCM_AFIFO_AFIFO
};
enum AUD_PCM_CLOCK_SOURCE {
AUD_PCM_CLOCK_MASTER_MODE,
AUD_PCM_CLOCK_SLAVE_MODE
};
enum AUD_PCM_WLEN {
AUD_PCM_WLEN_PCM_32_BCK_CYCLES,
AUD_PCM_WLEN_PCM_64_BCK_CYCLES
};
enum AUD_PCM_MODE {
AUD_PCM_MODE_PCM_MODE_8K,
AUD_PCM_MODE_PCM_MODE_16K,
AUD_PCM_MODE_PCM_MODE_32K,
AUD_PCM_MODE_PCM_MODE_48K
};
enum AUD_PCM_FMT {
AUD_PCM_FMT_I2S,
AUD_PCM_FMT_EIAJ,
AUD_PCM_FMT_PCM_MODE_A,
AUD_PCM_FMT_PCM_MODE_B
};
enum AUD_BCLK_OUT_INV {
AUD_BCLK_OUT_INV_NO_INVERSE,
AUD_BCLK_OUT_INV_INVERSE
};
enum AUD_PCM_EN {
AUD_PCM_EN_DISABLE,
AUD_PCM_EN_ENABLE
};
enum AUD_PCM1_1X_EN_DOMAIN {
HOPPING_26M,
APLL,
SLAVE = 6
};
Annotation
- Immediate include surface: `linux/regmap.h`, `sound/pcm_params.h`, `mt8189-afe-common.h`, `mt8189-interconnection.h`, `mt8189-afe-clk.h`.
- Detected declarations: `enum AUD_TX_LCH_RPT`, `enum AUD_VBT_16K_MODE`, `enum AUD_EXT_MODEM`, `enum AUD_PCM_SYNC_TYPE`, `enum AUD_BT_MODE`, `enum AUD_PCM_AFIFO_SRC`, `enum AUD_PCM_CLOCK_SOURCE`, `enum AUD_PCM_WLEN`, `enum AUD_PCM_MODE`, `enum AUD_PCM_FMT`.
- 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.