sound/soc/codecs/sma1307.h
Source file repositories/reference/linux-study-clean/sound/soc/codecs/sma1307.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/sma1307.h- Extension
.h- Size
- 13772 bytes
- Lines
- 445
- 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
sound/soc.h
Detected Declarations
struct sma1307_setting_fileenum sma1307_faultenum sma1307_modeenum sma1307_sdo_modeenum sma1307_sdo_source
Annotated Snippet
struct sma1307_setting_file {
bool status;
char *header;
int *def;
int *mode_set[5];
int checksum;
int num_mode;
size_t header_size;
size_t def_size;
size_t mode_size;
};
#define SMA1307_I2C_ADDR_00 0x1e
#define SMA1307_I2C_ADDR_01 0x3e
#define SMA1307_I2C_ADDR_10 0x5e
#define SMA1307_I2C_ADDR_11 0x7e
#define DEVICE_NAME_SMA1307A "sma1307a"
#define DEVICE_NAME_SMA1307AQ "sma1307aq"
#define SMA1307_EXTERNAL_CLOCK_19_2 0x00
#define SMA1307_EXTERNAL_CLOCK_24_576 0x01
#define SMA1307_PLL_CLKIN_MCLK 0x02
#define SMA1307_PLL_CLKIN_BCLK 0x03
#define SMA1307_OFFSET_DEFAULT_MODE 0x00
#define SMA1307_OFFSET_BURNING_MODE 0x01
#define SMA1307_SETTING_HEADER_SIZE 0x08
#define SMA1307_SETTING_DEFAULT_SIZE 0xC0
#define SMA1307_DEFAULT_SET 0x00
#define SMA1307_BINARY_FILE_SET 0x01
/* Controls Name */
#define SMA1307_REG_CTRL_NAME "Register Byte Control"
#define SMA1307_VOL_CTRL_NAME "Speaker Volume"
#define SMA1307_FORCE_MUTE_CTRL_NAME "Force Mute Switch"
#define SMA1307_TDM_RX0_POS_NAME "TDM RX Slot0 Position"
#define SMA1307_TDM_RX1_POS_NAME "TDM RX Slot1 Position"
#define SMA1307_TDM_TX0_POS_NAME "TDM TX Slot0 Position"
#define SMA1307_TDM_TX1_POS_NAME "TDM TX Slot1 Position"
#define SMA1307_OT1_SW_PROT_CTRL_NAME "OT1 SW Protection Switch"
#define SMA1307_RESET_CTRL_NAME "Reset Switch"
#define SMA1307_CHECK_FAULT_STATUS_NAME "Check Fault Status"
#define SMA1307_CHECK_FAULT_PERIOD_NAME "Check Fault Period"
/* DAPM Name */
#define SMA1307_AIF_IN_NAME "AIF IN Source"
#define SMA1307_AIF_OUT0_NAME "AIF OUT0 Source"
#define SMA1307_AIF_OUT1_NAME "AIF OUT1 Source"
/*
* SMA1307 Register Definition
*/
/* SMA1307 Register Addresses */
#define SMA1307_00_SYSTEM_CTRL 0x00
#define SMA1307_01_INPUT_CTRL1 0x01
#define SMA1307_02_BROWN_OUT_PROT1 0x02
#define SMA1307_03_BROWN_OUT_PROT2 0x03
#define SMA1307_04_BROWN_OUT_PROT3 0x04
#define SMA1307_05_BROWN_OUT_PROT8 0x05
#define SMA1307_06_BROWN_OUT_PROT9 0x06
#define SMA1307_07_BROWN_OUT_PROT10 0x07
#define SMA1307_08_BROWN_OUT_PROT11 0x08
#define SMA1307_09_OUTPUT_CTRL 0x09
#define SMA1307_0A_SPK_VOL 0x0A
#define SMA1307_0B_BST_TEST 0x0B
#define SMA1307_0C_BOOST_CTRL8 0x0C
#define SMA1307_0D_SPK_TEST 0x0D
#define SMA1307_0E_MUTE_VOL_CTRL 0x0E
#define SMA1307_0F_VBAT_TEMP_SENSING 0x0F
#define SMA1307_10_SYSTEM_CTRL1 0x10
#define SMA1307_11_SYSTEM_CTRL2 0x11
#define SMA1307_12_SYSTEM_CTRL3 0x12
#define SMA1307_13_DELAY 0x13
#define SMA1307_14_MODULATOR 0x14
#define SMA1307_15_BASS_SPK1 0x15
#define SMA1307_16_BASS_SPK2 0x16
#define SMA1307_17_BASS_SPK3 0x17
#define SMA1307_18_BASS_SPK4 0x18
#define SMA1307_19_BASS_SPK5 0x19
#define SMA1307_1A_BASS_SPK6 0x1A
#define SMA1307_1B_BASS_SPK7 0x1B
#define SMA1307_1C_BROWN_OUT_PROT20 0x1C
#define SMA1307_1D_BROWN_OUT_PROT0 0x1D
#define SMA1307_1E_TONE_GENERATOR 0x1E
#define SMA1307_1F_TONE_FINE_VOLUME 0x1F
Annotation
- Immediate include surface: `sound/soc.h`.
- Detected declarations: `struct sma1307_setting_file`, `enum sma1307_fault`, `enum sma1307_mode`, `enum sma1307_sdo_mode`, `enum sma1307_sdo_source`.
- 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.