Ticket #396 (closed tracking: fixed)

Opened 3 years ago

Last modified 3 years ago

snd-intel8x0 is problematic

Reported by: shlomif Owned by: lennart
Milestone: Component: module-alsa-*
Keywords: sound, jerky, bad, playback, artifacts, voice, play, ac 97 Cc:

Description

When playing sound using PulseAudio-0.9.13 from all supporting apps on my Mandriva Linux Cooker system, I'm getting a jerky sound after playing a few songs and only resolvable by restarting PulseAudio from the command line. This doesn't happen with pulseaudio-0.9.10. More information can be found here:

https://qa.mandriva.com/show_bug.cgi?id=45008

Change History

follow-up: ↓ 2   Changed 3 years ago by lennart

I assume this is intel8x0?

Please follow:

https://bugzilla.redhat.com/show_bug.cgi?id=462200

in reply to: ↑ 1   Changed 3 years ago by shlomif

Replying to lennart:

I assume this is intel8x0?

I think so:

00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)

And:

snd_intel8x0           33180  4
snd_ac97_codec        105124  1 snd_intel8x0

in lsmod.

Please follow: https://bugzilla.redhat.com/show_bug.cgi?id=462200

What am I supposed to do about this bug report? There doesn't seem to be a solution there. What do you mean by "Please follow"? Do you mean I should subscribe there and add my address to the CC? What?

Regards,

-- Shlomi Fish

  Changed 3 years ago by coling

Shlomi, that bug report mentions several kernel patches but we have those already in cooker. Lennart also mentions the following commit rb712e7b13dd which we do not currently have in our cooker pa package. There is also #391 which is also related to the cooker bug you mention, so I'll be deploying an updated cooker PA shortly.

  Changed 3 years ago by nevion

I'm using opensuse 11.1 with an intel8x0 card (nVidia Corporation CK804 AC'97 Audio Controller) and I'm getting the same symptoms. I didn't have this on ubuntu intrepid. Using pulseaudio-0.9.12-9.5 from the opensuse repos with kernel 2.6.27.7-9-default. Let me be clear, this is incredibly annoying/stressful. I do like PA though so I'd prefer any options using it over dmix/alsa. Recommended course of action?

follow-up: ↓ 6   Changed 3 years ago by coling

nevion, version 0.9.12 is not really particularly stable. Even 0.9.13 is not that great if you don't patch it fairly heavily. Anything after 0.9.10 is relatively interesting on some hardware where it doesn't report it's timing information correctly (mostly creative stuff to be fair). But before looking at other issues I'd get a 0.9.13 + patches version of PA to test on. Using 0.9.12 is not going to help you.

in reply to: ↑ 5   Changed 3 years ago by nevion

Replying to coling: Does this mean I should be using git head or is there some specific patches I should be looking for?

  Changed 3 years ago by coling

