alsa: add read/write access mode

Add support for read/write access mode when mmap is not available.

See #526
This commit is contained in:
Wim Taymans 2021-01-05 17:48:09 +01:00
parent c430b1de58
commit 18b5199d44
3 changed files with 189 additions and 95 deletions

View file

@ -159,6 +159,8 @@ struct state {
unsigned int following:1;
unsigned int matching:1;
unsigned int resample:1;
unsigned int use_mmap:1;
unsigned int planar:1;
int64_t sample_count;
@ -186,7 +188,7 @@ int spa_alsa_reassign_follower(struct state *state);
int spa_alsa_pause(struct state *state);
int spa_alsa_close(struct state *state);
int spa_alsa_write(struct state *state, snd_pcm_uframes_t silence);
int spa_alsa_write(struct state *state);
int spa_alsa_read(struct state *state, snd_pcm_uframes_t silence);
void spa_alsa_recycle_buffer(struct state *state, uint32_t buffer_id);