From owner-freebsd-multimedia Sat Sep 6 07:25:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA15119 for multimedia-outgoing; Sat, 6 Sep 1997 07:25:09 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id HAA15112 for ; Sat, 6 Sep 1997 07:25:05 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id PAA13572; Sat, 6 Sep 1997 15:13:37 +0200 From: Luigi Rizzo Message-Id: <199709061313.PAA13572@labinfo.iet.unipi.it> Subject: Re: snd970904.tgz To: gurney_j@resnet.uoregon.edu Date: Sat, 6 Sep 1997 15:13:37 +0200 (MET DST) Cc: multimedia@FreeBSD.ORG In-Reply-To: <19970906044626.20461@hydrogen.nike.efn.org> from "John-Mark Gurney" at Sep 6, 97 04:46:07 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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