sound/soc/codecs/rt1318-sdw.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt1318-sdw.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/rt1318-sdw.c- Extension
.c- Size
- 21210 bytes
- Lines
- 859
- 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/delay.hlinux/device.hlinux/pm_runtime.hlinux/mod_devicetable.hlinux/module.hlinux/regmap.hlinux/dmi.hlinux/firmware.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc-dapm.hsound/initval.hrt1318-sdw.h
Detected Declarations
function rt1318_readable_registerfunction rt1318_volatile_registerfunction rt1318_read_propfunction rt1318_io_initfunction rt1318_update_statusfunction rt1318_classd_eventfunction rt1318_set_sdw_streamfunction rt1318_sdw_shutdownfunction rt1318_sdw_hw_paramsfunction rt1318_sdw_pcm_hw_freefunction rt1318_sdw_component_probefunction rt1318_sdw_initfunction rt1318_sdw_probefunction rt1318_sdw_removefunction rt1318_dev_suspendfunction rt1318_dev_resume
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
//
// rt1318-sdw.c -- rt1318 SDCA ALSA SoC amplifier audio driver
//
// Copyright(c) 2022 Realtek Semiconductor Corp.
//
//
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/pm_runtime.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/dmi.h>
#include <linux/firmware.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include "rt1318-sdw.h"
static const struct reg_sequence rt1318_blind_write[] = {
{ 0xc001, 0x43 },
{ 0xc003, 0xa2 },
{ 0xc004, 0x44 },
{ 0xc005, 0x44 },
{ 0xc006, 0x33 },
{ 0xc007, 0x64 },
{ 0xc320, 0x20 },
{ 0xf203, 0x18 },
{ 0xf211, 0x00 },
{ 0xf212, 0x26 },
{ 0xf20d, 0x17 },
{ 0xf214, 0x06 },
{ 0xf20e, 0x00 },
{ 0xf223, 0x7f },
{ 0xf224, 0xdb },
{ 0xf225, 0xee },
{ 0xf226, 0x3f },
{ 0xf227, 0x0f },
{ 0xf21a, 0x78 },
{ 0xf242, 0x3c },
{ 0xc321, 0x0b },
{ 0xc200, 0xd8 },
{ 0xc201, 0x27 },
{ 0xc202, 0x0f },
{ 0xf800, 0x20 },
{ 0xdf00, 0x10 },
{ 0xdf5f, 0x01 },
{ 0xdf60, 0xa7 },
{ 0xc400, 0x0e },
{ 0xc401, 0x43 },
{ 0xc402, 0xe0 },
{ 0xc403, 0x00 },
{ 0xc404, 0x4c },
{ 0xc407, 0x02 },
{ 0xc408, 0x3f },
{ 0xc300, 0x01 },
{ 0xc206, 0x78 },
{ 0xc203, 0x84 },
{ 0xc120, 0xc0 },
{ 0xc121, 0x03 },
{ 0xe000, 0x88 },
{ 0xc321, 0x09 },
{ 0xc322, 0x01 },
{ 0xe706, 0x0f },
{ 0xe707, 0x30 },
{ 0xe806, 0x0f },
{ 0xe807, 0x30 },
{ 0xed00, 0xb0 },
{ 0xce04, 0x02 },
{ 0xce05, 0x63 },
{ 0xce06, 0x68 },
{ 0xce07, 0x07 },
{ 0xcf04, 0x02 },
{ 0xcf05, 0x63 },
{ 0xcf06, 0x68 },
{ 0xcf07, 0x07 },
{ 0xce60, 0xe3 },
{ 0xc130, 0x51 },
{ 0xf102, 0x00 },
{ 0xf103, 0x00 },
{ 0xf104, 0xf5 },
{ 0xf105, 0x06 },
{ 0xf109, 0x9b },
{ 0xf10a, 0x0b },
{ 0xf10b, 0x4c },
{ 0xf10b, 0x5c },
{ 0xf102, 0x00 },
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/pm_runtime.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/regmap.h`, `linux/dmi.h`, `linux/firmware.h`.
- Detected declarations: `function rt1318_readable_register`, `function rt1318_volatile_register`, `function rt1318_read_prop`, `function rt1318_io_init`, `function rt1318_update_status`, `function rt1318_classd_event`, `function rt1318_set_sdw_stream`, `function rt1318_sdw_shutdown`, `function rt1318_sdw_hw_params`, `function rt1318_sdw_pcm_hw_free`.
- 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.