[LINUX] Audio popping noise on surround sound
#1
Hi, having a strange problem with an annoying "popping/static" noise when I try and play mp3s though my surround system. First of all, my setup:

XBMC 10.1 under arch linux x86_64.
CA0106 sound card using direct ALSA (no pulseaudio).
5.1 receiver linked to speakers and sub.
I'm *not* using passthrough audio; I always get XBMC to decode and have 3 stereo audio cables leading to the receiver.

I've heard this noise when playing multichannel audio movies, but it hasn't annoyed me enough to properly investigate it.

However, yesterday I also setup my alsa config so that 2.0 stereo mp3s would be upmixed to 5.1 (standard ttable channel duplication, asound.conf at end of post).

My test mp3 is someone singing and then a short period of silence before singing again. During the silence there is a short series of static/popping noises immediately after the vocals finish; it doesn't appear to be there *during* the vocals, or later in the silence. Oh, this mp3 plays absolutely fine on other systems, and if I don't have my asound.conf file installed.

I'd assumed this would be some sort of interference or other such crapness, but I've found something weird. Under ALSA, XBMC uses a software volume control (i.e. it does not use ALSA's hardware mixer). You can see this in the sourcecode here: https://github.com/xbmc/xbmc/blob/master...tSound.cpp

The implementation of CPCMAmplifier is here:
https://github.com/xbmc/xbmc/blob/master...lifier.cpp

Notice that if m_dFactor is large enough, no processing is done (i.e. volume at max already).

If I set XBMC's volume to max, and instead control the volume using "alsamixer" from the console, the sound is perfect.

If I try to use XBMC's software volume control to reduce the volume below a certain level, I get the popping back again. It only happens if the XBMC volume is below about -30dB. Popping is audible through all speakers.

I don't want to report this as a bug until I'm sure I'm just not doing something stupid.


here's my asound.conf:

pcm.20upmix {
type route
slave.pcm surround51
slave.channels 6
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
ttable.0.4 0.5
ttable.1.4 0.5
ttable.0.5 0.5
ttable.1.5 0.5
}

pcm.!default pcm.20upmix
Reply
#2
It sounds like this person was having problems with the internal mixer too: http://forum.xbmc.org/showthread.php?tid=88750

I've setup a "workaround" using irexecd to directly control alsa's mixer and disabled the XBMC support for the volume buttons on my remote. It works, but means I lose the onscreen display (plus if it is from the internal mixer, it's probably affecting more people than me).

BTW: forgot to mention: I disabled/muted any unwanted playback and capture ALSA mixer controls.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Audio popping noise on surround sound0