SB Audigy: Bad audio quality when told to use all 5.1 channels on emu10k1 cards

Bug #455779 reported by Michael B. Trausch
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Binary package hint: pulseaudio

*Everything* that is played through PulseAudio gains a high-pitched ringing tone. It sounds more or less like bad AM radio, but with bass added. I haven't a clue how to fix it so that it works properly. PulseAudio has not worked out of the box on my system for any Ubuntu release in which it has been present, and for the Karmic+1 cycle, it needs to be either *actually* fixed, or removed entirely: this is frankly getting quite ridiculous. PA is the source for a lot of bugs that can't be properly described, cannot be adequately troubleshooted, and it is apparently so difficult to fix that it hasn't properly worked since it was created. I cannot pretend to understand how to fix PA myself, and I'm a relatively technical user with a relatively basic setup, who just wants to listen to some bloody music without having to try to figure out how the audio subsystem is broken in *this* release.

ProblemType: Bug
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: mbt 3741 F.... pulseaudio
 /dev/snd/timer: mbt 3741 f.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Live'/'SB Live! 5.1 [SB0060] (rev.7, serial:0x80611102) at 0xdc00, irq 19'
   Mixer name : 'SigmaTel STAC9708,11'
   Components : 'AC97a:83847608'
   Controls : 224
   Simple ctrls : 45
Date: Mon Oct 19 16:06:29 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: pulseaudio 1:0.9.19-0ubuntu3
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: pulseaudio
Uname: Linux 2.6.31.3-bfs303 x86_64

Revision history for this message
Michael B. Trausch (mtrausch) wrote :
Revision history for this message
David Henningsson (diwic) wrote :

To make sure this is a pulseaudio problem, can you successfully run "pasuspender -- speaker-test -D plughw:0 -t sine -c 2" in a terminal? If it does not work (i e two alternating tones, alternating left - right), it is more likely to be an ALSA problem.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael B. Trausch (mtrausch) wrote :

ALSA works just fine by itself. ALSA has _never_ been the problem. There is no squal or high-pitched whine when running your test, and the test sounded exactly as it was supposed to.

Additionally, I can play music via ogg123 under pasuspender and directly to plughw:0 and the additional squealish, high-pitched sound is not emitted. However, then I only get to use 2 of my speakers, instead of all of them (5 speakers + LFE).

If the sound is played through PA, it acquires a nasty high-pitched whining.

Changed in pulseaudio (Ubuntu):
status: Incomplete → New
Revision history for this message
David Henningsson (diwic) wrote :

Difficult one. Unless it has solved itself during one of the updates lately, can you please provide a pulseaudio log? http://wiki.ubuntu.com/PulseAudio/Log ?

Revision history for this message
Michael B. Trausch (mtrausch) wrote :

Here is the log.

I don't know how closely you'll be able to follow what I did, but in case it helps:

  1. I started PA for logging, and started Banshee.
  2. I then started playing a high-quality netradio stream.
  3. The sound at this point was only coming out of a couple of channels, so I opened the volume mixer and switched "Hardware" to 4.1 and then back to 5.1. Then, all speakers work again.
  4. The sound coming out of the speakers through the whole process was AM quality. The stream itself plays perfectly on other computers and through ALSA when the netradio stream is played via mpg123 when PA is dead.
  5. I then stopped playback, and started it again. Repeat steps 2 through 4.
  6. I then stopped playback and killed PA using "pulseaudio -k" from another terminal.

So, here's the result.

Revision history for this message
David Henningsson (diwic) wrote :

There are a few strange things in that log, e g these:

E: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
E: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_emu10k1'. Please report this issue to the ALSA developers.
E: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

D: alsa-sink.c: Requested volume: 0: 49% 1: 49% 2: 49% 3: 49% 4: 49% 5: 75%
D: alsa-sink.c: Got hardware volume: 0: 50% 1: 50% 2: 49% 3: 49% 4: 49% 5: 63%

If there is a bug in the ALSA driver, you can try to install linux-backports-modules-alsa-karmic-generic and reboot afterwards, that'll update your sound drivers.

Revision history for this message
Michael B. Trausch (mtrausch) wrote :

Installing that had no effect.

I hold to the assertion that the bug *must* be in PulseAudio: If I disable PulseAudio completely and play sound directly using ALSA, it sounds *just* fine. The only problem is that most ALSA applications do not output 5.1 channels directly, and PulseAudio is required in order to get all of my speakers to output sound correctly, at least so far as I am aware. The ALSA configuration that I used in the past to do 5.1 sound without PulseAudio does not seem to work any longer in Karmic.

Revision history for this message
Michael B. Trausch (mtrausch) wrote :

PulseAudio only ever degrades the audio when I tell it to use all 5.1 channels of the sound card, apparently. If I tell it to use stereo mode, it sounds fine---that is, *if* I have speakers attached that are stereo, or that will upmix to 5.1 in hardware.

