Lines Matching +full:clock +full:- +full:falling +full:- +full:edge
1 /* SPDX-License-Identifier: GPL-2.0
3 * linux/sound/soc-dai.h -- ALSA SoC Layer
5 * Copyright: 2005-2008 Wolfson Microelectronics. PLC.
56 * DAI Clock gating.
61 #define SND_SOC_DAIFMT_CONT (1 << 4) /* continuous clock */
62 #define SND_SOC_DAIFMT_GATED (0 << 4) /* clock is gated */
66 * define GATED -> CONT. GATED will be selected if both are selected.
82 * - "normal" polarity means signal is available at rising edge of BCLK
83 * - "inverted" polarity means signal is available at falling edge of BCLK
86 * - I2S: frame consists of left then right channel data. Left channel starts
87 * with falling FSYNC edge, right channel starts with rising FSYNC edge.
88 * - Left/Right Justified: frame consists of left then right channel data.
89 * Left channel starts with rising FSYNC edge, right channel starts with
90 * falling FSYNC edge.
91 * - DSP A/B: Frame starts with rising FSYNC edge.
92 * - AC97: Frame starts with rising FSYNC edge.
96 #define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */
110 * DAI hardware clock providers/consumers
121 /* previous definitions kept for backwards-compatibility, do not use in new contributions */
149 * Master Clock Directions
232 snd_soc_dai_action(dai, stream, -1); in snd_soc_dai_deactivate()
317 * DAI digital mute - optional.
318 * Called by soc-core to minimise any pops.
323 * ALSA PCM audio operations - all optional.
324 * Called by soc-core during audio PCM operations.
363 /* probe ordering - for components with runtime dependencies */
452 /* Symmetry data - only valid if symmetry is being enforced */
476 &dai->driver->playback : &dai->driver->capture; in snd_soc_dai_get_pcm_stream()
484 return dai->stream[stream].widget; in snd_soc_dai_get_widget()
492 dai->stream[stream].widget = widget; in snd_soc_dai_set_widget()
497 #define snd_soc_dai_get_dma_data(dai, ss) snd_soc_dai_dma_data_get(dai, ss->stream)
500 return dai->stream[stream].dma_data; in snd_soc_dai_dma_data_get()
505 #define snd_soc_dai_set_dma_data(dai, ss, data) snd_soc_dai_dma_data_set(dai, ss->stream, data)
508 dai->stream[stream].dma_data = data; in snd_soc_dai_dma_data_set()
520 return dai->stream[stream].tdm_mask; in snd_soc_dai_tdm_mask_get()
526 dai->stream[stream].tdm_mask = tdm_mask; in snd_soc_dai_tdm_mask_set()
533 return dai->stream[stream].active; in snd_soc_dai_stream_active()
539 dev_set_drvdata(dai->dev, data); in snd_soc_dai_set_drvdata()
544 return dev_get_drvdata(dai->dev); in snd_soc_dai_get_drvdata()
548 * snd_soc_dai_set_stream() - Configures a DAI for stream operation
562 if (dai->driver->ops->set_stream) in snd_soc_dai_set_stream()
563 return dai->driver->ops->set_stream(dai, stream, direction); in snd_soc_dai_set_stream()
565 return -ENOTSUPP; in snd_soc_dai_set_stream()
569 * snd_soc_dai_get_stream() - Retrieves stream from DAI
577 * ERR_PTR(-ENOTSUPP) if callback is not supported;
582 if (dai->driver->ops->get_stream) in snd_soc_dai_get_stream()
583 return dai->driver->ops->get_stream(dai, direction); in snd_soc_dai_get_stream()
585 return ERR_PTR(-ENOTSUPP); in snd_soc_dai_get_stream()