RaspbmcCrystalbuntu

Post Reply 
 
Thread Rating:
  • 5 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Analog audio - stop the popping
11-26-2012, 06:30 PM
Post: #1
Analog audio - stop the popping
Just wondered if anyone has any ideas about how to stop the popping noise on analog audio when starting and stopping audio output (ie beginning and end of a song)?

It's for this reason that I'm looking at USB audio - the patch works and the popping doesn't happen but it's introduced a couple of other issues.

I just wondered if, as the quality while the audio is playing is good, and the popping only happens when the audio starts or stops, if there's a way of opening the audio stream when XBMC starts, playing 'nothing' to keep it open, so that when songs start, or other audio sources start, there's no pop and crackle?

Thanks in advance.
Find all posts by this user
Quote this message in a reply
11-26-2012, 07:59 PM
Post: #2
RE: Analog audio - stop the popping
It's a confirmed RPi firmware bug. Pretty much all we can do is to ask nicely popcormix (http://forum.stmlabs.com/member.php?acti...e&uid=3898) to move this bug up in his queue
Find all posts by this user
Quote this message in a reply
11-26-2012, 08:15 PM
Post: #3
RE: Analog audio - stop the popping
Let's not all PM him requesting this.

If it's a known bug, which it is, he's aware of it and will deal with it if it is not a hardware limitation. He's a busy man, so bumping issues will neither help him solve the problem or be productive.

For now, if you want, you could try a USB sound card with pulseaudio.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-26-2012, 11:20 PM
Post: #4
RE: Analog audio - stop the popping
(11-26-2012 08:15 PM)Sam Nazarko Wrote:  Let's not all PM him requesting this.

If it's a known bug, which it is, he's aware of it and will deal with it if it is not a hardware limitation. He's a busy man, so bumping issues will neither help him solve the problem or be productive.

For now, if you want, you could try a USB sound card with pulseaudio.

Aren't there still syncing problems with USB audio? Unfortunately, thats not a solution for those of us who use the Pi to watch movies.
Find all posts by this user
Quote this message in a reply
01-06-2013, 12:20 PM
Post: #5
RE: Analog audio - stop the popping
Isn't it a PI hardware issue as referenced here:http://elinux.org/RPi_Bugs

Have pasted text below:

The sound output port on boards version 1.0 and 2.0 are miss-wired causing distortion and a DC offset which could damage certain types of DC-coupled amplifiers and even loudspeakers. It is recommended that you use the HDMI or I2S functionality. If you need to use this port, make sure that the equipment you use has a DC blocking capacitor. The specific problem is that the surge suppression network, which should come between the SoC and the DC blocking capacitor comes AFTER the capacitor, creating a rectification effect of the signal, causing a DC offset and distortion. The design fix is simple, move the DC blocking capacitor after the surge suppressing diodes and then add a 100k resistor (470k, or even up to 1M is fine too) to ground. A series 100 ohm resistor just before the jack might also help suppress unwanted RF interference. If high quality output is required from existing boards, it is necessary to remove parts D12 and D13 from the back of the board. The three pads should be VCC, signal and GND respectively, identify each pad and carefully install some resistor between 10k and 100k between the signal and GND, making sure not to short out VCC. This is fairly high-end SMD re-work, I would suggest you get some training, tools and practice before attempting. (ed note: the writer of this comment does not have said skills, only knows what would have to be done).
Find all posts by this user
Quote this message in a reply
01-06-2013, 03:48 PM
Post: #6
RE: Analog audio - stop the popping
I don't think that this is causing the popping problems. The two diodes only add a DC voltage to the analog signal which is not nice, but should not cause any pop. The popping occurs when the PMW output is initialized.

I am very much looking forward to a solution, as an USB sound card is not an option for me.

As long as there is no software fix I was thinking about a hardware solution, similar to the ones used in other Audio devices. One could use a mute circuit to mute the audio signal whenever popping occurs. This would only require a transistor or two and would be a very low-cost solution. One could use a GPIO output as the control signal.

I am not very familiar with XBMC, but if I understand correctly, the JSON Interface could be used to query the time to completion of a song. If this can be timed correctly, one could mute the audio signal just before completion of a song and unmute as the new song started playing.

I don't know if the timing via JSON is good enough, or if XBMC could control the GPIO directly?
Find all posts by this user
Quote this message in a reply
01-06-2013, 05:50 PM
Post: #7
RE: Analog audio - stop the popping
Another solution is to extract the audio signal from the HDMI. I use a device like this: http://deluxecable.shopgate.com/item/31333237.

Yes, it is expensive, but i enables me to use the RP as audio source for my old amplifier which has no digital in. And i don't have to have the tv switched on. When i switch the tv on i can use its remote to control xbmc, thanks to cec.
Find all posts by this user
Quote this message in a reply
01-06-2013, 10:43 PM
Post: #8
RE: Analog audio - stop the popping
(01-06-2013 03:48 PM)MilleniumEli Wrote:  The popping occurs when the PMW output is initialized.

A software fix would be: do not allow the alsa driver to be unloaded and reloaded. Instead, output silence when no sound output is needed.

If pulseaudio is used, this is as simple as commenting out the line that loads module-suspend-on-idle. I do not know how pulseaudio can be used in raspbmc, but the post from Peteman100 suggests that it is possible.

There will still be one pop on boot up and another one on shutdown, however. This can be solved by not shutting down.
Find all posts by this user
Quote this message in a reply
01-10-2013, 10:08 PM
Post: #9
RE: Analog audio - stop the popping
I did some experimentation and came up with a dirty hack that solves this for me: http://www.oxymoronical.com/blog/2013/01...nning-XBMC
Find all posts by this user
Quote this message in a reply
01-11-2013, 12:39 PM
Post: #10
RE: Analog audio - stop the popping
(01-10-2013 10:08 PM)Mossop Wrote:  I did some experimentation and came up with a dirty hack that solves this for me: http://www.oxymoronical.com/blog/2013/01...nning-XBMC

Interesting, thank you. I'll try it. Are there any drawbacks expected? As far as i understand you are using Pi only to music. I wonder if multichannel movie audio or passthru or downmixing or anything may be affected?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Sponsored Advertisement