I'm using the "ich" OSS driver for my soundcard because the freebsd driver does not support changing the mic input to the auxiliary channel. Now - many programs (i.e. xwave, teamspeak, skype) rely on the SNDCTL_DSP_GETBLKSIZE ioctl that is handled incorrect by the OSS-driver which returns an "Invalid argument" error. (At least the ich driver) I attached my dmesg output and a little test program. Thank you, Martin L. Fix: use the original sound_ich driver and forgo the features of the oss driver Patch attached with submission follows: How-To-Repeat: Install OSS and try the following test-program: (or try to use xwave for playback or recording) #include <sys/ioctl.h> #include <fcntl.h> #include <sys/soundcard.h> #include <stdio.h> #include <errno.h> main() { int audio; int size = 0; int ioctl_retval; audio = open("/dev/dsp", O_RDONLY); if (audio == -1) printf("open(\"/dev/dsp\",O_RDONLY): %s\n", strerror(errno)); printf("audio: %d\n", audio); ioctl_retval = ioctl(audio, SNDCTL_DSP_GETBLKSIZE, &size); printf("SNDCTL_DSP_GETBLKSIZE: %i\n", size); if (ioctl_retval == -1) printf("ioctl(audio, SNDCTL_DSP_GETBLKSIZE, &size): %s\n", strer close(audio); return 0; }
Responsible Changed From-To: freebsd-ports-bugs->jkim Over to maintainer (via the GNATS Auto Assign Tool)
jkim 2008-07-15 16:36:13 UTC FreeBSD ports repository Modified files: audio/oss Makefile Added files: audio/oss/files patch-kernel-framework-audio-audio_core.c Log: Work around SNDCTL_DSP_GETBLKSIZE API incompatibility. PR: ports/125542 Revision Changes Path 1.26 +1 -0 ports/audio/oss/Makefile 1.1 +12 -0 ports/audio/oss/files/patch-kernel-framework-audio-audio_core.c (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
On Monday 14 July 2008 08:20 pm, Jung-uk Kim wrote: > This is one of the incompatibilities between FreeBSD vs. OSS API. > > soundcard.h from FreeBSD: > > #define SNDCTL_DSP_GETBLKSIZE _IOR('P', 4, int) > > soundcard.h from OSS: > > #define SNDCTL_DSP_GETBLKSIZE __SIOWR('P', 4, int) > > Note FreeBSD version is read-only and OSS version is not. It seems > OSS version is wrong but it is an obsolete API: > > http://manuals.opensound.com/developer/SNDCTL_DSP_GETBLKSIZE.html > > You have two choices here. Compile your appliacations with > include/soundcard.h from OSS distribution or use > SNDCTL_DSP_GET[IO]SPACE as recommeneded in the manual. The latter > is obviously better choice and there is no incompatibility between > the two versions. I just committed a fix. FYI, my test program is attached. Thanks for the report! Jung-uk Kim
State Changed From-To: open->closed The fix was committed long ago.