mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Some cleaning to mmap
This commit is contained in:
parent
a07e3c967b
commit
5860beac69
3 changed files with 11 additions and 16 deletions
|
|
@ -378,11 +378,16 @@ int snd_pcm_munmap(snd_pcm_t *pcm)
|
|||
size = PAGE_ALIGN(size);
|
||||
switch (i->type) {
|
||||
case SND_PCM_AREA_MMAP:
|
||||
#if 0
|
||||
/* Tricky here: for alsa-oss */
|
||||
errno = 12345;
|
||||
#endif
|
||||
err = munmap(i->addr, size);
|
||||
if (err < 0) {
|
||||
SYSERR("mmap failed");
|
||||
return -errno;
|
||||
}
|
||||
errno = 0;
|
||||
break;
|
||||
case SND_PCM_AREA_SHM:
|
||||
err = shmdt(i->addr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue