sound/soc/codecs/pm4125.h
Source file repositories/reference/linux-study-clean/sound/soc/codecs/pm4125.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/codecs/pm4125.h- Extension
.h- Size
- 13142 bytes
- Lines
- 294
- 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
linux/soundwire/sdw.hlinux/soundwire/sdw_type.hwcd-common.h
Detected Declarations
struct pm4125_privstruct pm4125_sdw_privenum pm4125_tx_sdw_portsenum pm4125_rx_sdw_portsenum pm4125_tx_sdw_channelsenum pm4125_rx_sdw_channelsfunction pm4125_sdw_freefunction pm4125_sdw_set_sdw_streamfunction pm4125_sdw_hw_params
Annotated Snippet
struct pm4125_sdw_priv {
struct sdw_slave *sdev;
struct sdw_stream_config sconfig;
struct sdw_stream_runtime *sruntime;
struct sdw_port_config port_config[PM4125_MAX_SWR_PORTS];
struct wcd_sdw_ch_info *ch_info;
bool port_enable[PM4125_MAX_SWR_CH_IDS];
unsigned int master_channel_map[SDW_MAX_PORTS];
int active_ports;
int num_ports;
bool is_tx;
struct pm4125_priv *pm4125;
struct irq_domain *slave_irq;
struct regmap *regmap;
};
#if IS_ENABLED(CONFIG_SND_SOC_PM4125_SDW)
int pm4125_sdw_free(struct pm4125_sdw_priv *pm4125, struct snd_pcm_substream *substream,
struct snd_soc_dai *dai);
int pm4125_sdw_set_sdw_stream(struct pm4125_sdw_priv *pm4125, struct snd_soc_dai *dai, void *stream,
int direction);
int pm4125_sdw_hw_params(struct pm4125_sdw_priv *pm4125, struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai);
#else
static inline int pm4125_sdw_free(struct pm4125_sdw_priv *pm4125,
struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{
return -EOPNOTSUPP;
}
static inline int pm4125_sdw_set_sdw_stream(struct pm4125_sdw_priv *pm4125,
struct snd_soc_dai *dai, void *stream, int direction)
{
return -EOPNOTSUPP;
}
static inline int pm4125_sdw_hw_params(struct pm4125_sdw_priv *pm4125,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{
return -EOPNOTSUPP;
}
#endif
enum {
/* INTR_CTRL_INT_MASK_0 */
PM4125_IRQ_MBHC_BUTTON_PRESS_DET = 0,
PM4125_IRQ_MBHC_BUTTON_RELEASE_DET,
PM4125_IRQ_MBHC_ELECT_INS_REM_DET,
PM4125_IRQ_MBHC_ELECT_INS_REM_LEG_DET,
PM4125_IRQ_MBHC_SW_DET,
PM4125_IRQ_HPHR_OCP_INT,
PM4125_IRQ_HPHR_CNP_INT,
PM4125_IRQ_HPHL_OCP_INT,
/* INTR_CTRL_INT_MASK_1 */
PM4125_IRQ_HPHL_CNP_INT,
PM4125_IRQ_EAR_CNP_INT,
PM4125_IRQ_EAR_SCD_INT,
PM4125_IRQ_AUX_CNP_INT,
PM4125_IRQ_AUX_SCD_INT,
PM4125_IRQ_HPHL_PDM_WD_INT,
PM4125_IRQ_HPHR_PDM_WD_INT,
PM4125_IRQ_AUX_PDM_WD_INT,
/* INTR_CTRL_INT_MASK_2 */
PM4125_IRQ_LDORT_SCD_INT,
PM4125_IRQ_MBHC_MOISTURE_INT,
PM4125_IRQ_HPHL_SURGE_DET_INT,
PM4125_IRQ_HPHR_SURGE_DET_INT,
PM4125_NUM_IRQS,
};
enum pm4125_tx_sdw_channels {
PM4125_ADC1,
PM4125_ADC2,
};
enum pm4125_rx_sdw_channels {
PM4125_HPH_L,
PM4125_HPH_R,
PM4125_COMP_L,
PM4125_COMP_R,
};
#endif /* _PM4125_REGISTERS_H */
Annotation
- Immediate include surface: `linux/soundwire/sdw.h`, `linux/soundwire/sdw_type.h`, `wcd-common.h`.
- Detected declarations: `struct pm4125_priv`, `struct pm4125_sdw_priv`, `enum pm4125_tx_sdw_ports`, `enum pm4125_rx_sdw_ports`, `enum pm4125_tx_sdw_channels`, `enum pm4125_rx_sdw_channels`, `function pm4125_sdw_free`, `function pm4125_sdw_set_sdw_stream`, `function pm4125_sdw_hw_params`.
- 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.