sound/soc/codecs/rt1019.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt1019.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/rt1019.c- Extension
.c- Size
- 15317 bytes
- Lines
- 610
- 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/acpi.hlinux/fs.hlinux/module.hlinux/moduleparam.hlinux/init.hlinux/delay.hlinux/pm.hlinux/regmap.hlinux/i2c.hlinux/platform_device.hlinux/firmware.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/soc-dapm.hsound/initval.hsound/tlv.hrl6231.hrt1019.h
Detected Declarations
function rt1019_volatile_registerfunction rt1019_readable_registerfunction r1019_dac_eventfunction rt1019_hw_paramsfunction rt1019_set_dai_fmtfunction rt1019_set_dai_sysclkfunction rt1019_set_dai_pllfunction rt1019_set_tdm_slotfunction rt1019_probefunction rt1019_i2c_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
//
// rt1019.c -- RT1019 ALSA SoC audio amplifier driver
// Author: Jack Yu <jack.yu@realtek.com>
//
// Copyright(c) 2021 Realtek Semiconductor Corp.
//
//
#include <linux/acpi.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/firmware.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include "rl6231.h"
#include "rt1019.h"
static const struct reg_default rt1019_reg[] = {
{ 0x0000, 0x00 },
{ 0x0011, 0x04 },
{ 0x0013, 0x00 },
{ 0x0019, 0x30 },
{ 0x001b, 0x01 },
{ 0x005c, 0x00 },
{ 0x005e, 0x10 },
{ 0x005f, 0xec },
{ 0x0061, 0x10 },
{ 0x0062, 0x19 },
{ 0x0066, 0x08 },
{ 0x0100, 0x80 },
{ 0x0100, 0x51 },
{ 0x0102, 0x23 },
{ 0x0311, 0x00 },
{ 0x0312, 0x3e },
{ 0x0313, 0x86 },
{ 0x0400, 0x03 },
{ 0x0401, 0x02 },
{ 0x0402, 0x01 },
{ 0x0504, 0xff },
{ 0x0505, 0x24 },
{ 0x0b00, 0x50 },
{ 0x0b01, 0xc3 },
};
static bool rt1019_volatile_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case RT1019_PWR_STRP_2:
case RT1019_VER_ID:
case RT1019_VEND_ID_1:
case RT1019_VEND_ID_2:
case RT1019_DEV_ID_1:
case RT1019_DEV_ID_2:
return true;
default:
return false;
}
}
static bool rt1019_readable_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case RT1019_RESET:
case RT1019_IDS_CTRL:
case RT1019_ASEL_CTRL:
case RT1019_PWR_STRP_2:
case RT1019_BEEP_TONE:
case RT1019_VER_ID:
case RT1019_VEND_ID_1:
case RT1019_VEND_ID_2:
case RT1019_DEV_ID_1:
case RT1019_DEV_ID_2:
case RT1019_SDB_CTRL:
case RT1019_CLK_TREE_1:
case RT1019_CLK_TREE_2:
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/fs.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/init.h`, `linux/delay.h`, `linux/pm.h`, `linux/regmap.h`.
- Detected declarations: `function rt1019_volatile_register`, `function rt1019_readable_register`, `function r1019_dac_event`, `function rt1019_hw_params`, `function rt1019_set_dai_fmt`, `function rt1019_set_dai_sysclk`, `function rt1019_set_dai_pll`, `function rt1019_set_tdm_slot`, `function rt1019_probe`, `function rt1019_i2c_probe`.
- 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.