mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
alsa: rework buffer/period configuration
- As discussed on alsa-devel it's probably better to initialize the buffer size first, followed by the period size. If that fails try the other way round. If that fails try to configure only buffer size. If that fails try to configure only period size. Finally, try to configure neither. - Don't require integral periods anymore. Both of these changes should help improving compatibility with various weirder sound devices, such as TV cards.
This commit is contained in:
parent
71e066c873
commit
557c429510
4 changed files with 216 additions and 129 deletions
|
|
@ -42,8 +42,8 @@
|
|||
int pa_alsa_set_hw_params(
|
||||
snd_pcm_t *pcm_handle,
|
||||
pa_sample_spec *ss, /* modified at return */
|
||||
uint32_t *periods, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t *buffer_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
|
|
@ -60,8 +60,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
|
|||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t *buffer_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
|
|
@ -75,8 +75,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping(
|
|||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t *buffer_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
|
|
@ -89,8 +89,8 @@ snd_pcm_t *pa_alsa_open_by_device_string(
|
|||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t *buffer_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
|
|
@ -104,8 +104,8 @@ snd_pcm_t *pa_alsa_open_by_template(
|
|||
pa_sample_spec *ss, /* modified at return */
|
||||
pa_channel_map* map, /* modified at return */
|
||||
int mode,
|
||||
uint32_t *nfrags, /* modified at return */
|
||||
snd_pcm_uframes_t *period_size, /* modified at return */
|
||||
snd_pcm_uframes_t *buffer_size, /* modified at return */
|
||||
snd_pcm_uframes_t tsched_size,
|
||||
pa_bool_t *use_mmap, /* modified at return */
|
||||
pa_bool_t *use_tsched, /* modified at return */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue