sound/hda/codecs/side-codecs/cs35l41_hda.h
Source file repositories/reference/linux-study-clean/sound/hda/codecs/side-codecs/cs35l41_hda.h
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/codecs/side-codecs/cs35l41_hda.h- Extension
.h- Size
- 2601 bytes
- Lines
- 116
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/efi.hlinux/regulator/consumer.hlinux/gpio/consumer.hlinux/device.hsound/cs35l41.hsound/cs-amp-lib.hlinux/firmware/cirrus/cs_dsp.hlinux/firmware/cirrus/wmfw.h
Detected Declarations
struct cs35l41_amp_cal_datastruct cs35l41_amp_efi_datastruct snd_kcontrolstruct cs35l41_hdaenum cs35l41_hda_spk_posenum cs35l41_hda_gpio_functionenum control_busenum halo_state
Annotated Snippet
struct cs35l41_amp_cal_data {
u32 calTarget[2];
u32 calTime[2];
s8 calAmbient;
u8 calStatus;
u16 calR;
} __packed;
struct cs35l41_amp_efi_data {
u32 size;
u32 count;
struct cs35l41_amp_cal_data data[];
} __packed;
enum cs35l41_hda_spk_pos {
CS35L41_LEFT,
CS35L41_RIGHT,
CS35L41_CENTER,
};
enum cs35l41_hda_gpio_function {
CS35L41_NOT_USED,
CS35l41_VSPK_SWITCH,
CS35L41_INTERRUPT,
CS35l41_SYNC,
};
enum control_bus {
I2C,
SPI
};
struct snd_kcontrol;
struct cs35l41_hda {
struct device *dev;
struct regmap *regmap;
struct gpio_desc *reset_gpio;
struct gpio_desc *cs_gpio;
struct cs35l41_hw_cfg hw_cfg;
struct hda_codec *codec;
int irq;
int index;
int channel_index;
unsigned volatile long irq_errors;
const char *amp_name;
const char *acpi_subsystem_id;
int firmware_type;
int speaker_id;
struct mutex fw_mutex;
struct work_struct fw_load_work;
struct snd_kcontrol *fw_type_ctl;
struct snd_kcontrol *fw_load_ctl;
struct snd_kcontrol *mute_override_ctl;
struct regmap_irq_chip_data *irq_data;
bool firmware_running;
bool request_fw_load;
bool fw_request_ongoing;
bool halo_initialized;
bool playback_started;
struct cs_dsp cs_dsp;
struct acpi_device *dacpi;
bool mute_override;
enum control_bus control_bus;
bool bypass_fw;
unsigned int tuning_gain;
struct cirrus_amp_cal_data cal_data;
bool cal_data_valid;
};
enum halo_state {
HALO_STATE_CODE_INIT_DOWNLOAD = 0,
HALO_STATE_CODE_START,
HALO_STATE_CODE_RUN
};
extern const struct dev_pm_ops cs35l41_hda_pm_ops;
int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq,
struct regmap *regmap, enum control_bus control_bus);
void cs35l41_hda_remove(struct device *dev);
int cs35l41_get_speaker_id(struct device *dev, int amp_index, int num_amps, int fixed_gpio_id);
int cs35l41_hda_parse_acpi(struct cs35l41_hda *cs35l41, struct device *physdev, int id);
#endif /*__CS35L41_HDA_H__*/
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/efi.h`, `linux/regulator/consumer.h`, `linux/gpio/consumer.h`, `linux/device.h`, `sound/cs35l41.h`, `sound/cs-amp-lib.h`, `linux/firmware/cirrus/cs_dsp.h`.
- Detected declarations: `struct cs35l41_amp_cal_data`, `struct cs35l41_amp_efi_data`, `struct snd_kcontrol`, `struct cs35l41_hda`, `enum cs35l41_hda_spk_pos`, `enum cs35l41_hda_gpio_function`, `enum control_bus`, `enum halo_state`.
- 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.