From owner-freebsd-multimedia Sun Nov 5 14:27:31 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from francine.edoropolis.org (catv6055.extern.kun.nl [131.174.116.55]) by hub.freebsd.org (Postfix) with ESMTP id 1A4D937B4E5 for ; Sun, 5 Nov 2000 14:27:20 -0800 (PST) Received: from francine.edoropolis.org (localhost [127.0.0.1]) by francine.edoropolis.org (8.11.0/8.9.2) with ESMTP id eA5MQw617325 for ; Sun, 5 Nov 2000 23:27:02 +0100 (CET) (envelope-from purrcat@edoropolis.org) Message-Id: <200011052227.eA5MQw617325@francine.edoropolis.org> To: freebsd-multimedia@freebsd.org Subject: SB ViBRA16C 16bit recording problems ( + ugly fix?) X-Mailer: nmh X-Maileditor: vi X-Visit: http://www.edoropolis.org/ X-Use: Leona-HTTPd, http://www.qdonksoft.com/ Date: Sun, 05 Nov 2000 23:26:57 +0100 From: Khamba Staring Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I'm experiencing some problems trying to record sound using a SoundBlaster ViBRA16C under FreeBSD 4.1. Playback of 16 bits audio works (haven't tried 8bit playback), but recording at 16 bits per sample does not work. Recording _did_ work when I used FreeBSD 3.3 on the same machine (I recently made sure). On both FreeBSD 3.3 and 4.1, I used the `newpcm' driver. The card is properly detected and no drq conflicts are present.. -- (dmesg) sbc1: at port 0x220-0x22f,0x330-0x331,0x388-0x38b irq 5 drq 1,5 on isa0 sbc1: setting card to irq 5, drq 1, 5 -- I searched a bit through the /sys/dev/sound source files and added some debugging printf()s. The driver seems to go through sbchan_init twice (once for every drq i presume?). It seems the `read end' got drq1 and the `write end' got drq5, but 16bit recording needs drq5.. I base this presumption on what I see in the function sbchan_init() in /sys/dev/sound/isa/sb.c : -- (sb.c, I added two printf()s here) dch = (dir == PCMDIR_PLAY)? 1 : 0; if (sb->bd_flags & BD_F_SB16X) dch = !dch; dl = rman_get_start(sb->drq1); dh = sb->drq2? rman_get_start(sb->drq2) : dl; printf("SB sbchan_init1: ch->buffer->chan %d\n", ch->buffer->chan); ch->buffer->chan = dch? dh : dl; printf("SB sbchan_init2: ch->buffer->chan %d\n", ch->buffer->chan); -- dch is only 1 if dir = PCMDIR_PLAY so if dir != PCMDIR, ch->buffer->chan will always equal dl, the lower drq. Why is this done? Evilly setting ch->buffer->chan to 5 (drq5) seems to work nicely and playback still works (quickly tested it while typing this mail).. Now I can't record 8bit, but I couldn't care less about that :) Can anyone tell my why this is done?? I'm really puzzled.. Kind regards, -- Khamba Staring To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message