/* left and right justified also known as MSB and LSB respectively */ #define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J #define SND_SOC_DAIFMT_LSB SND_SOC_DAIFMT_RIGHT_J
/* when passed to set_fmt directly indicate if the device is provider or consumer */ #define SND_SOC_DAIFMT_BP_FP SND_SOC_DAIFMT_CBP_CFP #define SND_SOC_DAIFMT_BC_FP SND_SOC_DAIFMT_CBC_CFP #define SND_SOC_DAIFMT_BP_FC SND_SOC_DAIFMT_CBP_CFC #define SND_SOC_DAIFMT_BC_FC SND_SOC_DAIFMT_CBC_CFC
int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
int snd_soc_dai_prepare(struct snd_soc_dai *dai, struct snd_pcm_substream *substream);
/* Digital Audio Interface mute */ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute, int direction); int snd_soc_dai_mute_is_ctrled_at_trigger(struct snd_soc_dai *dai);
int snd_soc_dai_is_dummy(conststruct 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); bool snd_soc_dai_stream_valid(conststruct snd_soc_dai *dai, int stream); void snd_soc_dai_action(struct snd_soc_dai *dai, int stream, int action); staticinlinevoid snd_soc_dai_activate(struct snd_soc_dai *dai, int stream)
{
snd_soc_dai_action(dai, stream, 1);
} staticinlinevoid snd_soc_dai_deactivate(struct snd_soc_dai *dai, int stream)
{
snd_soc_dai_action(dai, stream, -1);
} int snd_soc_dai_active(conststruct 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); 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);
struct snd_soc_dai_ops { /* DAI driver callbacks */ int (*probe)(struct snd_soc_dai *dai); int (*remove)(struct snd_soc_dai *dai); /* compress dai */ int (*compress_new)(struct snd_soc_pcm_runtime *rtd); /* Optional Callback used at pcm creation*/ int (*pcm_new)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
/* *DAIclockingconfiguration,alloptional. *Calledbysoc_carddrivers,normallyintheirhw_params.
*/ int (*set_sysclk)(struct snd_soc_dai *dai, int clk_id, unsignedint freq, int dir); int (*set_pll)(struct snd_soc_dai *dai, int pll_id, int source, unsignedint freq_in, unsignedint freq_out); int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div); int (*set_bclk_ratio)(struct snd_soc_dai *dai, unsignedint ratio);
/* *DAIformatconfiguration *Calledbysoc_carddrivers,normallyintheirhw_params.
*/ int (*set_fmt)(struct snd_soc_dai *dai, unsignedint fmt); int (*xlate_tdm_slot_mask)(unsignedint slots, unsignedint *tx_mask, unsignedint *rx_mask); int (*set_tdm_slot)(struct snd_soc_dai *dai, unsignedint tx_mask, unsignedint rx_mask, int slots, int slot_width); int (*set_channel_map)(struct snd_soc_dai *dai, unsignedint tx_num, constunsignedint *tx_slot, unsignedint rx_num, constunsignedint *rx_slot); int (*get_channel_map)(conststruct snd_soc_dai *dai, unsignedint *tx_num, unsignedint *tx_slot, unsignedint *rx_num, unsignedint *rx_slot); int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
int (*set_stream)(struct snd_soc_dai *dai, void *stream, int direction); void *(*get_stream)(struct snd_soc_dai *dai, int direction);
/* *DAIdigitalmute-optional. *Calledbysoc-coretominimiseanypops.
*/ int (*mute_stream)(struct snd_soc_dai *dai, int mute, int stream);
/* DAI runtime info */ struct snd_soc_dai_stream stream[SNDRV_PCM_STREAM_LAST + 1];
/* Symmetry data - only valid if symmetry is being enforced */ unsignedint symmetric_rate; unsignedint symmetric_channels; unsignedint symmetric_sample_bits;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.