NetBSD Problem Report #45678

From www@NetBSD.org  Sat Dec  3 11:15:46 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 6F23F63D6F9
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  3 Dec 2011 11:15:46 +0000 (UTC)
Message-Id: <20111203111545.8B44563D58E@www.NetBSD.org>
Date: Sat,  3 Dec 2011 11:15:45 +0000 (UTC)
From: idleroux@fastmail.fm
Reply-To: idleroux@fastmail.fm
To: gnats-bugs@NetBSD.org
Subject: cdplay produces no sound
X-Send-Pr-Version: www-1.0

>Number:         45678
>Category:       bin
>Synopsis:       cdplay produces no sound
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 03 11:20:00 +0000 2011
>Last-Modified:  Sun Dec 18 12:35:01 +0000 2011
>Originator:     Ian D. Leroux
>Release:        -current, sources checked out 2011/11/14
>Organization:
Aarhus Universitet
>Environment:
NetBSD scrameustache.dyndns.org 5.99.56 NetBSD 5.99.56 (SCRAMEUSTACHE) #1: Mon Nov 14 20:48:20 CET 2011  idleroux@scrameustache.dyndns.org:/build/obj/sys/arch/amd64/compile/SCRAMEUSTACHE amd64

>Description:
Playing an audio CD with cdplay no longer produces audible output.
The status output looks normal:
  $ cdplay status
  audio status:	playing
  current track:	1
  current index:	1
  position:	0:11.73
  shuffle play:	off
  digital xfer:	off
  media catalog:	active (0602498840399)
  left volume:	255
  right volume:	255
and the "position" counter increases as it should, but no sound is produced.

Playing the same audio CD on the same machine running under another operating system produces music as expected, which indicates that the hardware is still ok.

Playing digital music files with mplayer under NetBSD produces music as expected, so the speakers and audio card seem to be working.  For reference:
  $ dmesg |grep audio
  hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
  hdaudio0: interrupting at ioapic0 pin 17
  hdafg0 at hdaudio0: Conexant CX20585
  audio0 at hdafg0: full duplex, playback, capture, independent
  hdvsmfg at hdaudio0 not configured
  hdafg1 at hdaudio0: Intel G45 HDMI
  audio at pad0 not configured

I can obtain a track list using
  $ cdplay info
  track     start  duration   block  length     type
  --------------------------------------------------
      1   0:02.00   2:47.63       0   12588    audio
      2   2:49.63   2:44.52   12588   12352    audio
      3   5:34.40   2:57.03   24940   13278    audio
      4   8:31.43   2:57.67   38218   13342    audio
      5  11:29.35   4:25.08   51560   19883    audio
      6  15:54.43   2:36.25   71443   11725    audio
      7  18:30.68   2:04.50   83168    9350    audio
      8  20:35.43   3:13.07   92518   14482    audio
      9  23:48.50   3:21.63  107000   15138    audio
     10  27:10.38   5:39.12  122138   25437    audio
     11  32:49.50   2:56.40  147575   13240    audio
      -  35:46.15         -  160815       - lead-out
so communication with the drive also seems to be working.

Perhaps a problem with the mixer settings?
  $ mixerctl -a
  outputs.master=129,129
  outputs.master.mute=off
  outputs.master2=129,129
  outputs.master2.mute=off
  inputs.beep=108,108
  inputs.reclvl=222,222
  inputs.reclvl.mute=off
  record.mic=0,0
  record.mic2=0,0
  inputs.reclvl2=0,0
  outputs.dacsel=DAC00,DAC02
  record.source=ADC01,ADC03
>How-To-Repeat:
cdplay play

and note ensuing silence
>Fix:

