[nas] isolate input/output?
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Mon Mar 12 08:16:11 MDT 2007
Hi Paul,
On Mon, Mar 12, 2007 at 08:55:53AM -0400, Paul Fox wrote:
> erik wrote:
> > On Sun, Mar 11, 2007 at 01:33:33PM -0400, Paul Fox wrote:
> > > i'm realizing, however, that my problems may have only just
> > > begun.
> > > b) it may or may not be good about only opening the input device, and
> >
> > This could be tested by first starting lircd and then nasd. nasd should
> > fail to open the device if lircd opens it for output as well and you
> > would notice if starting of nasd breaks lirc operation.
>
> i'm afraid lircd blocks nasd from getting the device, forever:
> openDevice
> openDevice: current sample rate = 8012
> openDevice OUT /dev/dsp mode 2
> openDevice: waiting on output device
> openDevice: waiting on output device
> ...repeats...
nasd tries opening the output device, this is not intended to fail
(opening the input device may fail). My patch did not change this, it
just added a way to explicitly specify no out- or input device.
This suggests that lircd is either opening the device for output as well
or that the hardware/driver is half-duplex.
> > > c) you've already implied that my
> > > hardware may be half-duplex. so none of this may work in the end
> > > anyway. :-)
> >
> > IMHO you should check this first, as this is a basic requirement.
>
> any suggestions on how to check this? is there a way to "ask" the system?
$ grep -i duplex /proc/asound/oss/sndstat
0: Intel ICH7 (DUPLEX)
To make sure you could try playing some sound and at the same time
record something, e.g. with aplay and arecord. Using ALSA apps would
rule out the OSS compatibility layer -- if this works you can check if
nasd can open /dev/dsp for in- and output (you mentioned that this didn't
work) to confirm a problem with the OSS compatibility layer.
Another way to test the OSS layer for full-duplex would be to do a
$ cat /dev/dsp > /dev/null
while playing some sound. This should fail (cat: /dev/dsp: Device or
resource busy) if the device is half-duplex. Due to lack of half-duplex
devices I can't test if this really works...
> it's an EPIA-M mini-itx motherboard, with a "VIA
> VT1616 6-Channel AC'97 Codec". it's advertised as capable of
> doing surround-sound, but i can't find anything about duplexness.
> (duplicity? :-).
I would assume that this is full-duplex capable hardware, but I don't
know this.
Could it be that the hardware is somehow configured to use the input
jacks for output (additional speakers)? Something like this could imply
a half-duplex mode since in- and outputs could not be connected at the
same time.
Erik
More information about the Nas
mailing list