C ioctl SPKRTONE/SPKRTUNE vs. KIOCSOUND

On Linux (gag), I can issue this to device /dev/console:
Code:
ioctl(fd,KIOCSOUND,6087 /* G below middle C */)
... but even though FreeBSD defines the KIOCSOUND ioctl(2) in /usr/include/sys/kbio.h, it seems to return error 25, Inappropriate ioctl for device (and returns the same if the device is /dev/tty, or (after kldload speaker.ko) /dev/speaker.

I have legacy code which uses KIOCSOUND, and I also want to exert the finer pitch control allowed by it. Is there a workaround so I can use it in FreeBSD? Perhaps a kld file that I don't know about?
 
Back
Top