Navigation
Home & news
Random page
All pages
Site search:
Databases
Fortune cookies
Haikus
SID themes
Page collections
Blag
Chip music
Games
Hardware projects
Music downloads
Obfuscated programming
Piano music
Sane programming
Scene productions
SID related pages
Software downloads
Video downloads
Featured pages
Autosokoban
Beagleboard VGA
Binary Art
Brainfuck
Chimney claw
Chopin romance
Craft
Fratres
Freecell
Hardware chiptune
Lampslide
Leaky redaction
No-pop hack
One man and his piano
P. N. A. C.
Paraforce
Plasma
Remote control
Reverberations
SID septet
Slaepwerigne
Stranded
Syntax highlighting
TTY demystified
Townwoofer
Turbulence
Warpfruit
Forum
Register
Log in
Latest comments
Feedback
  • Swedish content
  • Personal content
  • Offensive content

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,

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.