Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 1997 15:13:37 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        gurney_j@resnet.uoregon.edu
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: snd970904.tgz
Message-ID:  <199709061313.PAA13572@labinfo.iet.unipi.it>
In-Reply-To: <19970906044626.20461@hydrogen.nike.efn.org> from "John-Mark Gurney" at Sep 6, 97 04:46:07 am

next in thread | previous in thread | raw e-mail | index | archive | help
> I can now record off the sound card while playing mods...  (my inet
> connectivity doesn't allow me to try out the mbone)..  but I think

you can still use vat on a standalone system, just do

    route add 224.0.0.0 -netmask 0xf0000000 -interface 127.0.0.1

and enable loopback and fullduplex in the vat control window, and you
can hear yourself speaking.

> I've found a MAJOR problem.. your code assume the recmask that is
> passed in on a MIXER_WRITE(SOUND_MIXER_RECSRC) only sets one of the
> bits... instead of setting multiple bits.. this causes your code to
> fall over...  and there is no fix for it when you use the default
> mixer command...

Sorry but the problem is in the "mixer" command, not in the driver.

The Voxware driver only allowed one source on many boards, and
would default to using the MIC only in case of a non-supported
configuration. My driver follows the same approach, which seems
reasonable (since there is no way to choose in case multiple bits
are set).

The mixer command is broken in that it only allows you to add/remove
sources, not to set them, and as you notice it fails. I have updated it
long ago to support the command "=rec source" which sets a single
source.

> I finally started looking at the code and it scared me... so I have
> rewriten it.. and I have it fully functioning... I don't think I've

do you have patches/sources ? Please submit a PR so that it gets fixed.

> now a bit more about your driver...
> 
> right now I somehow got it to were it thinks there is a reader (when
> lsof lists no *dsp* or *audio* files open, lsof will list the mod player
> when it's playing) active.. and playback is going as fast as the player
> can feed the sound card.. and the output sounds like your running a cd
> player fast forward, but running it about 10 times what a normal fast
> forward is...
> 
> the console doesn't give much info:
> default ioctl snd1 subdev 4 fn 0x40406d02 fail
> default ioctl snd1 subdev 3 fn 0x40406d02 fail

probably dd does call MTIOCGET

#define  MTIOCGET        _IOR('m', 2, struct mtget)

and then somehow close is not invoked properly when the output is
aborted.  I'll look into the problem.

> for the open reading problem.. I haven't looked at the code, but I think
> what might be happening is that you are counting an open reader when
> I do something like cp /dev/audio0 > /dev/null (my pcm is pcm1 and I
> don't have a pcm0) and /dev/audio0 is invalid, and returns it, but the
> open count never gets decremented..

no, probably I forgot to clear the 'reader active' flag.

Thanks for the very detailed info

	Cheers
	Luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709061313.PAA13572>