Home
last modified time | relevance | path

Searched refs:substream (Results 1 – 19 of 19) sorted by relevance

/bsp/allwinner/libraries/sunxi-hal/hal/source/sound/core/
A Dsnd_dma.c48 const struct snd_pcm_substream *substream) in substream_to_prtd() argument
50 return substream->runtime->private_data; in substream_to_prtd()
102 substream->runtime->private_data = prtd; in snd_dmaengine_pcm_open_request_chan()
113 substream->runtime->private_data = NULL; in snd_dmaengine_pcm_close_release_chan()
134 return bytes_to_frames(substream->runtime, pos); in snd_dmaengine_pcm_pointer()
148 struct snd_pcm_substream *substream = arg; in dmaengine_pcm_dma_complete() local
152 if (!substream->runtime) in dmaengine_pcm_dma_complete()
154 prtd = substream_to_prtd(substream); in dmaengine_pcm_dma_complete()
158 snd_pcm_period_elapsed(substream); in dmaengine_pcm_dma_complete()
179 substream->runtime->dma_addr, in dmaengine_pcm_prepare_and_submit()
[all …]
A Dsnd_pcm.c383 if (!substream) in snd_pcm_release_substream()
393 substream->ops->hw_free(substream); in snd_pcm_release_substream()
394 substream->ops->close(substream); in snd_pcm_release_substream()
493 ret = substream->ops->open(substream); in snd_pcm_open_substream()
661 pos = substream->ops->pointer(substream); in snd_pcm_update_hw_ptr0()
827 substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP); in snd_pcm_stop()
1102 err = substream->ops->copy(substream, -1, hwoff, buf, frames); in snd_pcm_lib_read_transfer()
1887 ret = substream->ops->hw_params(substream, params); in ksnd_pcm_hw_params()
1928 substream->ops->hw_free(substream); in ksnd_pcm_hw_params()
2011 ret = substream->ops->prepare(substream); in ksnd_pcm_prepare()
[all …]
A Dsnd_core.c151 hal_spin_lock(&substream->lock); in snd_pcm_stream_lock()
163 snd_pcm_stream_lock(substream); in snd_pcm_stream_lock_irq()
179 snd_pcm_stream_lock(substream); in _snd_pcm_stream_lock_irqsave()
656 if (!substream) { in snd_pcm_new_stream()
661 substream->pcm = pcm; in snd_pcm_new_stream()
662 substream->ops = &pcm_ops; in snd_pcm_new_stream()
663 substream->stream = stream; in snd_pcm_new_stream()
664 substream->ref_count = 0; in snd_pcm_new_stream()
666 snprintf(substream->name, sizeof(substream->name), "%s %s", pcm->id, in snd_pcm_new_stream()
675 if (!substream) in snd_pcm_free_stream()
[all …]
A Dsnd_params.c493 struct snd_pcm_substream *substream = rule->private_data; in snd_pcm_hw_rule_buffer_bytes_max() local
495 t.range.max = substream->runtime->hw.buffer_bytes_max; in snd_pcm_hw_rule_buffer_bytes_max()
/bsp/allwinner/libraries/sunxi-hal/hal/source/sound/platform/
A Dsunxi-pcm.c118 struct snd_pcm_substream *substream; in sunxi_pcm_free() local
124 substream = pcm->streams[stream]; in sunxi_pcm_free()
125 if (!substream) in sunxi_pcm_free()
127 buf = &substream->dma_buffer; in sunxi_pcm_free()
144 hw = &codec->hw[substream->stream]; in sunxi_pcm_open()
147 snd_set_runtime_hwparams(substream, hw); in sunxi_pcm_open()
225 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in sunxi_pcm_hw_params()
233 snd_pcm_set_runtime_buffer(substream, NULL); in sunxi_pcm_hw_free()
245 snd_dmaengine_pcm_trigger(substream, in sunxi_pcm_trigger()
251 snd_dmaengine_pcm_trigger(substream, in sunxi_pcm_trigger()
[all …]
A Dsun8iw19-daudio.c900 struct snd_pcm_substream *substream; in sunxi_daudio_pcm_free() local
906 substream = pcm->streams[stream]; in sunxi_daudio_pcm_free()
907 if (!substream) in sunxi_daudio_pcm_free()
909 buf = &substream->dma_buffer; in sunxi_daudio_pcm_free()
927 hw = &codec->hw[substream->stream]; in sunxi_pcm_open()
930 snd_set_runtime_hwparams(substream, hw); in sunxi_pcm_open()
998 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in sunxi_pcm_hw_params()
1006 snd_pcm_set_runtime_buffer(substream, NULL); in sunxi_pcm_hw_free()
1019 snd_dmaengine_pcm_trigger(substream, in sunxi_pcm_trigger()
1025 snd_dmaengine_pcm_trigger(substream, in sunxi_pcm_trigger()
[all …]
A Dsunxi-daudio.c107 static int sunxi_daudio_startup(struct snd_pcm_substream *substream, in sunxi_daudio_startup() argument
114 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_daudio_startup()
146 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_daudio_hw_params()
161 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_daudio_hw_params()
176 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_daudio_hw_params()
192 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_daudio_hw_params()
234 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in sunxi_daudio_hw_params()
468 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_daudio_prepare()
504 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_daudio_trigger()
520 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_daudio_trigger()
[all …]
A Dsunxi-spdif.c346 static int sunxi_spdif_hw_params(struct snd_pcm_substream *substream, in sunxi_spdif_hw_params() argument
398 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_spdif_hw_params()
516 static int sunxi_spdif_startup(struct snd_pcm_substream *substream, in sunxi_spdif_startup() argument
523 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_spdif_startup()
532 static void sunxi_spdif_shutdown(struct snd_pcm_substream *substream, in sunxi_spdif_shutdown() argument
538 static int sunxi_spdif_trigger(struct snd_pcm_substream *substream, in sunxi_spdif_trigger() argument
549 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_spdif_trigger()
558 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_spdif_trigger()
575 static int sunxi_spdif_prepare(struct snd_pcm_substream *substream, in sunxi_spdif_prepare() argument
585 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_spdif_prepare()
A Dsunxi-dmic.c105 static int sunxi_dmic_hw_params(struct snd_pcm_substream *substream, in sunxi_dmic_hw_params() argument
167 static int sunxi_dmic_trigger(struct snd_pcm_substream *substream, in sunxi_dmic_trigger() argument
196 static int sunxi_dmic_prepare(struct snd_pcm_substream *substream, in sunxi_dmic_prepare() argument
213 static int sunxi_dmic_startup(struct snd_pcm_substream *substream, in sunxi_dmic_startup() argument
225 static void sunxi_dmic_shutdown(struct snd_pcm_substream *substream, in sunxi_dmic_shutdown() argument
A Dsunxi-dummy-cpudai.c87 static int sunxi_cpudai_startup(struct snd_pcm_substream *substream, in sunxi_cpudai_startup() argument
94 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_cpudai_startup()
/bsp/allwinner/libraries/sunxi-hal/hal/source/sound/component/aw-alsa-lib/
A Dpcm_hw.c43 void *substream; member
85 ret = ksnd_pcm_hw_free(hw->substream); in snd_pcm_hw_hw_free()
187 ret = ksnd_pcm_prepare(hw->substream); in snd_pcm_hw_prepare()
199 ret = ksnd_pcm_reset(hw->substream); in snd_pcm_hw_reset()
209 return ksnd_pcm_start(hw->substream); in snd_pcm_hw_start()
221 ret = ksnd_pcm_drop(hw->substream); in snd_pcm_hw_drop()
233 ret = ksnd_pcm_drain(hw->substream); in snd_pcm_hw_drain()
246 ret = ksnd_pcm_pause(hw->substream, enable); in snd_pcm_hw_pause()
357 return ksnd_pcm_dsleep_init(hw->substream); in snd_pcm_hw_poll_index_init()
454 void *substream = NULL; in _snd_pcm_hw_open() local
[all …]
/bsp/allwinner/libraries/sunxi-hal/include/hal/sound/
A Dsnd_dma.h37 int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream);
38 snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream);
39 int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream);
40 int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
41 int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream,
44 struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream);
A Dsnd_core.h96 #define snd_pcm_stream_lock_irqsave(substream, flags) \ argument
98 flags = _snd_pcm_stream_lock_irqsave(substream); \
304 int (*open)(struct snd_pcm_substream *substream);
305 int (*close)(struct snd_pcm_substream *substream);
306 int (*ioctl)(struct snd_pcm_substream * substream,
310 int (*hw_free)(struct snd_pcm_substream *substream);
311 int (*prepare)(struct snd_pcm_substream *substream);
576 if (!substream || !substream->pcm || !substream->pcm->card) in snd_soc_get_codec_dai()
578 codec = substream->pcm->card->codec; in snd_soc_get_codec_dai()
587 if (!substream || !substream->pcm || !substream->pcm->card) in snd_soc_get_cpu_dai()
[all …]
A Dsnd_pcm.h171 static inline size_t snd_pcm_lib_buffer_bytes(struct snd_pcm_substream *substream) in snd_pcm_lib_buffer_bytes() argument
173 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_lib_buffer_bytes()
177 static inline size_t snd_pcm_lib_period_bytes(struct snd_pcm_substream *substream) in snd_pcm_lib_period_bytes() argument
179 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_lib_period_bytes()
217 static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream) in snd_pcm_playback_data() argument
219 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_data()
227 static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream) in snd_pcm_playback_empty() argument
229 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_empty()
A Dksound.h44 int ksnd_pcm_open(int card_num, int device_num, int stream, int mode, void **substream);
46 int ksnd_pcm_hw_refine(void *substream, void *params);
64 int ksnd_pcm_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames);
/bsp/allwinner/libraries/sunxi-hal/hal/source/sound/codecs/
A Dsun8iw19-codec.c540 if (substream->dapm_state == onoff) in sunxi_codec_dapm_control()
542 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_dapm_control()
595 channels = substream->runtime->channels; in sunxi_codec_dapm_control()
644 substream->dapm_state = onoff; in sunxi_codec_dapm_control()
672 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
685 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
718 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in sunxi_codec_hw_params()
745 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
808 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_shutdown()
854 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_prepare()
[all …]
A Dsun8iw20-codec.c522 if (substream->dapm_state == onoff) in sunxi_codec_dapm_control()
524 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_dapm_control()
597 channels = substream->runtime->channels; in sunxi_codec_dapm_control()
653 substream->dapm_state = onoff; in sunxi_codec_dapm_control()
681 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
694 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
727 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in sunxi_codec_hw_params()
754 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
815 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_prepare()
846 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_trigger()
[all …]
A Dsun8iw18-codec.c618 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
633 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
652 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
665 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_hw_params()
721 if (substream->dapm_state == onoff) in sunxi_codec_dapm_control()
723 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in sunxi_codec_dapm_control()
794 channels = substream->runtime->channels; in sunxi_codec_dapm_control()
895 substream->dapm_state = onoff; in sunxi_codec_dapm_control()
917 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_codec_trigger()
932 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sunxi_codec_trigger()
[all …]
A Dac108.c698 static int ac108_codec_startup(struct snd_pcm_substream *substream, in ac108_codec_startup() argument
1182 static int ac108_codec_hw_params(struct snd_pcm_substream *substream, in ac108_codec_hw_params() argument
1205 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ac108_codec_hw_params()
1361 static int ac108_codec_prepare(struct snd_pcm_substream *substream, in ac108_codec_prepare() argument
1369 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ac108_codec_prepare()
1378 static int ac108_codec_trigger(struct snd_pcm_substream *substream, in ac108_codec_trigger() argument
1390 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ac108_codec_trigger()
1399 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ac108_codec_trigger()
1411 static int ac108_codec_hw_free(struct snd_pcm_substream *substream, in ac108_codec_hw_free() argument
1419 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ac108_codec_hw_free()
[all …]

Completed in 49 milliseconds