Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Sep 1997 18:53:17 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        grady@scam.XCF.Berkeley.EDU
Cc:        multimedia@freebsd.org
Subject:   speed setting problem with SB16 on snd970904.tgz
Message-ID:  <199709051653.SAA12295@labinfo.iet.unipi.it>
In-Reply-To: <199709051647.SAA12275@labinfo.iet.unipi.it> from "grady@scam.XCF.Berkeley.EDU" at Sep 5, 97 10:42:12 am

next in thread | previous in thread | raw e-mail | index | archive | help
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



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