>Audit-Trail:
From: "Jared McNeill" <jmcneill@invisible.ca>
To: <idleroux@fastmail.fm>
Cc: <gnats-bugs@NetBSD.org>
Subject: Re: bin/45678: cdplay produces no sound
Date: Sun, 4 Dec 2011 09:00:12 -0500

 cdplay uses analog output mode by default, which is unfortunately not a good 
 choice for anything remotely modern. In analog mode cdplay tells the disc 
 drive to start playing, and relies on a pass-through audio cable from the 
 CD-ROM device to a capture port on the sound card, and the sound card 
 redirecting that output to your speakers. On newer systems, you want to 
 simply read PCM data from the CD-ROM device and play it to the sound card's 
 PCM playback port. cdplay supports this with the "digital" command, see 
 http://netbsd.gw.com/cgi-bin/man-cgi?cdplay++NetBSD-current


 -----Original Message----- 
 From: idleroux@fastmail.fm
 Sent: Saturday, December 03, 2011 6:20 AM Newsgroups: gmane.os.netbsd.bugs
 To: gnats-admin@netbsd.org ; netbsd-bugs@netbsd.org
 Subject: bin/45678: cdplay produces no sound

 >Number:         45678
 >Category:       bin
 >Synopsis:       cdplay produces no sound
 >Confidential:   no
 >Severity:       non-critical
 >Priority:       medium
 >Responsible:    bin-bug-people
 >State:          open
 >Class:          sw-bug
 >Submitter-Id:   net
 >Arrival-Date:   Sat Dec 03 11:20:00 +0000 2011
 >Originator:     Ian D. Leroux
 >Release:        -current, sources checked out 2011/11/14
 >Organization:
 Aarhus Universitet
 >Environment:
 NetBSD scrameustache.dyndns.org 5.99.56 NetBSD 5.99.56 (SCRAMEUSTACHE) #1: 
 Mon Nov 14 20:48:20 CET 2011 
 idleroux@scrameustache.dyndns.org:/build/obj/sys/arch/amd64/compile/SCRAMEUSTACHE 
 amd64

 >Description:
 Playing an audio CD with cdplay no longer produces audible output.
 The status output looks normal:
   $ cdplay status
   audio status: playing
   current track: 1
   current index: 1
   position: 0:11.73
   shuffle play: off
   digital xfer: off
   media catalog: active (0602498840399)
   left volume: 255
   right volume: 255
 and the "position" counter increases as it should, but no sound is produced.

 Playing the same audio CD on the same machine running under another 
 operating system produces music as expected, which indicates that the 
 hardware is still ok.

 Playing digital music files with mplayer under NetBSD produces music as 
 expected, so the speakers and audio card seem to be working.  For reference:
   $ dmesg |grep audio
   hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
   hdaudio0: interrupting at ioapic0 pin 17
   hdafg0 at hdaudio0: Conexant CX20585
   audio0 at hdafg0: full duplex, playback, capture, independent
   hdvsmfg at hdaudio0 not configured
   hdafg1 at hdaudio0: Intel G45 HDMI
   audio at pad0 not configured

 I can obtain a track list using
   $ cdplay info
   track     start  duration   block  length     type
   --------------------------------------------------
       1   0:02.00   2:47.63       0   12588    audio
       2   2:49.63   2:44.52   12588   12352    audio
       3   5:34.40   2:57.03   24940   13278    audio
       4   8:31.43   2:57.67   38218   13342    audio
       5  11:29.35   4:25.08   51560   19883    audio
       6  15:54.43   2:36.25   71443   11725    audio
       7  18:30.68   2:04.50   83168    9350    audio
       8  20:35.43   3:13.07   92518   14482    audio
       9  23:48.50   3:21.63  107000   15138    audio
      10  27:10.38   5:39.12  122138   25437    audio
      11  32:49.50   2:56.40  147575   13240    audio
       -  35:46.15         -  160815       - lead-out
 so communication with the drive also seems to be working.

 Perhaps a problem with the mixer settings?
   $ mixerctl -a
   outputs.master=129,129
   outputs.master.mute=off
   outputs.master2=129,129
   outputs.master2.mute=off
   inputs.beep=108,108
   inputs.reclvl=222,222
   inputs.reclvl.mute=off
   record.mic=0,0
   record.mic2=0,0
   inputs.reclvl2=0,0
   outputs.dacsel=DAC00,DAC02
   record.source=ADC01,ADC03
 >How-To-Repeat:
 cdplay play

 and note ensuing silence
 >Fix:

From: "Ian D. Leroux" <idleroux@fastmail.fm>
To: "Jared McNeill" <jmcneill@invisible.ca>
Cc: <gnats-bugs@NetBSD.org>
Subject: Re: bin/45678: cdplay produces no sound
Date: Sun, 4 Dec 2011 20:39:11 +0100

 Quoting "Jared McNeill" <jmcneill@invisible.ca> (Sun, 4 Dec 2011
 09:00:12 -0500):

 > cdplay uses analog output mode by default, which is unfortunately not
 > a good choice for anything remotely modern. In analog mode cdplay
 > tells the disc drive to start playing, and relies on a pass-through
 > audio cable from the CD-ROM device to a capture port on the sound
 > card, and the sound card redirecting that output to your speakers. On
 > newer systems, you want to simply read PCM data from the CD-ROM
 > device and play it to the sound card's PCM playback port. cdplay
 > supports this with the "digital" command, see
 > http://netbsd.gw.com/cgi-bin/man-cgi?cdplay++NetBSD-current

 The digital command does indeed let me hear the CD being played, thank
 you.  Analog mode did, however, formerly work on this machine, so I
 would argue that its failure to do so with recent -current is still a
 regression, unless analog mode has been officially deprecated.  I don't
 rebuild my base system often enough to be sure of when it stopped
 working, but I believe it was still working at the end of July and
 know that it doesn't as of the mid-November date of my latest build.

 -- IDL

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/45678: cdplay produces no sound
Date: Sun, 4 Dec 2011 15:10:16 -0500

 On Sun,  4 Dec 2011 19:40:04 +0000 (UTC)
 "Ian D. Leroux" <idleroux@fastmail.fm> wrote:

 >  > cdplay uses analog output mode by default, which is unfortunately not
 >  > a good choice for anything remotely modern. In analog mode cdplay
 >  > tells the disc drive to start playing, and relies on a pass-through
 >  > audio cable from the CD-ROM device to a capture port on the sound
 >  > card, and the sound card redirecting that output to your speakers. On
 >  > newer systems, you want to simply read PCM data from the CD-ROM
 >  > device and play it to the sound card's PCM playback port. cdplay
 >  > supports this with the "digital" command, see
 >  > http://netbsd.gw.com/cgi-bin/man-cgi?cdplay++NetBSD-current
 >  
 >  The digital command does indeed let me hear the CD being played, thank
 >  you.  Analog mode did, however, formerly work on this machine, so I
 >  would argue that its failure to do so with recent -current is still a
 >  regression, unless analog mode has been officially deprecated.  I don't
 >  rebuild my base system often enough to be sure of when it stopped
 >  working, but I believe it was still working at the end of July and
 >  know that it doesn't as of the mid-November date of my latest build.

 If so, I suspect the change was in the audio driver, where an input
 channel is now muted, has low volume or analog passthrough is
 unsupported.  I see various ~2 months old changes in
 sys/dev/pci/hdaudio/hdafg.c which could possibly be related...
 -- 
 Matt

