(hide navigation)
  • Swedish content
Fund my projects
Patreon
Steady
Don't miss
Page thumbnail
Spindle v1
Forum
Register
Log in
Latest comments
Syndication
RSS feed
Feedback

Beagleboard no-pop hack

When you close the audio playback channel on a beagleboard running Linux (I'm running the Launchpad beagleboard-kernel, but I'm not aware of any version where this has been fixed), you get a really loud "pop" five seconds later when the driver removes power from the playback hardware. Here's a simple hack to prevent that from happening.

You get rid of the "pop", at the cost of slightly higher power consumption when the beagleboard is silent. This is not an issue for me, since my setup isn't battery powered.

Based on 2.6.31.

--- sound/soc/soc-core.c	2009-12-22 15:00:18.000000000 +0100
+++ sound/soc/soc-core.c	2009-12-22 15:14:19.000000000 +0100
@@ -73,7 +73,7 @@
 
 	/* if there was any work waiting then we run it now and
 	 * wait for it's completion */
-	if (ret) {
+	if (1) {
 		schedule_delayed_work(dwork, 0);
 		flush_scheduled_work();
 	}
@@ -374,8 +374,6 @@
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		/* start delayed pop wq here for playback streams */
 		codec_dai->pop_wait = 1;
-		schedule_delayed_work(&card->delayed_work,
-			msecs_to_jiffies(pmdown_time));
 	} else {
 		/* capture streams can be powered down now */
 		snd_soc_dapm_stream_event(codec,
  • no-pop (Patch file, 662 bytes)

Posted Tuesday 22-Dec-2009 15:52

Discuss this page

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Anonymous
Wed 23-Dec-2009 10:38
Awesome, I didn't know you had a beagleboard. Mine is broken at the moment, waiting for my Pandora to arrive :)

- Fox
Anonymous
Sat 2-Jan-2010 22:32
Try locating the real error, it's very likely popping when twl4030_codec_enable() in sound/soc/codec/twl4030.c is called with enable set to 0 (i.e. disable) and twl4030_codec_disable_resource(TWL4030_CODEC_RES_POWER) is called cutting the power without first gating the output and shutting the amplifier down. (Like on an old stereo you'd just shut off and it pops!)

I don't have a Beagleboard so cannot experiment with this...
lft
Linus Åkesson
Tue 5-Jan-2010 21:31
Thanks for the tip, I'll look into it.
Anonymous
Tue 4-May-2010 16:52
Hi!

Thanks for the tip, but how do you apply the patch? (I compil my own kernel with Open Embedded for a BeagleBoard)

Olivier
lft
Linus Åkesson
Fri 7-May-2010 16:22
Hi!

Thanks for the tip, but how do you apply the patch? (I compil my own kernel with Open Embedded for a BeagleBoard)

Olivier

You could use patch(1), e.g.:
patch my_kernel/sound/soc/soc-core.c path/to/no-pop.patch

Or you could use a text editor and do it manually, since it's such a small change.
Anonymous
Fri 28-May-2010 14:22

lft wrote:

Hi!

Thanks for the tip, but how do you apply the patch? (I compil my own kernel with Open Embedded for a BeagleBoard)

Olivier

You could use patch(1), e.g.:
patch my_kernel/sound/soc/soc-core.c path/to/no-pop.patch

Or you could use a text editor and do it manually, since it's such a small change.

Thanks you!

Finally I used an other way : I copied the patch into openembedded/recipes/linux/linux-omap-2.6.31/beagleboard/ and I added file://no-pop.patch;patch=1 to SRC_URI_append_beagleboard on openembedded/recipes/linux/linux-omap_2.6.31.bb

Olivier