Ticket #471 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

Sound skips and crackles

Reported by: rushfan73 Owned by: lennart
Milestone: Component: daemon
Keywords: Cc:

Description

On my creative Audigy 2 ZS, sound skips and crackles. The problem becomes worse when I am under heavy CPU usage, and it crackles as I move the mouse. It seems to affect X applications worse than daemons (mpd) or mplayer in the console. Mplayer in the GUI crashes.

I have tested this on kernel's 2.6.27.12-170.2.5.fc10.x86_64 and 2.6.29.

The following line is reported in /var/log/messages over and over: Jan 28 18:33:48 localhost pulseaudio[12891]: 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.

Attachments

dmesg.txt (38.9 kB) - added by rushfan73 3 years ago.
lsmod.txt (5.8 kB) - added by rushfan73 3 years ago.
mpd.error (8.6 kB) - added by rushfan73 3 years ago.
mplayer_crash_output.txt (57.8 kB) - added by rushfan73 3 years ago.

Change History

Changed 3 years ago by rushfan73

Changed 3 years ago by rushfan73

Changed 3 years ago by rushfan73

Changed 3 years ago by rushfan73

  Changed 3 years ago by coling

You didn't say which version of PA, but I'm assuming a recent (e.g. post 0.9.11) version.

This is a known issue on Creative hardware. See BrokenSoundDrivers.

As noted on that page passing tsched=0 in the default.pa when you load module-hal-detect should work around it for you.

Lennart, I know it is generally not a good idea to work around bugs in PA, but should we consider patching hal-detect to pass tsched=0 for the cards we know are problematic (unless a specific value of tsched is passed into the module - e.g. only in the default case)?

I can knock something up if you like? I think it would help stop several complaints even if it does mask the problem.

  Changed 3 years ago by rushfan73

Indeed I am using 0.9.14.

  Changed 3 years ago by rushfan73

And I'm sorry but what module do I pass that to in /etc/modules? snd-emu*?

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

Sorry I should have been a bit clearer:

In your default.pa file you need to change the line that says

  load-module module-hal-detect

to read:

  load-module module-hal-detect tsched=0

You will typically find your default.pa in /etc/pulse/ but it can also live in ~/.pulse/ too.

  Changed 3 years ago by rushfan73

Well, mpd and command-line mplayer now sound fine, but smplayer does not work at all. MPlayer is still showing some troubling output:

========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) ========================================================================== AO: [pulse] Init failed: Connection refused Failed to initialize audio driver 'pulse' [AO_ALSA] alsa-lib: pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused

[AO_ALSA] Playback open error: Connection refused Failed to initialize audio driver 'alsa' AO: [oss] 44100Hz 2ch s16le (2 bytes per sample) Video: no video

Is there an easy way to just circumvent pulseaudio for all of my applications, giving that my audigy has hardware mixing?

  Changed 3 years ago by coling

Pulseaudio is more than just a mixer: it handles devices such as USB Speakers and headsets, as well as bluetooth devices and Apple Airport wireless speakers etc. so the fact your card has hardware mixing is not the only thing to consider. That said to disable pulseaudio you would need to ask the support of your distro. If it's sensible, they will have an easy interface to enable or disable pulse support. As the "upstream" bug tracker, we're not really geared up to support all the different ways distros choose to present this I'm afraid.

The error you are getting here relates to how pulse audio is started. If you reboot or relogin, I'm sure it will work again.

in reply to: ↑ 4   Changed 3 years ago by stormking

Replying to coling:

In your default.pa file you need to change the line that says {{{ load-module module-hal-detect }}} to read: {{{ load-module module-hal-detect tsched=0 }}}

I tried that. But paman still says that module-alsa-sink was started with the argument tsched=1. (Yes, I restarted pulseaudio. I even rebooted in the meantime.)

  Changed 3 years ago by coling

Hmm. Can you post (either attach here or pastebin and post link) your default.pa.

  Changed 3 years ago by stormking

Of course. Here it is: http://pastebin.com/m24612358

It should be the standard configuration, I never modified it except adding "tsched=0" to the load-module-module-hal-detect-line. Pulseaudio is V. 0.9.14, by the way. Audio driver is snd-intel8x0.

  Changed 3 years ago by coling

Yup it looks good. Can you run "pulseaudio -k; pulseaudio -vvv" and post that output too please? Feel free to fire on IRC if it's easier.

  Changed 3 years ago by stormking

Here is the output from pulseaudio -vvv: http://pastebin.com/m3f21219f

Regarding IRC, the last time I was in a chatroom was using AmIRC on my Amiga 4000. It's been a long time ...

But if it was easier for you, I could very well install an IRC client.

  Changed 3 years ago by coling

I only suggested IRC as it would be quicker to work out etc, it's no skin of my nose... it would just probably get you setup/working quicker :)

Well I'm really not sure why the tsched=0 argument to hal-detect is not showing up.

I can think of two reasons:

  1. You are using a system wide daemon and thus it's reading system.pa not default.pa (unlikely)
  2. You have a ~/.pulse/ folder that contains an old default.pa file which is overriding the /etc/pulse/default.pa file.

  Changed 3 years ago by stormking

There is a 3rd reason that happened to be the case. ;-)

I compiled pulseaudio from source, using /usr as prefix. Under these circumstances, PA looks for its config files in /usr/etc/pulse. I added tsched=0 to the right default.pa and now it shows up in paman. I will test playback quality later.

  Changed 3 years ago by stormking

Okay, no more skips in playback, I'm satisfied.

  Changed 3 years ago by coling

  • status changed from new to closed
  • resolution set to worksforme

Glad to help dude.

We (the distros) will have to work out a nice way of handling this, but that's another story...

Note: See TracTickets for help on using tickets.