Skip to contentSkip to conversation

: spdif output fails with atiixp

ALSA - driver 0000238 [email protected] 1 participant 1 message Aug 27, 2004

lore
Share & tools
lore
#0 lore raw

A BUGNOTE has been added to this bug.
======================================================================
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000238
======================================================================

Reported By:                pkashou
Assigned To:                tiwai
======================================================================
Project:                    ALSA - driver
Bug ID:                     238
Category:                   PCI - atiixp
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Distribution:               Gentoo
Kernel Version:             gentoo-dev-sources 2.6.5 (running cvs alsa in kernel)
======================================================================
Date Submitted:             04-27-2004 03:54 CEST
Last Modified:              08-27-2004 13:50 CEST

======================================================================
Summary: spdif output fails with atiixp
Description:
When running ALSA 1.0.4rc2 included in 2.6.5 kernel, spdif output was intermittant, almost complete static. Updating kernel alsa to latest cvs caused spdif output to stop completely.

dmesg reports no errors. Everything appears configured, but there is zero output on the spdif line - no light through wire.

Quoted 1 line

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
Subdevices: 1/1
Subdevice https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000000: subdevice https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000000
card 0: IXP [ATI IXP], device 1: ATI IXP IEC958 [ATI IXP IEC958]
Subdevices: 1/1
Subdevice https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000000: subdevice https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000000

Quoted 1 line

cat /proc/asound/devices

1: : sequencer
0: [0- 0]: ctl
17: [0- 1]: digital audio playback
16: [0- 0]: digital audio playback
24: [0- 0]: digital audio capture
33: : timer

Quoted 1 line

aplay -D hw:0,1 <whatever>.wav returns:

Playing WAVE 'audiodump.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz) please, try the plug plugin (-Dplug:hw:0,1)

Analog output is working correctly.

More info and logs on request.
======================================================================

----------------------------------------------------------------------
tiwai - 04-27-2004 12:29 CEST
----------------------------------------------------------------------
did you set correct IEC958 status bits?
you need either to pass parameters of iec958 plugin or set statically via iecset program.

also, show the contents of AC97 codec and register dump in /proc/asound/card0/codec97#0/*.

----------------------------------------------------------------------
pkashou - 04-27-2004 13:41 CEST
----------------------------------------------------------------------
I have not set the bits manually, but they are set.

Quoted 1 line

iecset -x

AES0=0x00,AES1=0x82,AES2=0x00,AES3=0x02

Quoted 1 line

iecset -Dhw:0

Mode: consumer
Data: audio
Rate: 48000 Hz
Copyright: protected
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm

Quoted 1 line

cat /proc/asound/card0/codec97#0/*

0-0/0: Realtek ALC650 rev 3

Capabilities     :
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : Realtek 3D Stereo Enhancement

Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off

3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1

ADC/DAC loopback : off
Extended ID : codec=0 rev=1 LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status : LDAC SDAC CDAC SPDIF=3/4 SPDIF VRA
PCM front DAC : 44100Hz
PCM Surr DAC : 44100Hz
PCM LFE DAC : 44100Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Category=0x2 Generation=1 Rate=48kHz
SPDIF In Status : Not Locked
0:00 = 5980
0:02 = 0808
0:04 = 0000
0:06 = 0008
0:08 = 0000
0:0a = 8008
0:0c = 801f
0:0e = 801f
0:10 = 1f1f
0:12 = 9f1f
0:14 = 1f1f
0:16 = 8808
0:18 = 0808
0:1a = 0404
0:1c = 8b0b
0:1e = 0000
0:20 = 0000
0:22 = 0002
0:24 = 0000
0:26 = 800f
0:28 = 05c7
0:2a = 01c5
0:2c = ac44
0:2e = ac44
0:30 = ac44
0:32 = bb80
0:34 = 0000
0:36 = 0808
0:38 = 0808
0:3a = 2824
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0000
0:5e = 0000
0:60 = 0000
0:62 = 8000
0:64 = 0808
0:66 = 0808
0:68 = 0000
0:6a = 1000
0:6c = 0000
0:6e = 0025
0:70 = 0231
0:72 = 00a0
0:74 = 0043
0:76 = 0001
0:78 = 8102
0:7a = 57c3
0:7c = 414c
0:7e = 4720

----------------------------------------------------------------------
pkashou - 04-28-2004 02:32 CEST
----------------------------------------------------------------------
Uploaded my asound.state in case something strange was going on there.

----------------------------------------------------------------------
tiwai - 04-30-2004 11:34 CEST
----------------------------------------------------------------------
the status seems ok.

could you try iec958 PCM name instead of hw:0,1?
or, try 'ac3dec -C something.ac3'.

----------------------------------------------------------------------
pkashou - 05-01-2004 01:02 CEST
----------------------------------------------------------------------
Same result, no sound...no light at all with:

Quoted 1 line

ac3dec -C test.ac3

Using PCM device 'plug:iec958:{AES0 0x2 AES1 0x82 AES2 0x0 AES3 0x2}' AC3 Stream 48.0 KHz 448 kbps

I did notice that 'AES0' does not have the same value in ac3dec as from 'iecset -x'
Could there be a connection?

And 'aplay -D iec958 test.wav' did not have light/sound either.

edited on: 05-01-04 01:00

