Subject: kern/2013: ad1848 audio driver limits the blocksize in the wrong way.
To: None <gnats-bugs@NetBSD.ORG>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: netbsd-bugs
Date: 02/01/1996 22:16:54
>Number:         2013
>Category:       kern
>Synopsis:       ad1848 audio driver limits the blocksize in the wrong way.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb  1 16:35:08 1996
>Last-Modified:
>Originator:     Lennart Augustsson
>Organization:
CS at Chalmers University of Technology
>Release:        NetBSD 1.1 current, 1996 Jan 31
>Environment:
System: NetBSD calvin.cs.chalmers.se 1.1A NetBSD 1.1A (CALVIN) #33: Thu Feb 1 21:59:20 MET 1996 augustss@calvin.cs.chalmers.se:/usr/src/sys/arch/i386/compile/CALVIN i386


>Description:
	At high sample rates the ad1848 audio driver (used by wss and others)
	limits the blocksize in a strange way.  It's impossible to set it
	to any value < NBPG/4 or > NBPG/2.  This is surely wrong.

>How-To-Repeat:
	Try setting the blocksize to a reasonable value.
>Fix:
	Change the test condition.

*** dev/isa/ad1848.c.orig	Thu Feb  1 13:37:33 1996
--- dev/isa/ad1848.c	Thu Feb  1 21:55:31 1996
***************
*** 1124,1131 ****
      sc->sc_lastcc = -1;
  
      /* Higher speeds need bigger blocks to avoid popping and silence gaps. */
!     if ((sc->sc_orate > 8000 || sc->sc_irate > 8000) &&
! 	(blk > NBPG/2 || blk < NBPG/4))
  	    blk = NBPG/2;
      /* don't try to DMA too much at once, though. */
      if (blk > NBPG)
--- 1124,1130 ----
      sc->sc_lastcc = -1;
  
      /* Higher speeds need bigger blocks to avoid popping and silence gaps. */
!     if ((sc->sc_orate > 8000 || sc->sc_irate > 8000) && blk < NBPG/2)
  	    blk = NBPG/2;
      /* don't try to DMA too much at once, though. */
      if (blk > NBPG)
>Audit-Trail:
>Unformatted: