#ifndef __LINUX_SND_SOC_DAI_H
#define __LINUX_SND_SOC_DAI_H
#include <linux/list.h>
#include <sound/asoc.h>
struct snd_pcm_substream;
struct snd_soc_dapm_widget;
struct snd_compr_stream;
#define SND_SOC_DAIFMT_I2S …
#define SND_SOC_DAIFMT_RIGHT_J …
#define SND_SOC_DAIFMT_LEFT_J …
#define SND_SOC_DAIFMT_DSP_A …
#define SND_SOC_DAIFMT_DSP_B …
#define SND_SOC_DAIFMT_AC97 …
#define SND_SOC_DAIFMT_PDM …
#define SND_SOC_DAIFMT_MSB …
#define SND_SOC_DAIFMT_LSB …
#define SND_SOC_POSSIBLE_DAIFMT_FORMAT_SHIFT …
#define SND_SOC_POSSIBLE_DAIFMT_FORMAT_MASK …
#define SND_SOC_POSSIBLE_DAIFMT_I2S …
#define SND_SOC_POSSIBLE_DAIFMT_RIGHT_J …
#define SND_SOC_POSSIBLE_DAIFMT_LEFT_J …
#define SND_SOC_POSSIBLE_DAIFMT_DSP_A …
#define SND_SOC_POSSIBLE_DAIFMT_DSP_B …
#define SND_SOC_POSSIBLE_DAIFMT_AC97 …
#define SND_SOC_POSSIBLE_DAIFMT_PDM …
#define SND_SOC_DAIFMT_CONT …
#define SND_SOC_DAIFMT_GATED …
#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_SHIFT …
#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_MASK …
#define SND_SOC_POSSIBLE_DAIFMT_GATED …
#define SND_SOC_POSSIBLE_DAIFMT_CONT …
#define SND_SOC_DAIFMT_NB_NF …
#define SND_SOC_DAIFMT_NB_IF …
#define SND_SOC_DAIFMT_IB_NF …
#define SND_SOC_DAIFMT_IB_IF …
#define SND_SOC_POSSIBLE_DAIFMT_INV_SHIFT …
#define SND_SOC_POSSIBLE_DAIFMT_INV_MASK …
#define SND_SOC_POSSIBLE_DAIFMT_NB_NF …
#define SND_SOC_POSSIBLE_DAIFMT_NB_IF …
#define SND_SOC_POSSIBLE_DAIFMT_IB_NF …
#define SND_SOC_POSSIBLE_DAIFMT_IB_IF …
#define SND_SOC_DAIFMT_CBP_CFP …
#define SND_SOC_DAIFMT_CBC_CFP …
#define SND_SOC_DAIFMT_CBP_CFC …
#define SND_SOC_DAIFMT_CBC_CFC …
#define SND_SOC_DAIFMT_CBM_CFM …
#define SND_SOC_DAIFMT_CBS_CFM …
#define SND_SOC_DAIFMT_CBM_CFS …
#define SND_SOC_DAIFMT_CBS_CFS …
#define SND_SOC_DAIFMT_BP_FP …
#define SND_SOC_DAIFMT_BC_FP …
#define SND_SOC_DAIFMT_BP_FC …
#define SND_SOC_DAIFMT_BC_FC …
#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_SHIFT …
#define SND_SOC_POSSIBLE_DAIFMT_CLOCK_PROVIDER_MASK …
#define SND_SOC_POSSIBLE_DAIFMT_CBP_CFP …
#define SND_SOC_POSSIBLE_DAIFMT_CBC_CFP …
#define SND_SOC_POSSIBLE_DAIFMT_CBP_CFC …
#define SND_SOC_POSSIBLE_DAIFMT_CBC_CFC …
#define SND_SOC_DAIFMT_FORMAT_MASK …
#define SND_SOC_DAIFMT_CLOCK_MASK …
#define SND_SOC_DAIFMT_INV_MASK …
#define SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK …
#define SND_SOC_DAIFMT_MASTER_MASK …
#define SND_SOC_CLOCK_IN …
#define SND_SOC_CLOCK_OUT …
#define SND_SOC_STD_AC97_FMTS …
struct snd_soc_dai_driver;
struct snd_soc_dai;
struct snd_ac97_bus_ops;
int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir);
int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
int div_id, int div);
int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
int pll_id, int source, unsigned int freq_in, unsigned int freq_out);
int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio);
int snd_soc_dai_get_fmt_max_priority(const struct snd_soc_pcm_runtime *rtd);
u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority);
int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width);
int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
unsigned int tx_num, const unsigned int *tx_slot,
unsigned int rx_num, const unsigned int *rx_slot);
int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute,
int direction);
int snd_soc_dai_get_channel_map(const struct snd_soc_dai *dai,
unsigned int *tx_num, unsigned int *tx_slot,
unsigned int *rx_num, unsigned int *rx_slot);
int snd_soc_dai_is_dummy(const struct snd_soc_dai *dai);
int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
void snd_soc_dai_hw_free(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream,
int rollback);
int snd_soc_dai_startup(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream);
void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream, int rollback);
void snd_soc_dai_suspend(struct snd_soc_dai *dai);
void snd_soc_dai_resume(struct snd_soc_dai *dai);
int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
struct snd_soc_pcm_runtime *rtd, int num);
bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream);
void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link);
void snd_soc_dai_action(struct snd_soc_dai *dai,
int stream, int action);
static inline void snd_soc_dai_activate(struct snd_soc_dai *dai,
int stream)
{ … }
static inline void snd_soc_dai_deactivate(struct snd_soc_dai *dai,
int stream)
{ … }
int snd_soc_dai_active(const struct snd_soc_dai *dai);
int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order);
int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order);
int snd_soc_pcm_dai_new(struct snd_soc_pcm_runtime *rtd);
int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream);
int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
int rollback);
int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,
int cmd);
void snd_soc_pcm_dai_delay(struct snd_pcm_substream *substream,
snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream);
void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
int rollback);
int snd_soc_dai_compr_trigger(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream, int cmd);
int snd_soc_dai_compr_set_params(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_compr_params *params);
int snd_soc_dai_compr_get_params(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_codec *params);
int snd_soc_dai_compr_ack(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
size_t bytes);
int snd_soc_dai_compr_pointer(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_compr_tstamp *tstamp);
int snd_soc_dai_compr_set_metadata(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
int snd_soc_dai_compr_get_metadata(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
const char *snd_soc_dai_name_get(const struct snd_soc_dai *dai);
struct snd_soc_dai_ops { … };
struct snd_soc_cdai_ops { … };
struct snd_soc_dai_driver { … };
struct snd_soc_dai_stream { … };
struct snd_soc_dai { … };
static inline const struct snd_soc_pcm_stream *
snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream)
{ … }
#define snd_soc_dai_get_widget_playback(dai) …
#define snd_soc_dai_get_widget_capture(dai) …
static inline
struct snd_soc_dapm_widget *snd_soc_dai_get_widget(struct snd_soc_dai *dai, int stream)
{ … }
#define snd_soc_dai_set_widget_playback(dai, widget) …
#define snd_soc_dai_set_widget_capture(dai, widget) …
static inline
void snd_soc_dai_set_widget(struct snd_soc_dai *dai, int stream, struct snd_soc_dapm_widget *widget)
{ … }
#define snd_soc_dai_dma_data_get_playback(dai) …
#define snd_soc_dai_dma_data_get_capture(dai) …
#define snd_soc_dai_get_dma_data(dai, ss) …
static inline void *snd_soc_dai_dma_data_get(const struct snd_soc_dai *dai, int stream)
{ … }
#define snd_soc_dai_dma_data_set_playback(dai, data) …
#define snd_soc_dai_dma_data_set_capture(dai, data) …
#define snd_soc_dai_set_dma_data(dai, ss, data) …
static inline void snd_soc_dai_dma_data_set(struct snd_soc_dai *dai, int stream, void *data)
{ … }
static inline void snd_soc_dai_init_dma_data(struct snd_soc_dai *dai, void *playback, void *capture)
{ … }
static inline unsigned int snd_soc_dai_tdm_mask_get(const struct snd_soc_dai *dai,
int stream)
{ … }
static inline void snd_soc_dai_tdm_mask_set(struct snd_soc_dai *dai, int stream,
unsigned int tdm_mask)
{ … }
static inline unsigned int snd_soc_dai_stream_active(const struct snd_soc_dai *dai,
int stream)
{ … }
static inline void snd_soc_dai_set_drvdata(struct snd_soc_dai *dai,
void *data)
{ … }
static inline void *snd_soc_dai_get_drvdata(struct snd_soc_dai *dai)
{ … }
static inline int snd_soc_dai_set_stream(struct snd_soc_dai *dai,
void *stream, int direction)
{ … }
static inline void *snd_soc_dai_get_stream(struct snd_soc_dai *dai,
int direction)
{ … }
#endif