• Home
  • Raw
  • Download

Lines Matching refs:pcm

92 snd_pcm_plugin_undo_read(snd_pcm_t *pcm ATTRIBUTE_UNUSED,  in snd_pcm_plugin_undo_read()
102 snd_pcm_plugin_undo_write(snd_pcm_t *pcm ATTRIBUTE_UNUSED, in snd_pcm_plugin_undo_write()
112 snd_pcm_plugin_undo_read_generic(snd_pcm_t *pcm ATTRIBUTE_UNUSED, in snd_pcm_plugin_undo_read_generic()
122 snd_pcm_plugin_undo_write_generic(snd_pcm_t *pcm ATTRIBUTE_UNUSED, in snd_pcm_plugin_undo_write_generic()
138 static int snd_pcm_plugin_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) in snd_pcm_plugin_delay() argument
140 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_delay()
149 static int snd_pcm_plugin_call_init_cb(snd_pcm_t *pcm, snd_pcm_plugin_t *plugin) in snd_pcm_plugin_call_init_cb() argument
154 assert(pcm->boundary == slave->boundary); in snd_pcm_plugin_call_init_cb()
155 *pcm->hw.ptr = *slave->hw.ptr; in snd_pcm_plugin_call_init_cb()
156 *pcm->appl.ptr = *slave->appl.ptr; in snd_pcm_plugin_call_init_cb()
158 err = plugin->init(pcm); in snd_pcm_plugin_call_init_cb()
165 static int snd_pcm_plugin_prepare(snd_pcm_t *pcm) in snd_pcm_plugin_prepare() argument
167 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_prepare()
172 return snd_pcm_plugin_call_init_cb(pcm, plugin); in snd_pcm_plugin_prepare()
175 static int snd_pcm_plugin_reset(snd_pcm_t *pcm) in snd_pcm_plugin_reset() argument
177 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_reset()
182 return snd_pcm_plugin_call_init_cb(pcm, plugin); in snd_pcm_plugin_reset()
185 static snd_pcm_sframes_t snd_pcm_plugin_rewindable(snd_pcm_t *pcm) in snd_pcm_plugin_rewindable() argument
187 return snd_pcm_mmap_hw_rewindable(pcm); in snd_pcm_plugin_rewindable()
190 snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames) in snd_pcm_plugin_rewind() argument
192 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_rewind()
193 snd_pcm_sframes_t n = snd_pcm_plugin_rewindable(pcm); in snd_pcm_plugin_rewind()
205 snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) sframes); in snd_pcm_plugin_rewind()
209 static snd_pcm_sframes_t snd_pcm_plugin_forwardable(snd_pcm_t *pcm) in snd_pcm_plugin_forwardable() argument
211 return snd_pcm_mmap_avail(pcm); in snd_pcm_plugin_forwardable()
214 snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames) in snd_pcm_plugin_forward() argument
216 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_forward()
217 snd_pcm_sframes_t n = snd_pcm_plugin_forwardable(pcm); in snd_pcm_plugin_forward()
229 snd_pcm_mmap_appl_forward(pcm, (snd_pcm_uframes_t) frames); in snd_pcm_plugin_forward()
233 static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm, in snd_pcm_plugin_write_areas() argument
238 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_write_areas()
257 frames = plugin->write(pcm, areas, offset, frames, in snd_pcm_plugin_write_areas()
268 …res = plugin->undo_write(pcm, slave_areas, slave_offset + result, slave_frames, slave_frames - res… in snd_pcm_plugin_write_areas()
279 snd_pcm_mmap_appl_forward(pcm, frames); in snd_pcm_plugin_write_areas()
290 static snd_pcm_sframes_t snd_pcm_plugin_read_areas(snd_pcm_t *pcm, in snd_pcm_plugin_read_areas() argument
295 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_read_areas()
314 frames = (plugin->read)(pcm, areas, offset, frames, in snd_pcm_plugin_read_areas()
337 snd_pcm_mmap_appl_forward(pcm, frames); in snd_pcm_plugin_read_areas()
350 snd_pcm_plugin_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size) in snd_pcm_plugin_writei() argument
352 snd_pcm_channel_area_t areas[pcm->channels]; in snd_pcm_plugin_writei()
353 snd_pcm_areas_from_buf(pcm, areas, (void*)buffer); in snd_pcm_plugin_writei()
354 return snd_pcm_write_areas(pcm, areas, 0, size, in snd_pcm_plugin_writei()
359 snd_pcm_plugin_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size) in snd_pcm_plugin_writen() argument
361 snd_pcm_channel_area_t areas[pcm->channels]; in snd_pcm_plugin_writen()
362 snd_pcm_areas_from_bufs(pcm, areas, bufs); in snd_pcm_plugin_writen()
363 return snd_pcm_write_areas(pcm, areas, 0, size, in snd_pcm_plugin_writen()
368 snd_pcm_plugin_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size) in snd_pcm_plugin_readi() argument
370 snd_pcm_channel_area_t areas[pcm->channels]; in snd_pcm_plugin_readi()
371 snd_pcm_areas_from_buf(pcm, areas, buffer); in snd_pcm_plugin_readi()
372 return snd_pcm_read_areas(pcm, areas, 0, size, in snd_pcm_plugin_readi()
377 snd_pcm_plugin_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size) in snd_pcm_plugin_readn() argument
379 snd_pcm_channel_area_t areas[pcm->channels]; in snd_pcm_plugin_readn()
380 snd_pcm_areas_from_bufs(pcm, areas, bufs); in snd_pcm_plugin_readn()
381 return snd_pcm_read_areas(pcm, areas, 0, size, in snd_pcm_plugin_readn()
386 snd_pcm_plugin_mmap_commit(snd_pcm_t *pcm, in snd_pcm_plugin_mmap_commit() argument
390 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_mmap_commit()
398 if (pcm->stream == SND_PCM_STREAM_CAPTURE) { in snd_pcm_plugin_mmap_commit()
399 snd_pcm_mmap_appl_forward(pcm, size); in snd_pcm_plugin_mmap_commit()
405 areas = snd_pcm_mmap_areas(pcm); in snd_pcm_plugin_mmap_commit()
406 appl_offset = snd_pcm_mmap_offset(pcm); in snd_pcm_plugin_mmap_commit()
410 snd_pcm_uframes_t cont = pcm->buffer_size - appl_offset; in snd_pcm_plugin_mmap_commit()
423 frames = plugin->write(pcm, areas, appl_offset, frames, in snd_pcm_plugin_mmap_commit()
429 …res = plugin->undo_write(pcm, slave_areas, slave_offset + result, slave_frames, slave_frames - res… in snd_pcm_plugin_mmap_commit()
440 snd_pcm_mmap_appl_forward(pcm, frames); in snd_pcm_plugin_mmap_commit()
460 snd_pcm_plugin_sync_hw_ptr_capture(snd_pcm_t *pcm, in snd_pcm_plugin_sync_hw_ptr_capture() argument
463 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_sync_hw_ptr_capture()
469 xfer = snd_pcm_mmap_capture_avail(pcm); in snd_pcm_plugin_sync_hw_ptr_capture()
470 size = pcm->buffer_size - xfer; in snd_pcm_plugin_sync_hw_ptr_capture()
471 areas = snd_pcm_mmap_areas(pcm); in snd_pcm_plugin_sync_hw_ptr_capture()
472 hw_offset = snd_pcm_mmap_hw_offset(pcm); in snd_pcm_plugin_sync_hw_ptr_capture()
475 snd_pcm_uframes_t cont = pcm->buffer_size - hw_offset; in snd_pcm_plugin_sync_hw_ptr_capture()
495 frames = (plugin->read)(pcm, areas, hw_offset, frames, in snd_pcm_plugin_sync_hw_ptr_capture()
511 snd_pcm_mmap_hw_forward(pcm, frames); in snd_pcm_plugin_sync_hw_ptr_capture()
525 static snd_pcm_sframes_t snd_pcm_plugin_sync_hw_ptr(snd_pcm_t *pcm, in snd_pcm_plugin_sync_hw_ptr() argument
529 if (pcm->stream == SND_PCM_STREAM_CAPTURE && in snd_pcm_plugin_sync_hw_ptr()
530 pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED && in snd_pcm_plugin_sync_hw_ptr()
531 pcm->access != SND_PCM_ACCESS_RW_NONINTERLEAVED) in snd_pcm_plugin_sync_hw_ptr()
532 return snd_pcm_plugin_sync_hw_ptr_capture(pcm, slave_size); in snd_pcm_plugin_sync_hw_ptr()
533 *pcm->hw.ptr = slave_hw_ptr; in snd_pcm_plugin_sync_hw_ptr()
537 static snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm) in snd_pcm_plugin_avail_update() argument
539 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_avail_update()
544 return snd_pcm_plugin_sync_hw_ptr(pcm, *slave->hw.ptr, slave_size); in snd_pcm_plugin_avail_update()
547 static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status) in snd_pcm_plugin_status() argument
549 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_status()
555 snd_pcm_plugin_sync_hw_ptr(pcm, status->hw_ptr, status->avail); in snd_pcm_plugin_status()
566 if (pcm->stream == SND_PCM_STREAM_CAPTURE) { in snd_pcm_plugin_status()
567 diff = pcm_frame_diff(status->appl_ptr, *pcm->appl.ptr, pcm->boundary); in snd_pcm_plugin_status()
568 status->appl_ptr = *pcm->appl.ptr; in snd_pcm_plugin_status()
572 assert(status->appl_ptr == *pcm->appl.ptr); in snd_pcm_plugin_status()
577 int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm, in snd_pcm_plugin_may_wait_for_avail_min() argument
580 if (pcm->stream == SND_PCM_STREAM_CAPTURE && in snd_pcm_plugin_may_wait_for_avail_min()
581 pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED && in snd_pcm_plugin_may_wait_for_avail_min()
582 pcm->access != SND_PCM_ACCESS_RW_NONINTERLEAVED) { in snd_pcm_plugin_may_wait_for_avail_min()
598 snd_pcm_plugin_t *plugin = pcm->private_data; in snd_pcm_plugin_may_wait_for_avail_min()
606 available = snd_pcm_avail_update(pcm); in snd_pcm_plugin_may_wait_for_avail_min()
610 if ((snd_pcm_uframes_t)available >= pcm->avail_min) in snd_pcm_plugin_may_wait_for_avail_min()
616 needed_slave_avail_min = pcm->avail_min - available; in snd_pcm_plugin_may_wait_for_avail_min()
636 return snd_pcm_generic_may_wait_for_avail_min(pcm, avail); in snd_pcm_plugin_may_wait_for_avail_min()