edited on: 05-01-04 01:02

----------------------------------------------------------------------
tiwai - 05-01-2004 10:33 CEST
----------------------------------------------------------------------
to be sure: did you update alsa-lib, too?

----------------------------------------------------------------------
pkashou - 05-01-2004 21:17 CEST
----------------------------------------------------------------------
Well...I had a long, in-depth note about what I did and what happened and the ALSA bug system decided to crash. So..here it is again.

Yes I did have alsa-lib CVS installed.

I just downgraded my kernel to 1.0.4 and alsa-lib to 1.0.4. After rebuild/restart I now get light and static with "aplay -D hw:0,1 test.wav". ac3dec now actually puts light on the line, but it plays an entire ac3 song in less than a second, so I can't tell what the ouput is (probably not good sound). Here are the new regs and iecset stuff for comparison.

Quoted 1 line

iecset -x

AES0=0x00,AES1=0x82,AES2=0x00,AES3=0x00

Quoted 1 line

iecset -Dhw:0

Mode: consumer
Data: audio
Rate: 44100 Hz
Copyright: protected
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm

Quoted 1 line

cat /proc/asound/card0/codec97#0/*

0-0/0: Realtek ALC650 rev 3

Capabilities     :
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : Realtek 3D Stereo Enhancement

Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off

3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1

ADC/DAC loopback : off
Extended ID : codec=0 rev=1 LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status : LDAC SDAC CDAC SPDIF=3/4 SPDIF VRA
PCM front DAC : 48000Hz
PCM Surr DAC : 48000Hz
PCM LFE DAC : 48000Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Category=0x2 Generation=1 Rate=44.1kHz
SPDIF In Status : Not Locked
0:00 = 5980
0:02 = 0808
0:04 = 0000
0:06 = 0008
0:08 = 0000
0:0a = 800a
0:0c = 801f
0:0e = 801f
0:10 = 1f1f
0:12 = 9f1f
0:14 = 1f1f
0:16 = 8808
0:18 = 0808
0:1a = 0404
0:1c = 8b0b
0:1e = 0000
0:20 = 0000
0:22 = 0002
0:24 = 0000
0:26 = 000f
0:28 = 05c7
0:2a = 01c5
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = 0000
0:36 = 0808
0:38 = 0808
0:3a = 0824
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0000
0:5e = 0000
0:60 = 0000
0:62 = 8000
0:64 = 0808
0:66 = 0808
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0025
0:70 = 0231
0:72 = 00a0
0:74 = 0043
0:76 = 0001
0:78 = 8102
0:7a = 57c3
0:7c = 414c
0:7e = 4720

----------------------------------------------------------------------
pkashou - 05-24-2004 15:02 CEST
----------------------------------------------------------------------
Any sort of status update available?

I saw that there was some experimental code added to CVS, but I have not tested it. Are you waiting to do further testing?

Thanks.

----------------------------------------------------------------------
pkashou - 06-12-2004 16:41 CEST
----------------------------------------------------------------------
Just tried out the latest CVS kernel and lib and still no sound or light on iec958. Any ideas as to why only ALSA 1.0.4 works? If I change nothing else on my system but the ALSA version, I get static with 1.0.4 and 1.0.4r2 and no output with later versions.

----------------------------------------------------------------------
tiwai - 06-30-2004 16:32 CEST
----------------------------------------------------------------------
You may try spdif_aclink=1 module option. With this mode, atiixp driver uses the (so-called) direct-SPDIF mode. I got reports that this mode works on some boards.

This may not work well with non-audio (AC3) output, though...

----------------------------------------------------------------------
pkashou - 08-27-2004 13:50 CEST
----------------------------------------------------------------------
Apologies for the long delay.

What you suggested did not work. I will be rebuilding the machine this weekend and will attempt IEC958 output with alsa 1.0.6

Bug History
Date Modified Username Field Change
======================================================================

04-27-04 03:54 pkashou        New Bug                                      
04-27-04 03:54 pkashou        Distribution              => Gentoo          
04-27-04 03:54 pkashou        Kernel Version            => gentoo-dev-sources 2.6.5 (running cvs alsa in kernel)
04-27-04 12:29 tiwai          Bugnote Added: 0000960                       
04-27-04 13:41 pkashou        Bugnote Added: 0000961                       
04-28-04 02:31 pkashou        File Added: asound.state                     
04-28-04 02:32 pkashou        Bugnote Added: 0000968                       
04-30-04 11:34 tiwai          Bugnote Added: 0000979                       
05-01-04 00:56 pkashou        Bugnote Added: 0000985                       
05-01-04 00:56 pkashou        Bugnote Edited: 0000985                      
05-01-04 01:00 pkashou        Bugnote Edited: 0000985                      
05-01-04 01:02 pkashou        Bugnote Edited: 0000985                      
05-01-04 10:33 tiwai          Bugnote Added: 0000993                       
05-01-04 21:17 pkashou        Bugnote Added: 0001001                       
05-24-04 15:02 pkashou        Bugnote Added: 0001185                       
06-12-04 16:41 pkashou        Bugnote Added: 0001301                       
06-30-04 16:32 tiwai          Bugnote Added: 0001356                       
08-27-04 13:50 pkashou        Bugnote Added: 0001642                       

======================================================================

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285