[alsa-devel] [PATCH] ASoC: Decouple DAPM from CODECs

Jarkko Nikula jhnikula at gmail.com
Fri Nov 5 08:20:08 CET 2010


On Thu, 4 Nov 2010 23:29:20 -0400
Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:

> On Thu, Nov 04, 2010 at 02:38:05PM +0200, Jarkko Nikula wrote:
> > From: Liam Girdwood <lrg at slimlogic.co.uk>
> > 
> > Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
> > required when developing ASoC further. Such as for other ASoC components to
> > have DAPM widgets or when extending DAPM to handle cross-device paths.
> 
> This looks good but won't apply without your DAPM locking change.  In a
> case like this where the patch is going to be applied on a different
> branch to the one the dependency is on it's usually best to let the
> merge get sorted out when the branches get merged.

Lets not take honor from Peter Ujfalusi who find the locking issue
in DAPM :-)

As this patch is huge, a small fixup below to those conflicting
lines (and only those) of patch file. That makes the patch to apply on
top of for-2.6.38 branch.


-- 
Jarkko
-------------------- fixup.diff --------------------
--- [PATCH]_ASoC__Decouple_DAPM_from_CODECs.orig	2010-11-05 09:14:14.000000000 +0200
+++ [PATCH]_ASoC__Decouple_DAPM_from_CODECs	2010-11-05 09:15:44.000000000 +0200
@@ -5707,9 +5707,9 @@
  	LIST_HEAD(up_list);
  	LIST_HEAD(down_list);
 @@ -903,7 +909,7 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
+ 	/* Check which widgets we need to power and store them in
  	 * lists indicating if they should be powered up or down.
  	 */
- 	mutex_lock(&card->dpw_mutex);
 -	list_for_each_entry(w, &codec->dapm_widgets, list) {
 +	list_for_each_entry(w, &dapm->widgets, list) {
  		switch (w->id) {
@@ -5800,9 +5800,9 @@
 +	pop_dbg(dapm->pop_time, "DAPM sequencing finished, waiting %dms\n",
 +		dapm->pop_time);
 +	pop_wait(dapm->pop_time);
- 	mutex_unlock(&card->dpw_mutex);
  
  	return 0;
+ }
 @@ -1037,9 +1043,9 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
  		return -ENOMEM;
  


More information about the Alsa-devel mailing list