mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
alsa: make it possible to fix format
This commit is contained in:
parent
7d73f0b8d0
commit
7768a87a0b
5 changed files with 22 additions and 2 deletions
|
|
@ -325,13 +325,15 @@ spa_alsa_enum_format(struct state *state, int seq, uint32_t start, uint32_t num,
|
|||
const struct format_info *fi = &format_info[i];
|
||||
|
||||
if (snd_pcm_format_mask_test(fmask, fi->format)) {
|
||||
if (snd_pcm_access_mask_test(amask, SND_PCM_ACCESS_MMAP_INTERLEAVED)) {
|
||||
if (snd_pcm_access_mask_test(amask, SND_PCM_ACCESS_MMAP_INTERLEAVED) &&
|
||||
(state->default_format == 0 || state->default_format == fi->spa_format)) {
|
||||
if (j++ == 0)
|
||||
spa_pod_builder_id(&b, fi->spa_format);
|
||||
spa_pod_builder_id(&b, fi->spa_format);
|
||||
}
|
||||
if (snd_pcm_access_mask_test(amask, SND_PCM_ACCESS_MMAP_NONINTERLEAVED) &&
|
||||
fi->spa_pformat != SPA_AUDIO_FORMAT_UNKNOWN) {
|
||||
fi->spa_pformat != SPA_AUDIO_FORMAT_UNKNOWN &&
|
||||
(state->default_format == 0 || state->default_format == fi->spa_pformat)) {
|
||||
if (j++ == 0)
|
||||
spa_pod_builder_id(&b, fi->spa_pformat);
|
||||
spa_pod_builder_id(&b, fi->spa_pformat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue