From davidt@yadt.co.uk  Mon Apr  2 17:28:36 2001
Return-Path: <davidt@yadt.co.uk>
Received: from mail.yadt.co.uk (yadt.demon.co.uk [158.152.4.134])
	by hub.freebsd.org (Postfix) with SMTP id A62EB37B71C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  2 Apr 2001 17:28:30 -0700 (PDT)
	(envelope-from davidt@yadt.co.uk)
Received: (qmail 15449 invoked from network); 3 Apr 2001 00:28:29 -0000
Received: from gattaca.local.yadt.co.uk (HELO mail.gattaca.yadt.co.uk) (qmailr@10.0.0.2)
  by xfiles.yadt.co.uk with SMTP; 3 Apr 2001 00:28:29 -0000
Received: (qmail 1600 invoked by uid 1000); 3 Apr 2001 00:28:28 -0000
Message-Id: <20010403002828.1599.qmail@gattaca.yadt.co.uk>
Date: 3 Apr 2001 00:28:28 -0000
From: davidt@yadt.co.uk
Reply-To: davidt@yadt.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pcm only plays left channel in FreeBSD 4.3-RC
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26304
>Category:       kern
>Synopsis:       pcm only plays left channel in FreeBSD 4.3-RC
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 02 17:30:02 PDT 2001
>Closed-Date:    Mon Dec 3 09:35:35 PST 2001
>Last-Modified:  Mon Dec 03 09:38:59 PST 2001
>Originator:     David Taylor
>Release:        FreeBSD 4.3-RC i386
>Organization:
>Environment:
System: FreeBSD gattaca.yadt.co.uk 4.3-RC FreeBSD 4.3-RC #9: Tue Apr 3 01:08:15 BST 2001 davidt@gattaca.yadt.co.uk:/usr/obj/usr/src/sys/GATTACA i386

Soundcard: Soundblaster Live! 256 Value (or something similar),
pcm0: <Creative EMU10K1> port 0x10a0-0x10bf irq 10 at device 14.0 on pci0

>Description:

Under FreeBSD 4.3-BETA as of ~4th March, everything worked fine, however,
when I cvsuped to 4.3-RC as of today (late 2nd April), I noticed xmms was
only playing through the left speaker.

CD's, etc, still played properly, but if I attempted to move the balance to
the right speaker, nothing played at all, because all the sound was being
sent to the right channel, but.. vanishing somewhere..

I'm not sure how many people are going to be hit by this problem,
but it'd be really nice if this was fixed before 4.3-RELEASE...

>How-To-Repeat:
	cvsup.. play something.. note lack of sound from right speaker.
	I'm assuming it's a problem specific to my soundcard,
	or someone would have noticed it earlier....
>Fix:

I narrowed the problem down to an MFC in dev/sound/pcm around 4 weeks ago,
and eventually managed to discover that the problem went away again if I
reverted this single hunk of that MFC..

(although, presumably, this also reintroduces whatever problem that MFC was
 attempting to fix)

As for a real fix... I'll leave that to someone who has a clue about the pcm
driver :)

===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/dsp.c,v
retrieving revision 1.15.2.6
retrieving revision 1.15.2.7
diff -u -p -r1.15.2.6 -r1.15.2.7
--- src/sys/dev/sound/pcm/dsp.c 2001/02/03 01:29:11     1.15.2.6
+++ src/sys/dev/sound/pcm/dsp.c 2001/03/14 15:18:58     1.15.2.7
@@ -82,6 +82,8 @@ dsp_open(snddev_info *d, int chan, int o
        if (chan >= d->chancount) return ENODEV;
        if ((d->flags & SD_F_SIMPLEX) && (d->ref[chan] > 0)) return EBUSY;
+       if (d->atype[chan] != 0 && d->atype[chan] != devtype) return EBUSY;
+
        rdch = d->arec[chan];
        wrch = d->aplay[chan];
        if (oflags & FREAD) {
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Sun Dec 2 14:49:15 PST 2001 
State-Changed-Why:  

Does this problem still exist? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26304 
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Mon Dec 3 09:35:35 PST 2001 
State-Changed-Why:  

Submitter switched to -CURRENT, but suspects that the problem was 
fixed in -STABLE also. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26304 
>Unformatted:
