sound/soc/codecs/wm9090.h

Source file repositories/reference/linux-study-clean/sound/soc/codecs/wm9090.h

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/wm9090.h
Extension
.h
Size
40796 bytes
Lines
701
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

#ifndef __WM9090_H
#define __WM9090_H

/*
 * Register values.
 */
#define WM9090_SOFTWARE_RESET                   0x00
#define WM9090_POWER_MANAGEMENT_1               0x01
#define WM9090_POWER_MANAGEMENT_2               0x02
#define WM9090_POWER_MANAGEMENT_3               0x03
#define WM9090_CLOCKING_1                       0x06
#define WM9090_IN1_LINE_CONTROL                 0x16
#define WM9090_IN2_LINE_CONTROL                 0x17
#define WM9090_IN1_LINE_INPUT_A_VOLUME          0x18
#define WM9090_IN1_LINE_INPUT_B_VOLUME          0x19
#define WM9090_IN2_LINE_INPUT_A_VOLUME          0x1A
#define WM9090_IN2_LINE_INPUT_B_VOLUME          0x1B
#define WM9090_LEFT_OUTPUT_VOLUME               0x1C
#define WM9090_RIGHT_OUTPUT_VOLUME              0x1D
#define WM9090_SPKMIXL_ATTENUATION              0x22
#define WM9090_SPKOUT_MIXERS                    0x24
#define WM9090_CLASSD3                          0x25
#define WM9090_SPEAKER_VOLUME_LEFT              0x26
#define WM9090_OUTPUT_MIXER1                    0x2D
#define WM9090_OUTPUT_MIXER2                    0x2E
#define WM9090_OUTPUT_MIXER3                    0x2F
#define WM9090_OUTPUT_MIXER4                    0x30
#define WM9090_SPEAKER_MIXER                    0x36
#define WM9090_ANTIPOP2                         0x39
#define WM9090_WRITE_SEQUENCER_0                0x46
#define WM9090_WRITE_SEQUENCER_1                0x47
#define WM9090_WRITE_SEQUENCER_2                0x48
#define WM9090_WRITE_SEQUENCER_3                0x49
#define WM9090_WRITE_SEQUENCER_4                0x4A
#define WM9090_WRITE_SEQUENCER_5                0x4B
#define WM9090_CHARGE_PUMP_1                    0x4C
#define WM9090_DC_SERVO_0                       0x54
#define WM9090_DC_SERVO_1                       0x55
#define WM9090_DC_SERVO_3                       0x57
#define WM9090_DC_SERVO_READBACK_0              0x58
#define WM9090_DC_SERVO_READBACK_1              0x59
#define WM9090_DC_SERVO_READBACK_2              0x5A
#define WM9090_ANALOGUE_HP_0                    0x60
#define WM9090_AGC_CONTROL_0                    0x62
#define WM9090_AGC_CONTROL_1                    0x63
#define WM9090_AGC_CONTROL_2                    0x64

#define WM9090_REGISTER_COUNT                   40
#define WM9090_MAX_REGISTER                     0x64

/*
 * Field Definitions.
 */

/*
 * R0 (0x00) - Software Reset
 */
#define WM9090_SW_RESET_MASK                    0xFFFF  /* SW_RESET - [15:0] */
#define WM9090_SW_RESET_SHIFT                        0  /* SW_RESET - [15:0] */
#define WM9090_SW_RESET_WIDTH                       16  /* SW_RESET - [15:0] */

/*
 * R1 (0x01) - Power Management (1)
 */
#define WM9090_SPKOUTL_ENA                      0x1000  /* SPKOUTL_ENA */
#define WM9090_SPKOUTL_ENA_MASK                 0x1000  /* SPKOUTL_ENA */
#define WM9090_SPKOUTL_ENA_SHIFT                    12  /* SPKOUTL_ENA */
#define WM9090_SPKOUTL_ENA_WIDTH                     1  /* SPKOUTL_ENA */
#define WM9090_HPOUT1L_ENA                      0x0200  /* HPOUT1L_ENA */
#define WM9090_HPOUT1L_ENA_MASK                 0x0200  /* HPOUT1L_ENA */
#define WM9090_HPOUT1L_ENA_SHIFT                     9  /* HPOUT1L_ENA */
#define WM9090_HPOUT1L_ENA_WIDTH                     1  /* HPOUT1L_ENA */
#define WM9090_HPOUT1R_ENA                      0x0100  /* HPOUT1R_ENA */
#define WM9090_HPOUT1R_ENA_MASK                 0x0100  /* HPOUT1R_ENA */
#define WM9090_HPOUT1R_ENA_SHIFT                     8  /* HPOUT1R_ENA */
#define WM9090_HPOUT1R_ENA_WIDTH                     1  /* HPOUT1R_ENA */
#define WM9090_OSC_ENA                          0x0008  /* OSC_ENA */
#define WM9090_OSC_ENA_MASK                     0x0008  /* OSC_ENA */
#define WM9090_OSC_ENA_SHIFT                         3  /* OSC_ENA */
#define WM9090_OSC_ENA_WIDTH                         1  /* OSC_ENA */
#define WM9090_VMID_RES_MASK                    0x0006  /* VMID_RES - [2:1] */
#define WM9090_VMID_RES_SHIFT                        1  /* VMID_RES - [2:1] */
#define WM9090_VMID_RES_WIDTH                        2  /* VMID_RES - [2:1] */
#define WM9090_BIAS_ENA                         0x0001  /* BIAS_ENA */
#define WM9090_BIAS_ENA_MASK                    0x0001  /* BIAS_ENA */
#define WM9090_BIAS_ENA_SHIFT                        0  /* BIAS_ENA */
#define WM9090_BIAS_ENA_WIDTH                        1  /* BIAS_ENA */

/*
 * R2 (0x02) - Power Management (2)

Annotation

Implementation Notes