sound/hda/codecs/sigmatel.c
Source file repositories/reference/linux-study-clean/sound/hda/codecs/sigmatel.c
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/codecs/sigmatel.c- Extension
.c- Size
- 140488 bytes
- Lines
- 5162
- Domain
- Driver Families
- Bucket
- sound/hda
- 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/init.hlinux/delay.hlinux/slab.hlinux/pci.hlinux/dmi.hlinux/module.hsound/core.hsound/jack.hsound/hda_codec.hhda_local.hhda_auto_parser.hhda_beep.hhda_jack.hgeneric.h
Detected Declarations
struct sigmatel_specfunction stac_playback_pcm_hookfunction stac_capture_pcm_hookfunction stac_gpio_setfunction stac_capture_led_updatefunction stac_vrefout_setfunction stac_vref_led_power_filterfunction stac_update_led_statusfunction stac_vmaster_hookfunction stac_update_outputsfunction stac_toggle_power_mapfunction jack_update_powerfunction stac_vref_eventfunction stac_init_power_mapfunction get_int_hintfunction stac_store_hintsfunction stac_aloopback_getfunction stac_aloopback_putfunction hp_bnb2011_with_dockfunction hp_blike_systemfunction set_hp_led_gpiofunction statefunction has_builtin_speakerfunction stac_auto_create_beep_ctlsfunction stac_dig_beep_switch_getfunction stac_dig_beep_switch_putfunction stac_beep_switch_ctlfunction stac_smux_enum_infofunction stac_smux_enum_getfunction stac_smux_enum_putfunction stac_create_spdif_mux_ctlsfunction stac9200_fixup_panasonicfunction stac92hd73xx_fixup_reffunction stac92hd73xx_fixup_dellfunction stac92hd73xx_fixup_dell_eqfunction stac92hd73xx_fixup_dell_m6_amicfunction stac92hd73xx_fixup_dell_m6_dmicfunction stac92hd73xx_fixup_dell_m6_bothfunction stac92hd73xx_fixup_alienware_m17xfunction stac92hd73xx_fixup_no_jdfunction stac92hd73xx_disable_automutefunction stac92hd83xxx_fixup_hpfunction stac92hd83xxx_fixup_hp_zephyrfunction stac92hd83xxx_fixup_hp_ledfunction stac92hd83xxx_fixup_hp_inv_ledfunction stac92hd83xxx_fixup_hp_mic_ledfunction stac92hd83xxx_fixup_hp_led_gpio10function stac92hd83xxx_fixup_headset_jack
Annotated Snippet
struct sigmatel_spec {
struct hda_gen_spec gen;
unsigned int eapd_switch: 1;
unsigned int linear_tone_beep:1;
unsigned int headset_jack:1; /* 4-pin headset jack (hp + mono mic) */
unsigned int volknob_init:1; /* special volume-knob initialization */
unsigned int powerdown_adcs:1;
unsigned int have_spdif_mux:1;
/* gpio lines */
unsigned int eapd_mask;
unsigned int gpio_mask;
unsigned int gpio_dir;
unsigned int gpio_data;
unsigned int gpio_mute;
unsigned int gpio_led;
unsigned int gpio_led_polarity;
unsigned int vref_mute_led_nid; /* pin NID for mute-LED vref control */
unsigned int vref_led;
int default_polarity;
unsigned int mic_mute_led_gpio; /* capture mute LED GPIO */
unsigned int mic_enabled; /* current mic mute state (bitmask) */
/* stream */
unsigned int stream_delay;
/* analog loopback */
const struct snd_kcontrol_new *aloopback_ctl;
unsigned int aloopback;
unsigned char aloopback_mask;
unsigned char aloopback_shift;
/* power management */
unsigned int power_map_bits;
unsigned int num_pwrs;
const hda_nid_t *pwr_nids;
unsigned int active_adcs;
/* beep widgets */
hda_nid_t anabeep_nid;
bool beep_power_on;
/* SPDIF-out mux */
const char * const *spdif_labels;
struct hda_input_mux spdif_mux;
unsigned int cur_smux[2];
};
#define AC_VERB_IDT_SET_POWER_MAP 0x7ec
#define AC_VERB_IDT_GET_POWER_MAP 0xfec
static const hda_nid_t stac92hd73xx_pwr_nids[8] = {
0x0a, 0x0b, 0x0c, 0xd, 0x0e,
0x0f, 0x10, 0x11
};
static const hda_nid_t stac92hd83xxx_pwr_nids[7] = {
0x0a, 0x0b, 0x0c, 0xd, 0x0e,
0x0f, 0x10
};
static const hda_nid_t stac92hd71bxx_pwr_nids[3] = {
0x0a, 0x0d, 0x0f
};
/*
* PCM hooks
*/
static void stac_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_GEN_PCM_ACT_OPEN && spec->stream_delay)
msleep(spec->stream_delay);
}
static void stac_capture_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{
struct sigmatel_spec *spec = codec->spec;
int i, idx = 0;
if (!spec->powerdown_adcs)
Annotation
- Immediate include surface: `linux/init.h`, `linux/delay.h`, `linux/slab.h`, `linux/pci.h`, `linux/dmi.h`, `linux/module.h`, `sound/core.h`, `sound/jack.h`.
- Detected declarations: `struct sigmatel_spec`, `function stac_playback_pcm_hook`, `function stac_capture_pcm_hook`, `function stac_gpio_set`, `function stac_capture_led_update`, `function stac_vrefout_set`, `function stac_vref_led_power_filter`, `function stac_update_led_status`, `function stac_vmaster_hook`, `function stac_update_outputs`.
- Atlas domain: Driver Families / sound/hda.
- 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.