sound/soc/codecs/wcd939x.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/wcd939x.h
Extension
.h
Size
44754 bytes
Lines
948
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

struct wcd939x_sdw_priv {
	struct sdw_slave *sdev;
	struct sdw_stream_config sconfig;
	struct sdw_stream_runtime *sruntime;
	struct sdw_port_config port_config[WCD939X_MAX_SWR_PORTS];
	const struct wcd_sdw_ch_info *ch_info;
	bool port_enable[WCD939X_MAX_SWR_CH_IDS];
	int active_ports;
	bool is_tx;
	struct wcd939x_priv *wcd939x;
	struct irq_domain *slave_irq;
	struct regmap *regmap;
};

#if IS_ENABLED(CONFIG_SND_SOC_WCD939X_SDW)
int wcd939x_sdw_free(struct wcd939x_sdw_priv *wcd,
		     struct snd_pcm_substream *substream,
		     struct snd_soc_dai *dai);
int wcd939x_sdw_set_sdw_stream(struct wcd939x_sdw_priv *wcd,
			       struct snd_soc_dai *dai,
			       void *stream, int direction);
int wcd939x_sdw_hw_params(struct wcd939x_sdw_priv *wcd,
			  struct snd_pcm_substream *substream,
			  struct snd_pcm_hw_params *params,
			  struct snd_soc_dai *dai);
#else

static inline int wcd939x_sdw_free(struct wcd939x_sdw_priv *wcd,
				   struct snd_pcm_substream *substream,
				   struct snd_soc_dai *dai)
{
	return -EOPNOTSUPP;
}

static inline int wcd939x_sdw_set_sdw_stream(struct wcd939x_sdw_priv *wcd,
					     struct snd_soc_dai *dai,
					     void *stream, int direction)
{
	return -EOPNOTSUPP;
}

static inline int wcd939x_sdw_hw_params(struct wcd939x_sdw_priv *wcd,
					struct snd_pcm_substream *substream,
					struct snd_pcm_hw_params *params,
					struct snd_soc_dai *dai)
{
	return -EOPNOTSUPP;
}

#endif /* CONFIG_SND_SOC_WCD939X_SDW */

#endif /* __WCD939X_H__ */

Annotation

Implementation Notes