Nevion, you can look in the Fedora package to see the needed patches but if you can easily do so, git master is probably as stable as it can be at the moment (although you may or may not like module-flat-volumes which is IMO the only "controversial" part of the process right now (read that it doens't really work for me!) but you can easily disable it! I've been meaning to discuss it with Lennart but I'm lazy ;))

Of course this may not fix your problem, but at least we can rule out a few things ;)

  Changed 3 years ago by nevion

Well, I don't think it changed anything using git latest. I do think it skips while I use X more than if the system is just loaded down thus being fairly independent of system load and dependent on x usage - perhaps there is some blocking with the x libraries adding to the trouble or creating the issue?

git 03aa91dea735a38aa0c3a581ede315b736ecc25b

  Changed 3 years ago by nevion

Oh wait I just noticed some interesting output: D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT I: module-alsa-sink.c: Underrun! D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers. D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers. D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers. D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers. D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT D: protocol-native.c: Requesting rewind due to end of underrun. D: module-alsa-sink.c: Requested to rewind 63388 bytes. D: module-alsa-sink.c: Limited to 288 bytes. D: module-alsa-sink.c: before: 72 D: module-alsa-sink.c: after: 72 D: module-alsa-sink.c: Rewound 288 bytes. D: sink.c: Processing rewind... D: sink-input.c: Have to rewind 288 bytes on render memblockq.

I've been staring at the output and those don't occur on a 1:1 basis with the underruns.

  Changed 3 years ago by nevion

Excuse the formatting screwup above reposting as I don't see an edit button:

Oh wait I just noticed some interesting output:

I: module-alsa-sink.c: Underrun!                                                                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: protocol-native.c: Requesting rewind due to end of underrun.                                                                
D: module-alsa-sink.c: Requested to rewind 63388 bytes.                                                                        
D: module-alsa-sink.c: Limited to 288 bytes.                                                                                   
D: module-alsa-sink.c: before: 72                                                                                              
D: module-alsa-sink.c: after: 72                                                                                               
D: module-alsa-sink.c: Rewound 288 bytes.                                                                                      
D: sink.c: Processing rewind...                                                                                                
D: sink-input.c: Have to rewind 288 bytes on render memblockq.                                                                 
D: protocol-native.c: Requesting rewind due to end of underrun.                                                                
D: module-alsa-sink.c: Requested to rewind 46192 bytes.                                                                        
D: module-alsa-sink.c: Mhmm, actually there is nothing to rewind.                                                              
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
I: module-alsa-sink.c: Underrun!                                                                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT                                                                                
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.                                               
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: module-alsa-sink.c: Wakeup from ALSA! OUTPUT
D: protocol-native.c: Requesting rewind due to end of underrun.
D: module-alsa-sink.c: Requested to rewind 65256 bytes.
D: module-alsa-sink.c: Limited to 512 bytes.
D: module-alsa-sink.c: before: 128
D: module-alsa-sink.c: after: 128
D: module-alsa-sink.c: Rewound 512 bytes.

I've been staring at the output and those don't occur on a 1:1 basis with the underruns.

  Changed 3 years ago by coling

Ahh yes. This is probably on Creative hardware? There are other bug reports open for this. This glitch free core in PA is utilising some fairly timing-specific parts of ALSA and creative don't play nice with free software and release their specs so the ALSA support needed here is lagging. That's my understanding anyway.

Not sure this is the right forum to discuss things tho', so perhaps we should take further discussion to the mailing list?

  Changed 3 years ago by nevion

As mentioned earlier, an intel8x0 driver card (nVidia Corporation CK804 AC'97 Audio Controller). I don't think it is creative based at all. I could be wrong though.

BTW since this fiasco with creative exists as well as possible victimization of intel8x0 users, shouldn't there be a way of forcing the old behavior of PA such that it just runs on the cards interrupts or something instead of trying to be the master controller? From what I've read, it seems that PA wants to take control of everything so the system isn't woken up when it doesn't need to be. While this is certainly a good behavior in general, for flakey card/driver combos (which there seems to be many of) it seems to screw over the users who have sound that otherwise works OK.

  Changed 3 years ago by coling

Ah yes, sorry I forgot about the nvidia thing you mentioned already. Sleepy when I read your reply :)

The old behaviour can be enabled by passing tsched=1 to module-alsa-sink when loading it. You can also pass this option to hal-detect module so that it can autodetect alsa sinks and load the module with this option.

follow-up: ↓ 18   Changed 3 years ago by nevion

Setting tsched=0 made it work again (mplayer even unpauses reliably! though its a bit laggy for 2 secs). But now I get tons of these messages:

E: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.

I was interested if this (tsched=1) was likely a timing error like the creative cards. Here's what pa prints:

D: alsa-util.c: snd_pcm_dump():                                                                                                
D: alsa-util.c: Hardware PCM card 0 'NVidia CK804' device 0 subdevice 0                                                        
D: alsa-util.c: Its setup is:                                                                                                  
D: alsa-util.c:   stream       : CAPTURE                                                                                       
D: alsa-util.c:   access       : MMAP_INTERLEAVED                                                                              
D: alsa-util.c:   format       : S16_LE                                                                                        
D: alsa-util.c:   subformat    : STD                                                                                           
D: alsa-util.c:   channels     : 2                                                                                             
D: alsa-util.c:   rate         : 48000                                                                                         
D: alsa-util.c:   exact rate   : 48000 (48000/1)                                                                               
D: alsa-util.c:   msbits       : 16                                                                                            
D: alsa-util.c:   buffer_size  : 16128                                                                                         
D: alsa-util.c:   period_size  : 1008                                                                                          
D: alsa-util.c:   period_time  : 21000                                                                                         
D: alsa-util.c:   tstamp_mode  : NONE                                                                                          
D: alsa-util.c:   period_step  : 1                                                                                             
D: alsa-util.c:   avail_min    : 1008                                                                                          
D: alsa-util.c:   period_event : 0                                                                                             
D: alsa-util.c:   start_threshold  : -1                                                                                        
D: alsa-util.c:   stop_threshold   : -1                                                                                        
D: alsa-util.c:   silence_threshold: 0                                                                                         
D: alsa-util.c:   silence_size : 0                                                                                             
D: alsa-util.c:   boundary     : 9079256848778919936                                                                           

Does anything look particularly erroneous? boundary is awfully big... also, for exact rate, I think this card actually operates at 47khz or so.

  Changed 3 years ago by btb

I think I see a similar issue, but on different versions/hardware. On Fedora 10 on a AMD 64 x2 with pulseaudio-0.9.13-6.fc10.x86_64 I have choppy/jerky output on the plugged in board:

01:09.0 Multimedia audio controller: Fortemedia, Inc Xwave QS3000A [FM801] (rev b2)

(which used to work great a while ago before moving to Fedora) but not when I use the on-board audio:

00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)

