diff options
author | marcus <marcus@FreeBSD.org> | 2009-07-10 14:57:16 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2009-07-10 14:57:16 +0800 |
commit | f093d6ac66156694be229876f8a9b23e871883c5 (patch) | |
tree | dbf299af920a2cce9810ec91fdf33165c32c7d46 /audio | |
parent | e0486b0eeab52281ea9b21e9e128730569f8868c (diff) | |
download | freebsd-ports-gnome-f093d6ac66156694be229876f8a9b23e871883c5.tar.gz freebsd-ports-gnome-f093d6ac66156694be229876f8a9b23e871883c5.tar.zst freebsd-ports-gnome-f093d6ac66156694be229876f8a9b23e871883c5.zip |
Fix pulseaudio's interaction with OSS on FreeBSD. Most notably, use the
fixer file descriptor when executing mixer-rleated ioctls. It was only
luck that this used to work with the DSP file descriptor, but broke when
vpc was introduced in -CURRENT.
Thanks to ariff for tracking this down.
Submitted by: ariff
Diffstat (limited to 'audio')
-rw-r--r-- | audio/pulseaudio/Makefile | 2 | ||||
-rw-r--r-- | audio/pulseaudio/files/patch-src_modules_module-oss.c | 24 | ||||
-rw-r--r-- | audio/pulseaudio/files/patch-ubuntu-bundle | 4 |
3 files changed, 28 insertions, 2 deletions
diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile index 1518984db836..7471af1e22ee 100644 --- a/audio/pulseaudio/Makefile +++ b/audio/pulseaudio/Makefile @@ -8,7 +8,7 @@ PORTNAME= pulseaudio PORTVERSION= 0.9.14 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= audio MASTER_SITES= http://0pointer.de/lennart/projects/${PORTNAME}/ diff --git a/audio/pulseaudio/files/patch-src_modules_module-oss.c b/audio/pulseaudio/files/patch-src_modules_module-oss.c new file mode 100644 index 000000000000..97cf10e4dde1 --- /dev/null +++ b/audio/pulseaudio/files/patch-src_modules_module-oss.c @@ -0,0 +1,24 @@ +--- src/modules/module-oss.c.orig 2009-07-10 02:51:21.000000000 -0400 ++++ src/modules/module-oss.c 2009-07-10 02:52:05.000000000 -0400 +@@ -1204,10 +1204,12 @@ int pa__init(pa_module*m) { + use_mmap = 0; + } + ++#ifndef __FreeBSD__ + if (use_mmap && mode == O_WRONLY) { + pa_log_info("Device opened for playback only, cannot do memory mapping, falling back to UNIX write() mode."); + use_mmap = 0; + } ++#endif + + if (pa_oss_get_hw_description(dev, hwdesc, sizeof(hwdesc)) >= 0) + pa_log_info("Hardware name is '%s'.", hwdesc); +@@ -1385,7 +1387,7 @@ int pa__init(pa_module*m) { + pa_bool_t do_close = TRUE; + u->mixer_devmask = 0; + +- if (ioctl(fd, SOUND_MIXER_READ_DEVMASK, &u->mixer_devmask) < 0) ++ if (ioctl(u->mixer_fd, SOUND_MIXER_READ_DEVMASK, &u->mixer_devmask) < 0) + pa_log_warn("SOUND_MIXER_READ_DEVMASK failed: %s", pa_cstrerror(errno)); + + else { diff --git a/audio/pulseaudio/files/patch-ubuntu-bundle b/audio/pulseaudio/files/patch-ubuntu-bundle index d56f21932fad..34e0819b97f1 100644 --- a/audio/pulseaudio/files/patch-ubuntu-bundle +++ b/audio/pulseaudio/files/patch-ubuntu-bundle @@ -559,7 +559,7 @@ Index: pulseaudio-0.9.14/src/modules/module-oss.c int mode, caps; pa_bool_t record = TRUE, playback = TRUE, use_mmap = TRUE; pa_sample_spec ss; -@@ -1201,12 +1201,12 @@ +@@ -1201,14 +1201,14 @@ if (use_mmap && (!(caps & DSP_CAP_MMAP) || !(caps & DSP_CAP_TRIGGER))) { pa_log_info("OSS device not mmap capable, falling back to UNIX read/write mode."); @@ -567,11 +567,13 @@ Index: pulseaudio-0.9.14/src/modules/module-oss.c + use_mmap = FALSE; } + #ifndef __FreeBSD__ if (use_mmap && mode == O_WRONLY) { pa_log_info("Device opened for playback only, cannot do memory mapping, falling back to UNIX write() mode."); - use_mmap = 0; + use_mmap = FALSE; } + #endif if (pa_oss_get_hw_description(dev, hwdesc, sizeof(hwdesc)) >= 0) @@ -1216,6 +1216,7 @@ |