>Number: 181104
>Category: misc
>Synopsis: audio/mumble: dubious patch to allow OSS device selection
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 07 08:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Natacha Porté
>Release: 9.1
>Organization:
>Environment:
FreeBSD yulai 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10
UTC 2012 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Mumble OSS implementation performs device enumeration only when SOUND_VERSION
is at least 0x040002, but OSS in FreeBSD base defines it as 0x040000. So only
default input and output devices are available.
However, the actual code seems to be almost adequate for device enumeration in
FreeBSD, the only caveat being that oss_audioinfo::handle is empty, but
oss_audioinfo::name is a good enough unique identifier.
The attached patch removes SOUND_VERSION test and uses oss_audioinfo::name
instead of oss_audioinfo::handle. I have been using it for about 1.5 years now,
first on 8.2-RELEASE then on 9.1-RELEASE, both on amd64, without noticing any
side-effect. However I don't know whether it's portable enough and/or clean
enough to make it to the ports tree.
>How-To-Repeat:
- Start mumble
- Select preferences or audio wizard
-> notice that input or output device selection is grayed out, leaving you
no option other than "Default OSS device"
>Fix:
Copy the attached patch as audio/mumble/files/patch-src-mumble-OSS.cpp
Patch attached with submission follows:
--- src/mumble/OSS.cpp.orig 2013-08-03 14:01:25.000000000 +0200
+++ src/mumble/OSS.cpp 2013-08-03 14:12:51.000000000 +0200
@@ -153,7 +153,6 @@
qhOutput.insert(QString(), QLatin1String("Default OSS Device"));
qhDevices.insert(QString(), QLatin1String("/dev/dsp"));
-#if (SOUND_VERSION >= 0x040002)
int mixerfd = open("/dev/mixer", O_RDWR, 0);
if (mixerfd == -1) {
qWarning("OSSEnumerator: Failed to open /dev/mixer");
@@ -182,15 +181,14 @@
if (ainfo.caps & PCM_CAP_HIDDEN)
continue;
- qhDevices.insert(handle, device);
+ qhDevices.insert(name, device);
if (ainfo.caps & PCM_CAP_INPUT)
- qhInput.insert(handle, name);
+ qhInput.insert(name, name);
if (ainfo.caps & PCM_CAP_OUTPUT)
- qhOutput.insert(handle, name);
+ qhOutput.insert(name, name);
}
close(mixerfd);
-#endif
}
OSSInput::OSSInput() {
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"