Bug 24342 - no sound on spdif
Summary: no sound on spdif
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-05 10:33 UTC by ciekawy
Modified: 2012-06-13 14:59 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.35.9-64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
this is alsa-info output for a kernel with working audio over spdif (33.17 KB, text/plain)
2010-12-12 12:08 UTC, ciekawy
Details
this is alsa-info output for a kernel with NOT working audio over spdif (36.01 KB, text/plain)
2010-12-12 12:16 UTC, ciekawy
Details
Test fix patch (428 bytes, patch)
2011-03-23 09:05 UTC, Takashi Iwai
Details | Diff

Description ciekawy 2010-12-05 10:33:55 UTC
the sound on spdif has gone between 2.6.35.6-45 and 2.6.35.9-64 -these are versions avaliable in fedora. so after booting to older kernel everything works well again.

there is nothing special in any log files. also my digital reciever shows pcm signal incoming during playback, however it wrongly shows 'pcm' input also when trying to play ac3/dts and in all cases there is no sound.

I am using intel hda chipset (currently have no possibility to check analog audio now)

card 0: Intel [HDA Intel], device 0: ALC889 Analog [ALC889 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC889 Digital [ALC889 Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
Comment 1 ciekawy 2010-12-05 14:45:38 UTC
interesting thing is that while the same problem affects kernel 2.6.36.1-1 from rawhide, I have found some custom build 2.6.36-1 here:

http://forums.fedoraforum.org/showthread.php?t=253319&highlight=kernel&page=2

with this one sound on spdif works for me again. I suppose then that this might be some configuration issue and/or some patch which is once apllied once not. but since there is no difference in logs it is hard to me to find the problem.

actually I am experiencing other problem with sound over nvidia hdmi so there are some log messages:

[   13.910905] ALSA sound/pci/hda/hda_intel.c:711: azx_get_response timeout, switching to polling mode: last cmd=0x100f0000
[   14.911299] ALSA sound/pci/hda/hda_intel.c:1424: Codec #1 probe error; disabling it...
[   15.919737] ALSA sound/pci/hda/hda_intel.c:1424: Codec #2 probe error; disabling it...
[   16.928181] ALSA sound/pci/hda/hda_intel.c:1424: Codec #3 probe error; disabling it...
[   16.967902] hda_codec: ALC889: BIOS auto-probing.
[   16.975568] HDA Intel 0000:01:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[   16.975571] hda_intel: codec_mask forced to 0xf2
[   19.988514] ALSA sound/pci/hda/hda_intel.c:711: azx_get_response timeout, switching to polling mode: last cmd=0x400f0000
[   20.990043] ALSA sound/pci/hda/hda_intel.c:1424: Codec #4 probe error; disabling it...
[   21.999400] ALSA sound/pci/hda/hda_intel.c:1424: Codec #5 probe error; disabling it...
[   23.008919] ALSA sound/pci/hda/hda_intel.c:1424: Codec #6 probe error; disabling it...
[   24.018342] ALSA sound/pci/hda/hda_intel.c:1424: Codec #7 probe error; disabling it...



however now the sound works with spdif and above messages sho they are not related.
Comment 2 Takashi Iwai 2010-12-06 09:51:20 UTC
At least, you can check alsa-info.sh outputs on both working and non-working kernels.

Possibly it's due to some IEC958 status bits.  Check the output of iecset in alsa-utils package.
Comment 3 ciekawy 2010-12-12 12:08:40 UTC
Created attachment 39912 [details]
this is alsa-info output for a kernel with working audio over spdif
Comment 4 ciekawy 2010-12-12 12:16:29 UTC
Created attachment 39922 [details]
this is alsa-info output for a kernel with NOT working audio over spdif

I have done a quick look into the diff between those two logs but have found nothing related to iec/spdif :(

bad thing is that I have this problem with all newer kernel builds.
Comment 5 ciekawy 2010-12-12 12:23:35 UTC
also missing sound related booting dmesg for working kernel (2.6.36-1):

 [    8.055480] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[    8.055566] HDA Intel 0000:00:1b.0: irq 47 for MSI/MSI-X
[    8.055585] HDA Intel 0000:00:1b.0: setting latency timer to 64
[    8.186640] ALSA sound/pci/hda/patch_realtek.c:1355: SKU: Nid=0x1d sku_cfg=0x4007f603
[    8.186643] ALSA sound/pci/hda/patch_realtek.c:1357: SKU: port_connectivity=0x1
[    8.186645] ALSA sound/pci/hda/patch_realtek.c:1358: SKU: enable_pcbeep=0x0
[    8.186647] ALSA sound/pci/hda/patch_realtek.c:1359: SKU: check_sum=0x00000007
[    8.186649] ALSA sound/pci/hda/patch_realtek.c:1360: SKU: customization=0x000000f6
[    8.186651] ALSA sound/pci/hda/patch_realtek.c:1361: SKU: external_amp=0x0
[    8.186652] ALSA sound/pci/hda/patch_realtek.c:1362: SKU: platform_type=0x0
[    8.186654] ALSA sound/pci/hda/patch_realtek.c:1363: SKU: swap=0x1
[    8.186656] ALSA sound/pci/hda/patch_realtek.c:1364: SKU: override=0x1
[    8.186732] hda_codec: ALC889: BIOS auto-probing.
[    8.186735] ALSA sound/pci/hda/hda_codec.c:4611: autoconfig: line_outs=4 (0x14/0x15/0x16/0x17/0x0)
[    8.186737] ALSA sound/pci/hda/hda_codec.c:4615:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    8.186740] ALSA sound/pci/hda/hda_codec.c:4619:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    8.186742] ALSA sound/pci/hda/hda_codec.c:4620:    mono: mono_out=0x0
[    8.186743] ALSA sound/pci/hda/hda_codec.c:4623:    dig-out=0x1e/0x0
[    8.186745] ALSA sound/pci/hda/hda_codec.c:4631:    inputs: mic=0x18, fmic=0x19, line=0x1a, fline=0x0, cd=0x0, aux=0x0
[    8.188258] ALSA sound/pci/hda/patch_realtek.c:1405: realtek: No valid SSID, checking pincfg 0x4007f603 for NID 0x1d
[    8.188260] ALSA sound/pci/hda/patch_realtek.c:1421: realtek: Enabling init ASM_ID=0xf603 CODEC_ID=10ec0889
[    8.194120] HDA Intel 0000:01:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[    8.194122] hda_intel: Disable MSI for Nvidia chipset
[    8.194199] HDA Intel 0000:01:00.1: setting latency timer to 64
Comment 6 ciekawy 2010-12-12 12:26:28 UTC
FYI this dmesg seems to be identical for working and non working kernel as well
Comment 7 Romain GUINOT 2010-12-24 00:20:49 UTC
I confirm this bug too. 
Fedora 14 : 2.6.35.6-48.fc14.x86_64

no sound will be output from the AV receiver connected via optical SPDIF to the desktop with any kernel newer than this one. 

I am using pulseaudio-0.9.21-7.fc14.x86_64 

aplay -l output : 

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC889 Analog [ALC889 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC889 Digital [ALC889 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 3: ATI HDMI [ATI HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


I am not using udev detect in pulse audio config, i have defined a static list of streams, i find it is easier to manage with custom names, such as : 

load-module module-alsa-sink device=spdif:0 sink_name=spdif


My motherboard is an asus rampage iii extreme. 

Let me know if/how i can help. 

Cheers,
Romain.
Comment 8 Romain GUINOT 2010-12-24 00:41:37 UTC
Output from iecset is exactly the same for working (2.6.35.6-48.fc14.x86_64) and non working (tested on /vmlinuz-2.6.35.9-64.fc14.x86_64 and /vmlinuz-2.6.35.10-72.fc14.x86_64) : 


romain@desktop:[/mnt/documents/iecset]$ iecset -c 0 
Mode: consumer
Data: audio
Rate: 44100 Hz
Copyright: permitted
Emphasis: none
Category: general
Original: 1st generation
Clock: 1000 ppm

romain@desktop:[/mnt/documents/iecset]$ iecset -c 0 -x
AES0=0x04,AES1=0x00,AES2=0x00,AES3=0x00


In my case this is a regression.
Comment 9 Ronny Buchmann 2011-03-12 10:26:41 UTC
I have the same problem, please see fedora bug 
https://bugzilla.redhat.com/show_bug.cgi?id=682480
Comment 10 ciekawy 2011-03-15 23:05:54 UTC
problem still exists with kernel-2.6.38-1.fc15.x86_64
Comment 11 Takashi Iwai 2011-03-18 15:55:21 UTC
What I need the exact condition that makes the difference.
Could you figure out how different sound/pci/hda/*.[ch] between working and non-working versions?
Comment 12 Takashi Iwai 2011-03-18 15:56:02 UTC
I mean between 2.6.35.6-45 and 2.6.35.9-64.
Comment 13 Ronny Buchmann 2011-03-19 21:05:02 UTC
http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.35.y.git;a=patch;h=5a8cfb4e8ae317d283f84122ed20faa069c5e0c4

I built snd-hda-codec-realtek on 2.6.35.11-84 with this patch reverted.
Both spdif and analog out is working (like in 2.6.34) then.
Comment 14 Takashi Iwai 2011-03-20 16:28:22 UTC
Could someone try to revert the commit in comment 13 whether it fixes the SPDIF problem on ALC888/ALC889?
Comment 15 ciekawy 2011-03-22 23:49:56 UTC
#13 works for me
Comment 16 Takashi Iwai 2011-03-23 09:04:36 UTC
The patch in comment 13 adds essentially two things in alc_auto_init_amp():
 1. set EAPD for NIDs 0x14/0x15
 2. call alc889_coef_init()

My guess is that 2 does something wrong.  Does the patch below instead of the revert patch work?
Comment 17 Takashi Iwai 2011-03-23 09:05:18 UTC
Created attachment 51692 [details]
Test fix patch
Comment 18 Ronny Buchmann 2011-03-23 20:14:31 UTC
patch in comment 17 works great!

with the reverted patch (comment 13) with analog output one channel (left? I'm not sure anymore) was not working, but I thought it was a cabling problem. Now I know it wasn't.

There i now only one little oddity:
The external amp is not unlocked after playing something via spdif.
I.e.
after "pasuspender -- mplayer -ao alsa:device=spdif -ac hwac3, ..."
it still shows AC3 signal, on "mplayer -ao pulse ..." (or any other output via PA) it switches to PCM.
Before (comment 13 or 2.6.34) the signal was off when nothing was output.
Comment 19 Florian Mickler 2011-03-28 23:48:50 UTC
A patch referencing this bug report has been merged in v2.6.38-8876-g036a982:

commit 20b67dddcc5f29d3d0c900225d85e0ac655bc69d
Author: Takashi Iwai <tiwai@suse.de>
Date:   Wed Mar 23 22:54:32 2011 +0100

    ALSA: hda - Fix SPDIF out regression on ALC889

Note You need to log in before you can comment on or make changes to this bug.