ALSA SPDIF IEC958 output no longer bit perfect (regression)

Bug #358118 reported by larson.eric.d@gmail.com
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Expired
Medium
Unassigned

Bug Description

My Intel HDA Audio chipset no longer provides bit-perfect output. When I follow the ALSA bit perfect testing instructions ("Testing Your Setup" at http://alsa.opensrc.org/index.php/DigitalOut) and play the dts-encoded Norrlanda.wav using aplay, I get white noise instead of properly decoded SPDIF output. In Hardy/Intrepid, I had bit-perfect output, as my A/V receiver would switch to surround decoding mode and play sound instead of white noise when I played DTS-encoded .wav files in Amarok.

Running Jaunty 9.04 beta, 64-bit
alsa-base version 1.0.18.dfsg-1ubuntu7 0

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: alsa-base 1.0.18.dfsg-1ubuntu7
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: alsa-driver
Uname: Linux 2.6.28-11-generic x86_64
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.22.1.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: edlarson 3479 F.... pulseaudio
 /dev/snd/controlC0: edlarson 3479 F.... pulseaudio
 /dev/snd/pcmC0D1p: edlarson 3479 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfe020000 irq 32'
   Mixer name : 'Analog Devices AD1984'
   Components : 'HDA:11d41984,17aa20d7,00100400'
   Controls : 30
   Simple ctrls : 19
Card1.Amixer.info:
 Card hw:1 'HVR950Q'/'Hauppauge HVR-950Q at usb-0000:00:1a.7-3, high speed'
   Mixer name : 'USB Mixer'
   Components : 'USB2040:7200'
   Controls : 1
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Digital In',0
   Capabilities: cswitch cswitch-joined penum
   Capture channels: Mono
   Mono: Capture [on]
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 7KHT24WW-1.08'
   Mixer name : 'ThinkPad EC 7KHT24WW-1.08'
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
Package: alsa-driver (not installed)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
Tags: lucid
Uname: Linux 2.6.34-020634rc5-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin mythtv plugdev sambashare
dmi.bios.date: 11/14/2008
dmi.bios.vendor: LENOVO
dmi.bios.version: 7LETC5WW (2.25 )
dmi.board.name: 7732CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7LETC5WW(2.25):bd11/14/2008:svnLENOVO:pn7732CTO:pvrThinkPadR61:rvnLENOVO:rn7732CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 7732CTO
dmi.product.version: ThinkPad R61
dmi.sys.vendor: LENOVO

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote :
Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote :

Also, using the test sample "ac3_the_other_side_48khz.wav" from http://www.kellyindustries.com/sounds.html, I can get bit-perfect output using the following command:

mplayer ac3_the_other_side_48khz.wav -ac hwac3 -ao alsa

If I play any of the 44.1kHz files, I do not get bit-perfect output, and only hear noise from my AV receiver.

Interestingly, if I tell mplayer to use "-ao alsa:device=iec958" it works, but if I tell mplayer to use "-ao alsa:device=hw0.1" (the digital output), it outputs noise.

I still can't get any 44.1Khz DTS or AC3 files to play bit-perfectly, though.

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote :

More evidence toward this being a strange ALSA driver issue.

If I get a 44.1kHz DTS (or 44.1 Dolby Digital) file playing using "aplay" or "listen" music player, it outputs noise. If I then type "iecset audio 0" to give the SPDIF out the correct headers, it goes silent. If I then mute/unmute the main volume control in alsamixer (!!!) my receiver decodes the stream properly, indicating that the output is bit-perfect.

So the way to get bit-perfect output is to mute/unmute the main volume control /after/ sound is playing. Hopefully someone can confirm this one...

Revision history for this message
Brad Figg (brad-figg) wrote :

The latest development release of Ubuntu is entering Beta. Please
consider taking the time to download the latest live-image from
http://cdimage.ubuntu.com/releases/lucid and see if this issue still
exists.

If the issue does still exist; in a terminal (Applications->Accessories->Terminal)
please execute the following command:
    apport-collect -p alsa-driver 358118

tags: added: spdif
Changed in alsa-driver (Ubuntu):
status: New → Incomplete
Brad Figg (brad-figg)
tags: added: jaunty
Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : AlsaDevices.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : AplayDevices.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : ArecordDevices.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : BootDmesg.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : CurrentDmesg.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : PciMultimedia.txt

apport information

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

 Thanks for testing this in Lucid and attaching the files. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in alsa-driver (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
tomeq_ (t-glowacki) wrote :

Ok, I did the tests you have proposed and I'm having the same issue here. mplayer works for 48khz ac3 file you've provided but only for -ao alsa:device=iec958, giving device=hw=0.1 gives noise.

What is interesting - doing tests which cause a noise (with hw=0.1) , will make device=iec958 method fail too. Only alsa force-reload will bring back proper behavior.

44khz files gives noise. VLC set up to use ALSA hw0,1 fails for both files, I'm having noise.
same with aplay -D hw:0,1

tomek@hardc0re:~$ cat /etc/issue
Ubuntu 10.10 \n \l

tomek@hardc0re:~$ aplay -l
**** Lista PLAYBACK urządzeń ****
karta 0: Intel [HDA Intel], urządzenie 0: AD198x Analog [AD198x Analog]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0
karta 0: Intel [HDA Intel], urządzenie 1: AD198x Digital [AD198x Digital]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0

tomek@hardc0re:~$ uname -a
Linux hardc0re 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux
tomek@hardc0re:~$ dpkg -l alsa-base
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Nazwa Wersja Opis
+++-==============-==============-============================================
ii alsa-base 1.0.23+dfsg-1u ALSA driver configuration files
tomek@hardc0re:~$

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 358118] Re: ALSA SPDIF IEC958 output no longer bit perfect (regression)

Upon recommendation from the alsa developers, you should only use the
plug (wrapped) device, so iec958 is correct whereas hw=0.1 is not.
Regarding the symptom of only having noise after using hw=0.1, you
probably need to use iecset to reset the configuration.

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote :

It might be worth checking to see if the need to reset is somehow related to another bug I've filed (https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361) which has to do with playback issues under the same sound configuration.

Revision history for this message
tomeq_ (t-glowacki) wrote :

Daniel: It's ok, but as far as I know, most of alsa-enabled applications don't use or are not aware of "plug" (like VLC or other). This is apparently a problem that cause most of apps not to work at all.

Changed in alsa-driver (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

please do not change the status without knowing the effect and commenting on the status change. Moving the status to "Incomplete", you are telling the developers "Please wait for the rest of the information before you look at this bug." Please see https://wiki.ubuntu.com/Bugs/Status for the correct status.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for alsa-driver (Ubuntu) because there has been no activity for 60 days.]

Changed in alsa-driver (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.