Sound ioctl's

From: Gordon Sadler (gbsadler1@lcisp.com)
Date: Wed May 16 2001 - 23:13:46 EST


Please CC replies as I'm not subscribed.
I seem to be having some problems with sound ioctl's.

I've attached a short c file that opens /dev/dsp, prints the fd, tries
to issue SNDCTL_DSP_NONBLOCK ioctl, then does the same with /dev/audio.

Both calls to ioctl for NONBLOCK yield Invalid Invalid argument.
I've searched the kernel source under drivers/sound/ to see if/where
this ioctl is defined.

grep -rl SNDCTL_DSP_NONBLOCK drivers/sound/*
drivers/sound/audio.c
drivers/sound/cmpci.c
drivers/sound/cs4281/cs4281m.c
drivers/sound/cs46xx.c
drivers/sound/emu10k1/audio.c
drivers/sound/es1370.c
drivers/sound/es1371.c
drivers/sound/esssolo1.c
drivers/sound/i810_audio.c
drivers/sound/maestro.c
drivers/sound/maestro3.c
drivers/sound/msnd_pinnacle.c
drivers/sound/sonicvibes.c
drivers/sound/trident.c
drivers/sound/vwsnd.c
drivers/sound/ymfpci.c

Now I'm using a via chipset embedded sound.
lsmod
via82cxxx_audio 16496 0 (autoclean)
soundcore 3472 2 (autoclean) [via82cxxx_audio]
ac97_codec 8352 0 (autoclean) [via82cxxx_audio]

So none of the files that use SNDCTL_DSP_NONBLOCK were compiled for my
kernel. I came up with a question and 2 possible solutions.

Question:
  Are all ioctl's valid for all devices within a major block?

Solutions:
 1. Turn on CONFIG_SOUND_OSS so sound.o is produced, however the
 Configure.help says, "...Say Y or M here (the module will be called
 sound.o) if you haven't found a driver for your sound card above, then
 pick your driver from the list below.
       
 2. Determine a way to tell which ioctl's a particular driver supports.

Any ideas here?

-- 
Gordon Sadler


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:21 EST