/var/log/messages shows messages like:

Jan 25 19:53:51 rigel pulseaudio[17774]: module-alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers.
Jan 25 19:53:55 rigel pulseaudio[17774]: module-alsa-sink.c: Increasing wakeup watermark to 354.01 ms

I'm very very new to pulseaudio so I have no clue yet what kind of information you'd like to see that would help to track this. In fact it took me half a day to figure out how to get mplayer to send stuff to this fm801 board, which I find rather long with 15 years of linux experience.

  Changed 3 years ago by btb

Ah. The tsched=0 hack gets rid of the choppy sound. the 'ALSA woke ...' message stay though.

  Changed 3 years ago by lennart

  • summary changed from Sound is Jerky with "AC'97" hardware (on Mandriva Cooker) to snd-intel8x0 is problematic

in reply to: ↑ 14   Changed 3 years ago by toothrot

Replying to nevion:

Setting tsched=0 made it work again (mplayer even unpauses reliably! though its a bit laggy for 2 secs). But now I get tons of these messages:

I experience this issue in Ubuntu 9.04 (updated to today), 8.10 as well. Using tsched=0 worked great! Hopefully the driver will be fixed.

follow-up: ↓ 21   Changed 3 years ago by lennart

  • status changed from new to closed
  • type changed from defect to tracking
  • resolution set to fixed

Should be fixed by the fixes pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=472339

  Changed 3 years ago by lennart

  • component changed from core to module-alsa-*

in reply to: ↑ 19   Changed 3 years ago by coling

Replying to lennart:

Should be fixed by the fixes pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=472339

Seems those fixes (amoung others) are not without their regressions: https://qa.mandriva.com/show_bug.cgi?id=50055[[br]] https://qa.mandriva.com/show_bug.cgi?id=50120

Not 100% sure if both are related to your recent fedora fixes, it does seem that this commit does break vbox: http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=bbf6ad1399e9516b0a95de3ad58ffbaed670e4cc

Although of course the problem could be in vbox rather than in the kernel... I don't really know enough to comment in any authority.. Just thought I'd relay on information I've received in case it helps.

Note: See TracTickets for help on using tickets.