Date: Sun, 05 Nov 2000 23:26:57 +0100 From: Khamba Staring <purrcat@edoropolis.org> To: freebsd-multimedia@freebsd.org Subject: SB ViBRA16C 16bit recording problems ( + ugly fix?) Message-ID: <200011052227.eA5MQw617325@francine.edoropolis.org>
next in thread | raw e-mail | index | archive | help
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: <Creative ViBRA16C> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011052227.eA5MQw617325>