From: "Ian D. Leroux" <idleroux@fastmail.fm>
To: gnats-bugs@NetBSD.org
Cc: Matthew Mondor <mm_lists@pulsar-zone.net>, gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: bin/45678: cdplay produces no sound
Date: Wed, 14 Dec 2011 20:16:38 +0100

 Quoting Matthew Mondor <mm_lists@pulsar-zone.net> (Sun,  4 Dec 2011
 20:15:04 +0000 (UTC)):
 >  On Sun,  4 Dec 2011 19:40:04 +0000 (UTC)
 >  "Ian D. Leroux" <idleroux@fastmail.fm> wrote:
 >  >  The digital command does indeed let me hear the CD being played,
 >  > thank you.  Analog mode did, however, formerly work on this
 >  > machine, so I would argue that its failure to do so with recent
 >  > -current is still a regression, unless analog mode has been
 >  > officially deprecated.  I don't rebuild my base system often
 >  > enough to be sure of when it stopped working, but I believe it was
 >  > still working at the end of July and know that it doesn't as of
 >  > the mid-November date of my latest build.
 >  
 >  If so, I suspect the change was in the audio driver, where an input
 >  channel is now muted, has low volume or analog passthrough is
 >  unsupported.  I see various ~2 months old changes in
 >  sys/dev/pci/hdaudio/hdafg.c which could possibly be related...

 I had a quick look through those, and tried manually undoing
 the change made in revision 1.15 (which sets the stream mode to PCM by
 default), without any success so far (i.e. digital mode works, the
 default analog mode does not).  If no one has any better ideas, I'll
 try building kernels from various times in the last few months and see
 if I can narrow down the range of possibly responsible commits, but it
 might be a little while before I have time to do that.

 A question though; if, as Jared McNeill seemed to imply earlier, analog
 mode is considered obsolete, do we invest effort in continuing to
 maintain it or should digital mode be made the default?

 -- IDL

From: "Ian D. Leroux" <idleroux@fastmail.fm>
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/45678: cdplay produces no sound
Date: Sun, 18 Dec 2011 13:30:20 +0100

 On Sun, Dec 4, 2011, at 20:15, Matthew Mondor wrote:
 >  On Sun,  4 Dec 2011 19:40:04 +0000 (UTC) "Ian D. Leroux"
 >  <idleroux@fastmail.fm> wrote:
 >  >   Analog mode did, however, formerly work on this machine, so I
 >  >   would argue that its failure to do so with recent -current is
 >  >   still a regression, unless analog mode has been officially
 >  >   deprecated.
 >
 >  If so, I suspect the change was in the audio driver, where an input
 >  channel is now muted, has low volume or analog passthrough is
 >  unsupported.  I see various ~2 months old changes in
 >  sys/dev/pci/hdaudio/hdafg.c which could possibly be related...

 It looks like I may have to eat my words on this one.  I've just built
 and tested kernels with sources from various times this year, going back
 to March 10th (which is about as far back as I've had NetBSD on this
 laptop), and with none of them does cdplay (built mid-November) play in
 analogue mode.  That means:
 - Maybe it never worked on this machine and I was just remembering it
   working on different hardware.
 - Maybe it used to work, but the change was not in the kernel sources.
   Perhaps I inadvertantly changed something in my configuration.  In
   principle it could also be a change in the userland, but I don't see
   any suspicious changes to cdplay.c in that time window, and mixerctl
   hasn't been changed at all in the last year.

 Either way, I can't point to a definite regression in the project
 sources, so this PR should probably be closed.  Sorry for the noise.

 Meanwhile, it seems there has been some work on making cdplay fall back
 to digital mode automatically if needed.  I'll try updating to after
 those changes and see if that makes cdplay Just Work.

 Thanks for the feedback.

 -- IDL

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.