Deleted Added
full compact
sbdsp.c (1.36) sbdsp.c (1.37)
1/* $NetBSD: sbdsp.c,v 1.36 1997/03/20 11:04:51 mycroft Exp $ */
1/* $NetBSD: sbdsp.c,v 1.37 1997/03/20 16:04:22 mycroft Exp $ */
2
3/*
4 * Copyright (c) 1991-1993 Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 616 unchanged lines hidden (view full) ---

626sbdsp_round_blocksize(addr, blk)
627 void *addr;
628 int blk;
629{
630 register struct sbdsp_softc *sc = addr;
631
632 sc->sc_last_hs_size = 0;
633
2
3/*
4 * Copyright (c) 1991-1993 Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 616 unchanged lines hidden (view full) ---

626sbdsp_round_blocksize(addr, blk)
627 void *addr;
628 int blk;
629{
630 register struct sbdsp_softc *sc = addr;
631
632 sc->sc_last_hs_size = 0;
633
634 /* Higher speeds need bigger blocks to avoid popping and silence gaps. */
635 if (blk < NBPG/4 || blk > NBPG/2) {
636 if (ISSB16CLASS(sc)) {
637 if (sc->sc_orate > 8000 || sc->sc_irate > 8000)
638 blk = NBPG/2;
639 } else {
640 if (sc->sc_otc > SB_8K || sc->sc_itc < SB_8K)
641 blk = NBPG/2;
642 }
643 }
644 /* don't try to DMA too much at once, though. */
645 if (blk > NBPG)
646 blk = NBPG;
647 if (sc->sc_channels == 2)
648 return (blk & ~1); /* must be even to preserve stereo separation */
649 else
650 return (blk); /* Anything goes :-) */
651}

--- 1093 unchanged lines hidden ---
634 /* don't try to DMA too much at once, though. */
635 if (blk > NBPG)
636 blk = NBPG;
637 if (sc->sc_channels == 2)
638 return (blk & ~1); /* must be even to preserve stereo separation */
639 else
640 return (blk); /* Anything goes :-) */
641}

--- 1093 unchanged lines hidden ---