mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-10 13:30:01 -05:00
pcm_mmap_emul: Fix invalid check
The check in snd_pcm_mmap_emul_refine() is bogus and buggy. Since the changed access type is took back at snd_pcm_mmap_emul_refine again, it has to check the availability of mmap at each time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
b6af5e1822
commit
2db108cc72
1 changed files with 1 additions and 3 deletions
|
|
@ -62,11 +62,9 @@ static int snd_pcm_mmap_emul_hw_refine(snd_pcm_t *pcm,
|
||||||
snd_mask_none(&mask);
|
snd_mask_none(&mask);
|
||||||
err = snd_pcm_hw_refine(map->gen.slave, params);
|
err = snd_pcm_hw_refine(map->gen.slave, params);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
/* try to use RW_* */
|
|
||||||
snd_pcm_hw_params_t new = *params;
|
snd_pcm_hw_params_t new = *params;
|
||||||
|
|
||||||
if (!(params->rmask & (1<<SND_PCM_HW_PARAM_ACCESS)))
|
/* try to use RW_* */
|
||||||
return err;
|
|
||||||
if (snd_pcm_access_mask_test(&oldmask,
|
if (snd_pcm_access_mask_test(&oldmask,
|
||||||
SND_PCM_ACCESS_MMAP_INTERLEAVED) &&
|
SND_PCM_ACCESS_MMAP_INTERLEAVED) &&
|
||||||
!snd_pcm_access_mask_test(&oldmask,
|
!snd_pcm_access_mask_test(&oldmask,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue