Subject: Re: /dev/audioctl emulation?
To: None <port-sparc@NetBSD.ORG>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: port-sparc
Date: 03/10/1996 10:41:58
> On Sat, 09 Mar 1996 04:34:48 -0800 
>  Greg Earle <earle@isolar.tujunga.ca.us> wrote:
> 
>> Ooh!  Close, Charles.  Actually, it turns out to be an I_SETSIG.  It seems
>> to be required for audio code which wants to be notified of changes made
>> to the audio parameters via the control device (/dev/audioctl).  (Because
>> the SunOS audio device is actually a STREAMS-based device.)
>> 
>> It turns out that this STREAMS ioctl() is handled in the 1.1/-current
>> version of /usr/src/sys/compat/sunos_ioctl.c [...]
> 
> Wouldn't make any difference:
> 
>   6321 raplayer CALL  open(0x28768,0,0xbc)
>   6321 raplayer NAMI  "/emul/sunos/dev/audioctl"
>   6321 raplayer NAMI  "/dev/audioctl"
>   6321 raplayer RET   open -1 errno 19 Operation not supported by device
>   6321 raplayer CALL  open(0x28c58,0x1,0)
>   6321 raplayer NAMI  "/emul/sunos/dev/audio"
>   6321 raplayer NAMI  "/dev/audio"
>   6321 raplayer RET   open 9
>   6321 raplayer CALL  ioctl(0xffffffff,0x40844101 ,0xf7fff090)
>   6321 raplayer RET   ioctl -1 errno 9 Bad file descriptor
>   6321 raplayer CALL  close(0x9)
>   6321 raplayer RET   close 0
> 
> I made a audioctl but it doesn't work...

Well, what happened when you made the audioctl?

On my 1.0 system, I got:

 [...]
 14482 raplayer CALL  open(0x28768,0,0)
 14482 raplayer NAMI  "/dev/audioctl"
 14482 raplayer RET   open 6
 14482 raplayer CALL  ioctl(0x6,0x20005309 ,0x8)
 14482 raplayer RET   ioctl -1 errno 22 Invalid argument

This is the I_SETSIG ioctl() that failed.  I would have expected that by 1.1
with this ioctl() supported that this would work ...

 14482 raplayer CALL  open(0xf7fff77d,0,0x180)
 14482 raplayer NAMI  "/usr/local/raplayer/welcome288.ra"
 [...]

netbsd4me:1:25 [/tmp] % ls -l /dev/audio*
crw-rw-rw-  1 root  wheel   69,   0 Mar  9 00:19 /dev/audio
lrwxr-xr-x  1 root  wheel         5 Mar  5 18:56 /dev/audioctl@ -> audio

	- Greg