Revision history for this message
David Henningsson (diwic) wrote : Re: SB Audigy: Bad audio quality when told to use all 5.1 channels

I'm currently out of ideas then. Sorry.

summary: - PulseAudio completely ruins all audio
+ SB Audigy: Bad audio quality when told to use all 5.1 channels
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 455779] Re: SB Audigy: Bad audio quality when told to use all 5.1 channels

I've been chasing this one; it may be related to the MMX code. It
needs more investigation. In the meantime, would you please try
PULSE_NO_SIMD=1 ?

Revision history for this message
Michael B. Trausch (mtrausch) wrote : Re: SB Audigy: Bad audio quality when told to use all 5.1 channels

Starting PulseAudio manually with PULSE_NO_SIMD=1 clears the sound up a *lot*.

However, every time a new sound is played, it reverts to stereo. Well, not completely; it reverts to 2 channels, but not the same two channels that the sound card uses in stereo mode. Good enough to color me completely confused. So, every time I start playing something like netradio, I have to open the hardware properties by right-clicking on the volume control, and toggling it away from 5.1 and then back to 5.1 in order to get the sound to work right. System sounds only work properly when a netradio stream is playing; as soon as the sound system stops playing sound completely, it stops properly outputting audio. That is, however, bug 406582 (or rather, the part of it that still is an issue on Karmic).

Revision history for this message
Steve Kieu (msh-computing) wrote :

I for one, never see PA works in any of Ubuntu version and it is quite bad that it is still in Karmic. Removing it, no sound volume control, sound record (gnome) no longer works, but I still have to do that to avoid my ears being damaged.

Is there any other replacement? or Just plain alsa (why we ever need PA anyway? alsa allow me to play from multiple applications already) Why Ubuntu designs the PA (given bad quality and high CPU usage) to the default sound system and still, Ubuntu does not listen the voice of such users like us?

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
summary: - SB Audigy: Bad audio quality when told to use all 5.1 channels
+ SB Audigy: Bad audio quality when told to use all 5.1 channels on
+ emu10k1 cards
Revision history for this message
Raymond (superquad-vortex2) wrote :

Refer to the log

PA can open mono playback and mono capture using hw:0

D: alsa-mixer.c: Profile output:analog-mono+input:analog-mono supported.

PA can also open front:0 stereo playback

D: alsa-mixer.c: Profile output:analog-stereo supported.

But PA fail for open front:0 for stereo capture because of the lock of ctl elem 'EMUU10K1 PCM Send Routing' and 'EMU10K1 PCM Send Volume' and those locks had already been locked by the front playback device when PA open front device

Those two controls mentioned in http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=Documentation/sound/alsa/SB-Live-mixer.txt associated with front device in http://git.alsa-project.org/?p=alsa-lib.git;a=blob_plain;f=src/conf/cards/EMU10K1.conf

I: (alsa-lib)setup.c: Cannot lock ctl elem

PA should not open front , surround40 for capture

I: alsa-sink.c: Device doesn't support mmap(), falling back to UNIX read/write mode.
I: alsa-sink.c: Cannot enable timer-based scheduling, falling back to sound IRQ scheduling.

I: client.c: Created 0 "ConsoleKit Session /org/freedesktop/ConsoleKit/Session3"
D: module-console-kit.c: Added new session /org/freedesktop/ConsoleKit/Session3

D: main.c: Got org.pulseaudio.Server!
I: main.c: Daemon startup complete.

I: module-stream-restore.c: Restoring volume for sink input sink-input-by-application-name:Banshee.

D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=12, prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554436, tlength=33554436, base=12, prebuf=0, minreq=12 maxrewind=0
I: sink-input.c: Created input 0 "Playback Stream" on alsa_output.pci-0000_01_0a.0.analog-surround-51 with sample spec s16le 2ch 32000Hz and channel map front-left,front-right
I: sink-input.c: media.name = "Playback Stream"
I: sink-input.c: application.name = "Banshee"

I: alsa-sink.c: Using 8.0 fragments of size 5292 bytes (10.00ms), buffer size is 42336 bytes (80.00ms)

10 ms is smaller than PA 's 20ms watermark (i.e. PA have to wake up when there is 2 fragments left in the buffer )

SNDRV_PCM_IOCTL_START failed when PA start surround51 playback

I: alsa-sink.c: Starting playback.
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed

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

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this still an issue using Oneiric or the version of PA from the ppa?

Revision history for this message
Raymond (superquad-vortex2) wrote :

same error in ubuntu 12.04

I: alsa-sink.c: Starting playback.
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_START failed

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 9.10 (karmic) reached end-of-life on April 30, 2011.
Ubuntu 12.04 (precise) reached end-of-life on April 28, 2017.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please upgrade to the latest version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.