atiixp alsa problems - playback skipping - spent two weeks on this - NEED YOUR HELP
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
atiixp alsa problems - playback skipping - spent two weeks on this - NEED YOUR HELP
Help please - have spent a couple of weeks on this - and the wife wants me to
get sky+ instead!..
I am trying to setup a mythtv installation in the lounge using a Shuttle
ST61G4 machine. (ATI RS300 + IXP150 chipset - Intel P4 3Gz)
Apart from trying and failing to get the fglrx driver working for the graphics
card and using the vesa for now - it's the sound problem that is the show
stopper.
mplayer playback skips around - giving xrun errors at the point of the
skipping (see below). Using oss emulation gives bigger skips but no
messages.
Note also - the startup messages in the syslogs.
I have run out of things to try and would really welcome some guidance - even
if you don't know how to solve - if you have a suggestion of something to try
- please let me know.
I have tried the following:-
1. Proved hardware is ok - working in Windoze XP
2. Recompiled kernal and installed alsa 1.0.6/7 and the latest 1.08 - all the
same
3. run mplayer with -nosound - and no skipping
4. tried other players - like xine - same problems
5. recompiled kernel for oss - but could not get support for the ixp hardware
6. turned off apm in kernel - same
7. played arround with many settings in bios for interupts etc - same
8. tried switching off hyperthreading and apci in bios - same
9. made deal with wife - if not running by next xmas - we'll get sky+ - !!
10. tried files local and nfs mounted - same
11. installed a different video card and switched off on board - same (but got
drivers working ok on this card)
12. removed the pvr350 card - same
am considering trying a different package of linux (red hat?) is this worth
it?
am considering ebay-ing the machine and getting an nvidea based one!
am curious that other people are not appearing to have these problems - what
am I doing wrong?
Looking forward to anyones suggestions
Thanks
D
------------------- syslog
Dec 28 20:21:33 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 0)
Dec 28 20:21:33 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 1c)
Dec 28 20:21:33 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 0)
Dec 28 20:21:33 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 1c)
-snip (repeats)
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 3c)
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 1c)
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:1964:
AC'97 1 does not respond - RESET
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:1972:
AC'97 1 access is not valid [0xffffffff], removing mixer.
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 0)
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 1c)
Dec 28 20:21:34 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 0)
-snip (repeats)
Dec 28 20:21:35 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/../alsa-kernel/pci/atiixp.c:458:
atiixp: codec read timeout (reg 1c)
Dec 28 20:21:35 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:1964:
AC'97 2 does not respond - RESET
Dec 28 20:21:35 larry kernel:
ALSA /export/tmp/Downloads/alsa/alsa-driver-1.0.7/kbuild/../pci/ac97/../../alsa-kernel/pci/ac97/ac97_codec.c:1972:
AC'97 2 access is not valid [0xffffffff], removing mixer.
Dec 28 20:21:35 larry alsa: succeeded
------------------- lscp -v
00:00.0 Host bridge: ATI Technologies Inc: Unknown device 5833 (rev 02)
Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer: Unknown device f361
Flags: bus master, 66Mhz, medium devsel, latency 64
Memory at e8000000 (32-bit, prefetchable) [size=32M]
Memory at ee003000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [a0] AGP version 3.0
01:05.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5834
(prog-if 00 [VGA])
Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer: Unknown device f361
Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 16
Memory at e0000000 (32-bit, prefetchable) [size=64M]
I/O ports at b000 [size=256]
Memory at ed000000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [58] AGP version 3.0
Capabilities: [50] Power Management version 2
02:05.0 RAID bus controller: Silicon Image, Inc. (formerly CMD Technology Inc)
SiI 3512 [SATALink/SATARaid] Serial ATA Controller (rev 01)
Subsystem: Silicon Image, Inc. (formerly CMD Technology Inc) SiI 3512
SATARaid Controller
Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 17
I/O ports at 9000 [size=8]
I/O ports at 9400 [size=4]
I/O ports at 9800 [size=8]
I/O ports at 9c00 [size=4]
I/O ports at a000 [size=16]
Memory at eb002000 (32-bit, non-prefetchable) [size=512]
Expansion ROM at <unassigned> [disabled] [size=512K]
Capabilities: [60] Power Management version 2
02:06.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)
Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer: Unknown device f361
Flags: bus master, fast devsel, latency 64, IRQ 18
Memory at eb000000 (32-bit, non-prefetchable) [size=8K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [40] Power Management version 2
02:07.0 Multimedia video controller: Internext Compression Inc iTVC15 MPEG-2
Encoder (rev 01)
Subsystem: Hauppauge computer works Inc. WinTV PVR-350
Flags: bus master, medium devsel, latency 64, IRQ 19
Memory at e4000000 (32-bit, prefetchable) [size=64M]
Capabilities: [44] Power Management version 2
02:0b.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller
(rev 80) (prog-if 10 [OHCI])
Subsystem: VIA Technologies, Inc. IEEE 1394 Host Controller
Flags: bus master, medium devsel, latency 64, IRQ 19
Memory at eb003000 (32-bit, non-prefetchable) [size=2K]
I/O ports at a400 [size=128]
Capabilities: [50] Power Management version 2
0 [IXP ]: ATIIXP - ATI IXP
ATI IXP rev 0 with ALC650F at 0xee005000, irq 18
------------------- /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.7.
Compiled on Dec 28 2004 for kernel 2.6.8.1-12mdkcustom (SMP).
------------------- mplayer -ao alsa film.avi
MPlayer 1.0pre5-3.4.1 (C) 2000-2004 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster 3302 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with
--disable-runtime-cpudetection.
Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/dmartin1/.mplayer/config
Reading /home/dmartin1/.mplayer/codecs.conf: Can't open
'/home/dmartin1/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 73 audio & 180 video codecs
Failed to open /dev/rtc: No such file or directory (it should be readable by
the user.)
Using usleep() timing
Can't open input config file /home/dmartin1/.mplayer/input.conf: No such file
or directory
Input config file /etc/mplayer/input.conf parsed: 53 binds
Can't init input joystick
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : No such file or directory
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing Buffy - 4x11 - Doomed.avi.
Cache fill: 0.00% (0 bytes) AVI file format detected.
VIDEO: [DIVX] 640x464 24bpp 23.976 fps 1106.2 kbps (135.0 kbyte/s)
Clip info:
Software: VirtualDubMod 1.5.4.1 (build 2066/release)
==========================================================================
Trying to force audio codec driver family libmad...
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 16000->192000 (128.0 kbit)
Selected audio codec: [mad] afm:libmad (libMAD MPEG layer 1-2-3)
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0" => local display)
It seems there is no Xvideo support for your video card available.
Run 'xvinfo' to verify its Xv support and read DOCS/HTML/en/devices.html#xv!
See 'mplayer -vo help' for other (non-xv) video out drivers. Try -vo x11
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: default
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 640 x 464 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.38:1 - prescaling to correct movie aspect.
VO: [x11] 640x464 => 640x464 Planar YV12 [zoom]
SwScaler: using unscaled Planar YV12 -> BGR 32-bit special converter
alsa-space: xrun of at least 8.836 msecs. resetting stream
alsa-space: xrun of at least 3.981 msecs. resetting stream
alsa-space: xrun of at least 7.850 msecs. resetting stream
OK, I don't really know for sure, but since you asked for it anyway, these parts look suspicious to me:
Code:
MPlayer 1.0pre5-3.4.1 (C) 2000-2004 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster 3302 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with
--disable-runtime-cpudetection.Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/dmartin1/.mplayer/config
Reading /home/dmartin1/.mplayer/codecs.conf: Can't open
'/home/dmartin1/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 73 audio & 180 video codecsFailed to open /dev/rtc: No such file or directory (it should be readable by
the user.)
Using usleep() timing
Last edited by Brain Drop; 12-29-2004 at 07:18 PM.
Ok - thanks for the post - some things to try - but felt mplayer was not the place to start as the problems also occur in other media players - but none the less - only a fool would ignore a suggestion from someone trying to help!..
The reason for the first message that you highlighted was that I was using the stock build of mplayer than came with the Mandrake 10.1 distro - which is obviously compiled for no specific cpu - I recompiled the latest - and got rid of this message - same problems with alsa sound skips though
As for the RTC - maybe this is a clue to my problems - I can't seem to get it to work..
I added the module (modprobe rtc) and now I have an rtc device (/dev/rtc) and an entry in the proc tree as well.
Running mplayer now gives:-
Code:
-snip-
Linux RTC init error in ioctl (rts_irqp_set 1024): Inappropriate ioctl for device
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Playing film.avi
-snip-
There are no errors in the syslogs - and I can't google up an answer to why my rtc does not appear to work - any ides?
I obviously tried the suggested echo - and can cat from /proc/sys/dev/rtc/max-user-freq - and it does read 1024
Well then , sorry to side track you, but it is always better to compilr your own source with regard to mplayer anyway, so it was a good step to do. Googling, it seems the rtc output is rather common so probably not the thing either.
What is your lsmod output?
Interestingly - I still have probems with the rtc device - having compiled rtc into the kernel this time - wonder why?
from mplayer:-
Code:
Linux RTC init error in ioctl (rtc_irqp_set 1024): Inappropriate ioctl for device
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Using usleep() timing
from syslogs:-
Code:
Dec 30 17:54:44 larry kernel: fb0: VESA VGA frame buffer device
Dec 30 17:54:44 larry kernel: isapnp: Scanning for PnP cards...
Dec 30 17:54:44 larry kernel: isapnp: No Plug & Play device found
Dec 30 17:54:44 larry kernel: Real Time Clock Driver v1.12
Dec 30 17:54:44 larry kernel: serio: i8042 AUX port at 0x60,0x64 irq 12
Dec 30 17:54:44 larry kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Dec 30 17:54:44 larry kernel: Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
from proc tree:-
Code:
[root@larry root]# cd /proc/sys/dev/r
raid rtc
[root@larry root]# cd /proc/sys/dev/rtc/
[root@larry rtc]# ls
max-user-freq
[root@larry rtc]# cat max-user-freq
1024
[root@larry rtc]#
in /dev:-
Code:
[root@larry rtc]# ls -lrt /dev/rtc
crw-rw---- 1 dmartin1 video 10, 135 Dec 30 17:54 /dev/rtc
As a last resort, you can rebuild the driver and tell it to send debug information to /var/log/messages. Go to the driver-directory with cd /usr/src/alsa-driver-.... and type:
./configure --with-debug=detect; make clean; make
Remove the driver (as far as it is active, see below for a general remove statement). Then use the "modprobe" statement you used before to insert the newly compiled driver. Look in /var/log/messages if there are any messages.
7.11 Tip: removing all modules
Removing 10+ modules one by one is not the way to go. Luckily, all modules start with the "snd-" prefix, so a little command line programming will do. You can easily remove ALSA sound by issuing a command like:
Juergen Kahrs wrote: ``I have a script that also removes soundcore and soundlow and sound if present and if they are not in use. This script processes /proc/modules three times so there should not be too many modules left after processing''. His solution is
Please note: if some module is dependent on another module you cannot just remove the "higher" one. This means that you might need to issue a second removal statement. (I never encountered this situation though, it seems that you can remove the ALSA modules in the order they appear in /proc/modules).
Seems appropriate because it has the words 'last resort' in it.
Not that giving up is ever really an option, but hope and frustration like to hear 'last resort'.
Last edited by Brain Drop; 12-30-2004 at 12:44 PM.
Well - I found out why the /dev/rtc was not working - I had to recompile the kernel with CONFIG_HPET_EMULATE_RTC not set.
The log output of mplayer is cleaner now - no cpu detection warning, and no rtc warning - it is using the hardware for timing - it's just a shame I still have the same alsa skipping problems!!..
The thing that amazes me the most is that I seem to be the only one having problems with a Shuttle ST61G4! If it did not work perfectly in Windoze I would think I had a duff!
You aren't the only one by far with these problems. If you search for 'prebuffering pause' in the mythtv forum you'll see that you are not alone. I'm suffering the same problem with a Asus Pundit-R which has the same chipset. The problem is 'as far as I know' in the snd-atiixp driver where something in the timing is terribly wrong, video and audio can't be synchronized. I 'googled' this site while I thought I had read something about disabling OHCI-HCD as a work-around, but haven't found it yet.
Originally posted by damartin Well - I found out why the /dev/rtc was not working - I had to recompile the kernel with CONFIG_HPET_EMULATE_RTC not set.
The log output of mplayer is cleaner now - no cpu detection warning, and no rtc warning - it is using the hardware for timing - it's just a shame I still have the same alsa skipping problems!!..
The thing that amazes me the most is that I seem to be the only one having problems with a Shuttle ST61G4! If it did not work perfectly in Windoze I would think I had a duff!
You're not the only one... I have the same ST61G4 and I've been struggling with this exact "audio skipping" problem for about 10 months now. I use the box as my primary Myth box and the skips occur in all the possible media players (Real, Mplayer, Xine, Myth). On some Myth versions the skips are rather small, but it has never been totally clean.
This is really annoying and would also appreciate any help! I've gone the same path - tweak mplayer configuration, RTC, but nothing has cleaned this problem. It must be something fundemental - e.g. atiixp, as the same problem appears on all the media players.
Ok - so now we need to hear from anyone with an ST61G4 that does not have this problem and work out there difference - or we both need to go and get other hardware!.
Do you also get the errors in syslogs on startup?
Thanks so much for the post. What have you done with this machine then - I have setup mine up with Myth TV - using a PVR350 - using the TV Out of this card and the audio of this card (no skipping problems). If you are interested - this is a solution to the problem (well - work around) if you are just interested in recording and playback - I, however, want to watch a movies from - ah hmm - other sources.
I am working on trying to get the audio to work from this card from something like mplayer (I have the ivtv patched mplayer) but no audio at all at this stage.
How did you get on with the tv out of this machine - could not get mine to react as documented - really wanted the tv to work at the same time as the monitor out - and never managed it - and could only get the monitor out to work without "snow" on it by having the tv out plugged in.
Originally posted by damartin Ok - so now we need to hear from anyone with an ST61G4 that does not have this problem and work out there difference - or we both need to go and get other hardware!.
Do you also get the errors in syslogs on startup?
I don't get any errors in syslogs, just the symptoms (Gentoo Linux with 2.6.9 kernel and 1.0.8rc2 Alsa driver). I've actually tried for the last ~hour to get some meaningful debug messages out of alsa, but is suspeciously quiet:
Jan 9 16:51:32 tux ATIIXP: IDE controller at PCI slot 0000:00:14.1
Jan 9 16:51:32 tux ATIIXP: chipset revision 0
Jan 9 16:51:32 tux ATIIXP: not 100% native mode: will probe irqs later
Quote:
Thanks so much for the post. What have you done with this machine then - I have setup mine up with Myth TV - using a PVR350 - using the TV Out of this card and the audio of this card (no skipping problems). If you are interested - this is a solution to the problem (well - work around) if you are just interested in recording and playback - I, however, want to watch a movies from - ah hmm - other sources.
I am working on trying to get the audio to work from this card from something like mplayer (I have the ivtv patched mplayer) but no audio at all at this stage.
How did you get on with the tv out of this machine - could not get mine to react as documented - really wanted the tv to work at the same time as the monitor out - and never managed it - and could only get the monitor out to work without "snow" on it by having the tv out plugged in.
Interested in your story - Cheers
D
I have a cheap Geforce MX 440 for the TV-out (no luck with the onboard ATI IGP and fglrx, NVidia was much easier to get up and running) as well as PVR-250 for the TV recording. Skipping seems to depend greatly on the MythTv version I'm using. Some of the Myth CVS builds run reasonably well with minimum skips and sometimes the audio/video gets totally out-of-sync and a rewind key press is needed. All the other media players have skips every once and a while.
I've also tried other non-IGP ATI graphics card where the onboard TV-out works, but the there is no difference. Unfortunately I can't use ivtv output because I'm using PVR-250. I've always thought the skipping is video driver related, but no matter which combination I used (Nvidia/ATI - Xfree/Xorg), nothing seemed to make any difference.
At the moment the sound driver is my prime candidate for the faulty behaviour.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.