mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
Disable memory mapping if we open the device in O_WRONLY. Unfortunately we cannot do mmap() in Linux without opening the device for reading as well.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1549 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
c936e53fa2
commit
8e4660a0b5
1 changed files with 6 additions and 1 deletions
|
|
@ -1078,7 +1078,12 @@ int pa__init(pa_core *c, pa_module*m) {
|
|||
goto fail;
|
||||
|
||||
if (use_mmap && (!(caps & DSP_CAP_MMAP) || !(caps & DSP_CAP_TRIGGER))) {
|
||||
pa_log("OSS device not mmap capable, falling back to UNIX read/write mode");
|
||||
pa_log_info("OSS device not mmap capable, falling back to UNIX read/write mode.");
|
||||
use_mmap = 0;
|
||||
}
|
||||
|
||||
if (use_mmap && mode == O_WRONLY) {
|
||||
pa_log_info("Device opened for write only, cannot do memory mapping, falling back to UNIX read/write mode.");
|
||||
use_mmap = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue