Hi,

I have a Gigabyte GA-7VA motherboard, equiped VIA KT400/VT8235 chipset
with an Athlon XP 1900+. Its AC97 codec is the Realtek ALC650, capable of
SPDIF in/out and 6-channel output.

My goal is to decode the AC-3 SPDIF signal from my DVD and to play it
using the PC. By using alsamixer for configuring the ALC650 to read
SPDIF in, and a simple spdifac3 program I did to extract AC-3
from SPDIF stream, I can almost get what I want:

arecord -f dat -t raw | spdifac3 | ac3dec -D sur51

The problem is that I get CRC frame errors. Here is a list of what I
already did:

1 - Install kernel 2.4.18 with 'Low latency' and 'Preempitve Kernel'
    patches. HZ = 100

2 - Install alsa 0.9.6. I modified the ALC650 code to enable
    'Extension register Write Enable' (GPIO Status:15), and to add
    different SPDIF input related controls.

3 - For testing purposes, create a ram disk to avoid IDE interrupts
    (/mnt/ramd)

4 - As root, I did a small program (setrtsched) where I set the schedule
    policy to SCHED_RR and schedule priority to 99. Then I also use nice
    to increase the priority:

    setrtsched nice -n -20 arecord -f dat -t raw -d 20 > /mnt/ramd/bitstream

5 - Tried increasing the buffer size to include several period_size
    interrupts.

After all this, I still loose data reading SPDIF. From time to time, I
loose 1 sample (4 bytes) which generates the 'CRC frame error' in ac3dec
and the umpleasant 'tak' in my speakers.

I would really appreciate if somebody give me some hint and/or
information. I attach below some information.

Thanks a lot

Alejandro

[EMAIL PROTECTED] linux-2.4.18]# /sbin/lsmod
Module                  Size  Used by    Tainted: P
nls_iso8859-1           3548   0  (autoclean)
nls_cp437               5148   0  (autoclean)
vfat                   12892   0  (autoclean)
fat                    39576   0  (autoclean) [vfat]
sr_mod                 17848   0  (autoclean)
snd-usb-audio          54304   0  (unused)
snd-via82xx            17248   0
snd-pcm                86240   0  [snd-usb-audio snd-via82xx]
snd-timer              20612   0  [snd-pcm]
snd-page-alloc         10260   0  [snd-via82xx snd-pcm]
snd-mpu401-uart         5456   0  [snd-via82xx]
snd-rawmidi            19584   0  [snd-usb-audio snd-mpu401-uart]
snd-seq-device          6220   0  [snd-rawmidi]
snd-ac97-codec         50680   0  [snd-via82xx]
snd                    44740   0  [snd-usb-audio snd-via82xx snd-pcm
snd-timer snd-mpu401-uart snd-rawmidi snd-seq-device snd-ac97-codec]
autofs                 13604   1  (autoclean)
adiusbadsl            103424   1
ipt_REJECT              3800  11  (autoclean)
ipt_MASQUERADE          2328   1  (autoclean)
iptable_nat            19864   1  (autoclean) [ipt_MASQUERADE]
ip_conntrack           21720   1  (autoclean) [ipt_MASQUERADE iptable_nat]
iptable_filter          2412   1  (autoclean)
ip_tables              14840   6  [ipt_REJECT ipt_MASQUERADE iptable_nat
iptable_filter]
ide-scsi               10384   0
scsi_mod              105892   2  [sr_mod ide-scsi]
ide-cd                 32884   0
cdrom                  33216   0  [sr_mod ide-cd]
audio                  44436   0
soundcore               6692   2  [snd audio]
mousedev                5556   1
keybdev                 2880   0  (unused)
hid                    21732   0  (unused)
input                   5760   0  [mousedev keybdev hid]
usb-uhci               26956   0  (unused)
usbcore                69024   1  [snd-usb-audio adiusbadsl audio hid usb-uhci]
ext3                   70752   2
jbd                    52400   2  [ext3]

[EMAIL PROTECTED] linux-2.4.18]# cat /proc/asound/V8235/ac97#0
0-0/0: Avance Logic ALC650 rev 0

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  : SPCV LDAC SDAC CDAC SPDIF=res SPDIF VRA
PCM front DAC    : 48000Hz
PCM Surr DAC     : 48000Hz
PCM LFE DAC      : 48000Hz
PCM ADC          : 48000Hz
SPDIF Control    : Consumer PCM Copyright Category=0x2 Generation=1 Rate=48kHz

[EMAIL PROTECTED] linux-2.4.18]# cat /proc/asound/V8235/ac97#0regs
0:00 = 5980
0:02 = 1111
0:04 = 0000
0:06 = 801f
0:08 = 0000
0:0a = 801e
0:0c = 801f
0:0e = 0008
0:10 = 9f1f
0:12 = 8707
0:14 = 9f1f
0:16 = 9f1f
0:18 = 1010
0:1a = 0000
0:1c = 0a0a
0:1e = 0000
0:20 = 0000
0:22 = 0003
0:24 = 0000
0:26 = 000f
0:28 = 05c7
0:2a = 05f5
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = 0000
0:36 = 0000
0:38 = 1010
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 = 1902
0:62 = 4200
0:64 = 0808
0:66 = 0808
0:68 = 0000
0:6a = 0800
0:6c = 0000
0:6e = 0014
0:70 = 0211
0:72 = 00a0
0:74 = 0043
0:76 = 0000
0:78 = 8003
0:7a = 57c7
0:7c = 414c
0:7e = 4720







-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to