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.

Dependency Surface

Detected Declarations

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

Implementation Notes