Skip to contentSkip to conversation

: SPDIF sound distorted on non-48000 rates

ALSA - driver 0000505 [email protected] 1 participant 1 message Sep 23, 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=0000505
======================================================================
Reported By: ramendik
Assigned To:
======================================================================

Project:                    ALSA - driver
Bug ID:                     505
Category:                   PCI - intel8x0
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Distribution:               RH-based
Kernel Version:             2.6.8.1
======================================================================
Date Submitted:             09-19-2004 10:03 CEST
Last Modified:              09-23-2004 22:16 CEST

======================================================================
Summary: SPDIF sound distorted on non-48000 rates
Description:
I have an Intel ICH AC97 sound subsystem, on an Intel i865 motherboard(ASUS P4P800). It has an analog output and an SPDIF output.When I play 48Khz files, thinks are OK on all outputs. But when I play 44.1 Khz files, the sound on the SPDIF output is audibly distorted. The analog output is OK.

I am using the 2.6.8.1 kernel, and tried both the ALSA inside it (1.0.4) and newer alsa-driver 1.0.7rc1. This same problem shows up with 2.6.6 and 2.6.7 kernels. So apparently it's present across several versons of ALSA.

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

----------------------------------------------------------------------
tiwai - 09-23-2004 18:37 CEST
----------------------------------------------------------------------
Which ac97 codec? Please attach /proc/asound/card0/codec97#0/* files. Also, check the IEC958 status bits (run iecset) during playback of 44.1kHz samples.

----------------------------------------------------------------------
ramendik - 09-23-2004 19:50 CEST
----------------------------------------------------------------------
Well, iecset showed 48000 Hz during the playback of 44100 Hz samples. So apparently this is the bug. Here is the full result:

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

----------------------------------------------------------------------
ramendik - 09-23-2004 19:52 CEST
----------------------------------------------------------------------
I have uploaded both files from /proc/asound/card0/codec97#0/ .

----------------------------------------------------------------------
ramendik - 09-23-2004 19:58 CEST
----------------------------------------------------------------------
BTW, "iecset rate 44100" does make things better on 44100 Hz - but breaks them on 48000.

----------------------------------------------------------------------
tiwai - 09-23-2004 20:06 CEST
----------------------------------------------------------------------
How about the attached patch (it's already applied to CVS).

----------------------------------------------------------------------
ramendik - 09-23-2004 22:16 CEST
----------------------------------------------------------------------
Unfortunately the patch did NOT help. The distortion is in place, and when a 44100 Hz file is played (using mplayer), iecset still shows a 48000 Hz sample rate.

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

09-19-04 10:03 ramendik       New Bug                                      
09-19-04 10:03 ramendik       Distribution              => RH-based        
09-19-04 10:03 ramendik       Kernel Version            => 2.6.8.1         
09-19-04 10:05 ramendik       Bug Monitored: ramendik                      
09-23-04 18:37 tiwai          Bugnote Added: 0001831                       
09-23-04 19:50 ramendik       Bugnote Added: 0001839                       
09-23-04 19:51 ramendik       File Added: ac97#0-0                         
09-23-04 19:52 ramendik       File Added: ac97#0-0+regs                    
09-23-04 19:52 ramendik       Bugnote Added: 0001843                       
09-23-04 19:58 ramendik       Bugnote Added: 0001845                       
09-23-04 20:06 tiwai          Bugnote Added: 0001846                       
09-23-04 20:06 tiwai          File Added: intel-spdif-fix.dif                    
09-23-04 22:16 ramendik       Bugnote Added: 0001852                       

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

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php