Subject: port-i386/1281: Bizarre PAS16 audio output after SIGSTOP-SIGCONT
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Mark_Weaver@brown.edu>
List: netbsd-bugs
Date: 07/26/1995 12:26:42
>Number:         1281
>Category:       port-i386
>Synopsis:       Bizarre PAS16 audio output after SIGSTOP-SIGCONT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   mhw
>Arrival-Date:   Wed Jul 26 12:35:04 1995
>Last-Modified:
>Originator:     Mark Weaver
>Organization:
Brown University Department of Computer Science
>Release:        NetBSD-current 7/17/95
>Environment:
NetBSD cis-ts4-slip4.cis.brown.edu 1.0A NetBSD 1.0A (WEAVER) #1: Tue Jul 25 01:18:00 EDT 1995     mhw@cis-ts4-slip4.cis.brown.edu:/usr/src/sys/arch/i386/compile/WEAVER i386

pas0 at isa0 port 0x220-0x22f irq 7 drq 1 ProAudio Spectrum 16 [rev 255] : dsp v2.00

GW2k 486-dx2/66 vlb 16m
Pro Audio Spectrum 16

>Description:
    A `cat xx.au > /dev/audio` works fairly well normally, but if I
    suspend that process and then continue it, the output gets garbled
    in a very interesting way.

    The samples are no longer output in the same order as found in the
    file.  It sounds as though the output is alternating between the
    correct place in the file and about a second behind the correct
    place.  The period of alternation is a fraction of a second, but
    it's definitely much more than a single sample; I'd guess 1/8 or
    1/16 of a second.
    
    My ears simply aren't accurate enough to tell the exact output
    pattern with certainty, so the above description could be wrong.

    Without any familiarity with the audio code, it seems as though
    there's a ring buffer of samples which is getting out of sync, and
    each DMA chunk reads from the middle of the intended chunk to the
    end, then from the beginning to the middle.  Just a guess...

>How-To-Repeat:
    cat long-file.au > /dev/audio
    After a few seconds, Ctrl-Z
    fg

>Fix:
>Audit-Trail:
>Unformatted: