sound/pci/ice1712/psc724.c
Source file repositories/reference/linux-study-clean/sound/pci/ice1712/psc724.c
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ice1712/psc724.c- Extension
.c- Size
- 14027 bytes
- Lines
- 448
- Domain
- Driver Families
- Bucket
- sound/pci
- 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/init.hlinux/slab.hsound/core.hice1712.henvy24ht.hpsc724.hwm8766.hwm8776.h
Detected Declarations
struct psc724_specstruct psc724_controlfunction VT1722function psc724_wm8776_writefunction psc724_set_master_switchfunction psc724_get_master_switchfunction psc724_set_jack_statefunction psc724_update_hp_jack_statefunction psc724_set_jack_detectionfunction psc724_get_jack_detectionfunction psc724_ctl_getfunction psc724_ctl_putfunction psc724_add_controlsfunction psc724_set_pro_ratefunction psc724_resumefunction psc724_initfunction psc724_exit
Annotated Snippet
struct psc724_spec {
struct snd_wm8766 wm8766;
struct snd_wm8776 wm8776;
bool mute_all, jack_detect;
struct snd_ice1712 *ice;
struct delayed_work hp_work;
bool hp_connected;
};
/****************************************************************************/
/* PHILIPS PSC724 ULTIMATE EDGE */
/****************************************************************************/
/*
* VT1722 (Envy24GT) - 6 outputs, 4 inputs (only 2 used), 24-bit/96kHz
*
* system configuration ICE_EEP2_SYSCONF=0x42
* XIN1 49.152MHz
* no MPU401
* one stereo ADC, no S/PDIF receiver
* three stereo DACs (FRONT, REAR, CENTER+LFE)
*
* AC-Link configuration ICE_EEP2_ACLINK=0x80
* use I2S, not AC97
*
* I2S converters feature ICE_EEP2_I2S=0x30
* I2S codec has no volume/mute control feature (bug!)
* I2S codec does not support 96KHz or 192KHz (bug!)
* I2S codec 24bits
*
* S/PDIF configuration ICE_EEP2_SPDIF=0xc1
* Enable integrated S/PDIF transmitter
* internal S/PDIF out implemented
* No S/PDIF input
* External S/PDIF out implemented
*
*
* ** connected chips **
*
* WM8776
* 2-channel DAC used for main output and stereo ADC (with 10-channel MUX)
* AIN1: LINE IN, AIN2: CD/VIDEO, AIN3: AUX, AIN4: Front MIC, AIN5: Rear MIC
* Controlled by I2C using VT1722 I2C interface:
* MODE (pin16) -- GND
* CE (pin17) -- GND I2C mode (address=0x34)
* DI (pin18) -- SDA (VT1722 pin70)
* CL (pin19) -- SCLK (VT1722 pin71)
*
* WM8766
* 6-channel DAC used for rear & center/LFE outputs (only 4 channels used)
* Controlled by SPI using VT1722 GPIO pins:
* MODE (pin 1) -- GPIO19 (VT1722 pin99)
* ML/I2S (pin11) -- GPIO18 (VT1722 pin98)
* MC/IWL (pin12) -- GPIO17 (VT1722 pin97)
* MD/DM (pin13) -- GPIO16 (VT1722 pin96)
* MUTE (pin14) -- GPIO20 (VT1722 pin101)
*
* GPIO14 is used as input for headphone jack detection (1 = connected)
* GPIO22 is used as MUTE ALL output, grounding all 6 channels
*
* ** output pins and device names **
*
* 5.1ch name -- output connector color -- device (-D option)
*
* FRONT 2ch -- green -- plughw:0,0
* CENTER(Lch) SUBWOOFER(Rch) -- orange -- plughw:0,2,0
* REAR 2ch -- black -- plughw:0,2,1
*/
/* codec access low-level functions */
#define GPIO_HP_JACK (1 << 14)
#define GPIO_MUTE_SUR (1 << 20)
#define GPIO_MUTE_ALL (1 << 22)
#define JACK_INTERVAL 1000
#define PSC724_SPI_DELAY 1
#define PSC724_SPI_DATA (1 << 16)
#define PSC724_SPI_CLK (1 << 17)
#define PSC724_SPI_LOAD (1 << 18)
#define PSC724_SPI_MASK (PSC724_SPI_DATA | PSC724_SPI_CLK | PSC724_SPI_LOAD)
static void psc724_wm8766_write(struct snd_wm8766 *wm, u16 addr, u16 data)
{
struct psc724_spec *spec = container_of(wm, struct psc724_spec, wm8766);
struct snd_ice1712 *ice = spec->ice;
u32 st, bits;
int i;
Annotation
- Immediate include surface: `linux/delay.h`, `linux/init.h`, `linux/slab.h`, `sound/core.h`, `ice1712.h`, `envy24ht.h`, `psc724.h`, `wm8766.h`.
- Detected declarations: `struct psc724_spec`, `struct psc724_control`, `function VT1722`, `function psc724_wm8776_write`, `function psc724_set_master_switch`, `function psc724_get_master_switch`, `function psc724_set_jack_state`, `function psc724_update_hp_jack_state`, `function psc724_set_jack_detection`, `function psc724_get_jack_detection`.
- Atlas domain: Driver Families / sound/pci.
- 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.