unimplemented sound ioctl
Alexander Leidinger
Alexander at Leidinger.net
Wed Jun 30 15:04:57 PDT 2004
On Wed, 30 Jun 2004 14:22:34 -0400
Mathew Kanner <mat at cnd.mcgill.ca> wrote:
> If we are missing IOCTL, this should be corrected. If you can
> show that we are missing IOCTLs then we can at least implemented them
> as stubs so apps can compile and run. I'm offline for at least a
> couple of weeks (I have moving!).
According to the OSS documentation from 4front (oss.pdf, page 105) we
are missing it...
Attached is a patch, I haven't tested it yet, but I will test it
tomorrow.
I don't know if we are allowed to switch at any time, so this may show
bad behavior if misused.
Bye,
Alexander.
--
I'm available to get hired (preferred in .lu).
http://www.Leidinger.net Alexander @ Leidinger.net
GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
-------------- next part --------------
Index: dsp.c
===================================================================
RCS file: /big/FreeBSD-CVS/src/sys/dev/sound/pcm/dsp.c,v
retrieving revision 1.76
diff -u -u -r1.76 dsp.c
--- dsp.c 17 Jun 2004 17:16:45 -0000 1.76
+++ dsp.c 30 Jun 2004 21:46:01 -0000
@@ -1006,6 +1006,15 @@
}
break;
+ case SNDCTL_DSP_SETDUPLEX:
+ /*
+ * switch to full-duplex mode if card is in halb-duplex
+ * mode and is able to work in full-duplex mode
+ */
+ if (rdch && wrch && (dsp_get_flags(i_dev) & SD_F_SIMPLEX))
+ dsp_set_flags(i_dev, dsp_get_flags(i_dev)^SD_F_SIMPLEX);
+ break;
+
case SNDCTL_DSP_MAPINBUF:
case SNDCTL_DSP_MAPOUTBUF:
case SNDCTL_DSP_SETSYNCRO:
@@ -1015,6 +1024,7 @@
case SOUND_PCM_WRITE_FILTER:
case SOUND_PCM_READ_FILTER:
/* dunno what these do, don't sound important */
+
default:
DEB(printf("default ioctl fn 0x%08lx fail\n", cmd));
ret = EINVAL;
More information about the freebsd-multimedia
mailing list