sound/soc/codecs/rt715-sdca-sdw.c
Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt715-sdca-sdw.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/rt715-sdca-sdw.c- Extension
.c- Size
- 6795 bytes
- Lines
- 273
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/device.hlinux/mod_devicetable.hlinux/soundwire/sdw.hlinux/soundwire/sdw_type.hlinux/soundwire/sdw_registers.hlinux/module.hlinux/pm_runtime.hlinux/regmap.hsound/soc.hrt715-sdca.hrt715-sdca-sdw.h
Detected Declarations
function rt715_sdca_readable_registerfunction rt715_sdca_volatile_registerfunction rt715_sdca_mbq_readable_registerfunction rt715_sdca_mbq_volatile_registerfunction rt715_sdca_update_statusfunction rt715_sdca_read_propfunction rt715_sdca_sdw_probefunction rt715_sdca_sdw_removefunction rt715_dev_suspendfunction rt715_dev_resume
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
//
// rt715-sdca-sdw.c -- rt715 ALSA SoC audio driver
//
// Copyright(c) 2020 Realtek Semiconductor Corp.
//
//
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include <linux/soundwire/sdw_registers.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <sound/soc.h>
#include "rt715-sdca.h"
#include "rt715-sdca-sdw.h"
static bool rt715_sdca_readable_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case 0x201a ... 0x2027:
case 0x2029 ... 0x202a:
case 0x202d ... 0x2034:
case 0x2200 ... 0x2204:
case 0x2206 ... 0x2212:
case 0x2230 ... 0x2239:
case 0x2f5b:
case SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_SMPU_TRIG_ST_EN,
RT715_SDCA_SMPU_TRIG_ST_CTRL, CH_00):
return true;
default:
return false;
}
}
static bool rt715_sdca_volatile_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case 0x201b:
case 0x201c:
case 0x201d:
case 0x201f:
case 0x2021:
case 0x2023:
case 0x2230:
case 0x202d ... 0x202f: /* BRA */
case 0x2200 ... 0x2212: /* i2c debug */
case 0x2f07:
case 0x2f1b ... 0x2f1e:
case 0x2f30 ... 0x2f34:
case 0x2f50 ... 0x2f51:
case 0x2f53 ... 0x2f59:
case 0x2f5c ... 0x2f5f:
case SDW_SDCA_CTL(FUN_MIC_ARRAY, RT715_SDCA_SMPU_TRIG_ST_EN,
RT715_SDCA_SMPU_TRIG_ST_CTRL, CH_00): /* VAD Searching status */
return true;
default:
return false;
}
}
static bool rt715_sdca_mbq_readable_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case 0x2000000:
case 0x200002b:
case 0x2000036:
case 0x2000037:
case 0x2000039:
case 0x2000044:
case 0x6100000:
return true;
default:
return false;
}
}
static bool rt715_sdca_mbq_volatile_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case 0x2000000:
return true;
default:
return false;
}
}
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/mod_devicetable.h`, `linux/soundwire/sdw.h`, `linux/soundwire/sdw_type.h`, `linux/soundwire/sdw_registers.h`, `linux/module.h`, `linux/pm_runtime.h`.
- Detected declarations: `function rt715_sdca_readable_register`, `function rt715_sdca_volatile_register`, `function rt715_sdca_mbq_readable_register`, `function rt715_sdca_mbq_volatile_register`, `function rt715_sdca_update_status`, `function rt715_sdca_read_prop`, `function rt715_sdca_sdw_probe`, `function rt715_sdca_sdw_remove`, `function rt715_dev_suspend`, `function rt715_dev_resume`.
- 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.