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.
Wed 23-Dec-2009 10:38
- Fox
Sat 2-Jan-2010 22:32
I don't have a Beagleboard so cannot experiment with this...
Linus Åkesson
Tue 5-Jan-2010 21:31
Tue 4-May-2010 16:52
Thanks for the tip, but how do you apply the patch? (I compil my own kernel with Open Embedded for a BeagleBoard)
Olivier
Linus Åkesson
Fri 7-May-2010 16:22
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.
Fri 28-May-2010 14:22
lft wrote:
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