mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
improved stream linking and plugin code cleanups
- added link/unlink/link_fd fast_ops callbacks - moved code from snd_pcm_link to pcm_hw.c - moved "empty" routines pointing to slave to pcm_generic.c - introduced snd_pcm_generic_t
This commit is contained in:
parent
9501520606
commit
836987aa99
25 changed files with 767 additions and 957 deletions
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "iatomic.h"
|
||||
#include "pcm_generic.h"
|
||||
|
||||
typedef snd_pcm_uframes_t (*snd_pcm_slave_xfer_areas_func_t)
|
||||
(snd_pcm_t *pcm,
|
||||
|
|
@ -38,8 +39,7 @@ typedef snd_pcm_sframes_t (*snd_pcm_slave_xfer_areas_undo_func_t)
|
|||
snd_pcm_uframes_t slave_undo_size);
|
||||
|
||||
typedef struct {
|
||||
snd_pcm_t *slave;
|
||||
int close_slave;
|
||||
snd_pcm_generic_t gen;
|
||||
snd_pcm_slave_xfer_areas_func_t read;
|
||||
snd_pcm_slave_xfer_areas_func_t write;
|
||||
snd_pcm_slave_xfer_areas_undo_func_t undo_read;
|
||||
|
|
@ -52,24 +52,9 @@ typedef struct {
|
|||
} snd_pcm_plugin_t;
|
||||
|
||||
void snd_pcm_plugin_init(snd_pcm_plugin_t *plugin);
|
||||
int snd_pcm_plugin_close(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_card(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_nonblock(snd_pcm_t *pcm, int nonblock);
|
||||
int snd_pcm_plugin_async(snd_pcm_t *pcm, int sig, pid_t pid);
|
||||
int snd_pcm_plugin_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
||||
int snd_pcm_plugin_info(snd_pcm_t *pcm, snd_pcm_info_t * info);
|
||||
int snd_pcm_plugin_hw_free(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_sw_refine(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
|
||||
int snd_pcm_plugin_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
|
||||
int snd_pcm_plugin_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info);
|
||||
int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status);
|
||||
snd_pcm_state_t snd_pcm_plugin_state(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp);
|
||||
int snd_pcm_plugin_prepare(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_start(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_drop(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_drain(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_pause(snd_pcm_t *pcm, int enable);
|
||||
snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||
snd_pcm_sframes_t snd_pcm_plugin_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
|
||||
snd_pcm_sframes_t snd_pcm_plugin_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
|
||||
|
|
@ -77,15 +62,6 @@ snd_pcm_sframes_t snd_pcm_plugin_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_ufr
|
|||
snd_pcm_sframes_t snd_pcm_plugin_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
|
||||
snd_pcm_sframes_t snd_pcm_plugin_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t offset, snd_pcm_uframes_t size);
|
||||
snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_mmap_status(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_mmap_control(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_mmap(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_munmap_status(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_munmap_control(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_munmap(snd_pcm_t *pcm);
|
||||
int snd_pcm_plugin_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
|
||||
int snd_pcm_plugin_hw_params_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
int snd_pcm_plugin_hw_refine_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
|
||||
extern snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue