From owner-freebsd-multimedia Fri Sep 5 11:05:42 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA22741 for multimedia-outgoing; Fri, 5 Sep 1997 11:05:42 -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 LAA22710 for ; Fri, 5 Sep 1997 11:05:09 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id SAA12295; Fri, 5 Sep 1997 18:53:17 +0200 From: Luigi Rizzo Message-Id: <199709051653.SAA12295@labinfo.iet.unipi.it> Subject: speed setting problem with SB16 on snd970904.tgz To: grady@scam.XCF.Berkeley.EDU Date: Fri, 5 Sep 1997 18:53:17 +0200 (MET DST) Cc: multimedia@freebsd.org In-Reply-To: <199709051647.SAA12275@labinfo.iet.unipi.it> from "grady@scam.XCF.Berkeley.EDU" at Sep 5, 97 10:42:12 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk A problem in setting speed on SB16 cards was reported. The fix for the SB16 is the following: in sb_dsp.c, function dsp_speed(), add the following lines static int dsp_speed(snddev_info *d) { u_char tconst; u_long flags; int max_speed = 44100, speed = d->speed ; + if (d->bd_flags & BD_F_SB16) { + RANGE (speed, 5000, 45000); + d->speed = speed ; + sb_cmd(d->io_base, 0x41); + sb_cmd(d->io_base, d->speed >> 8 ); + sb_cmd(d->io_base, d->speed & 0xff ); + sb_cmd(d->io_base, 0x42); + sb_cmd(d->io_base, d->speed >> 8 ); + sb_cmd(d->io_base, d->speed & 0xff ); + return speed ; + } /* * only some models can do stereo, and only if not * simultaneously using midi. At this point I am not sure if changing speed works on the SB3.X -- if someone wwants to test... I don't have this card at the moment. Cheers Luigi