Skip to contentSkip to conversation

ASoC: dapm: Allow DAPM registers to be unsigned int

PATCH In review Mark Brown 3 participants 4 messages Mar 8, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: dapm: Allow DAPM registers to be unsigned int

Supports larger register maps.

---
 include/sound/soc-dapm.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/sound/soc-dapm.h +1 -1
index a4ae018..ab3216b 100644
@@ -488,7 +488,7 @@ struct snd_soc_dapm_widget {
 	void *priv;				/* widget specific data */
 
 	/* dapm control */
-	short reg;						/* negative reg = no direct dapm */
+	unsigned int reg;			/* negative reg = no direct dapm */
 	unsigned char shift;			/* bits to shift */
 	unsigned int saved_value;		/* widget saved value */
 	unsigned int value;				/* widget current value */
Signature · 1 line
1.7.9.1
#1 lore raw
Quoted 3 lines · Mark Brown

       /* dapm control */
-       short reg;                                              /* negative reg = no direct dapm */
+       unsigned int reg;                       /* negative reg = no direct dapm */

Maybe you should update the comment now that this is unsigned int.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 8 lines · Fabio Estevam

include/sound/soc-dapm.h struct snd_soc_dapm_widget { · line 491

Quoted 3 lines · Mark Brown
       /* dapm control */
include/sound/soc-dapm.h +1 -1
-       short reg;                                              /* negative reg = no direct dapm */
+       unsigned int reg;                       /* negative reg = no direct dapm */

Maybe you should update the comment now that this is unsigned int.

There are also a few places in soc-dapm.c which check for reg >= 0 to handle SND_SOC_NOPM, those need to be updated as well.

author
#3 lore raw
In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

On Thu, Mar 8, 2012 at 9:48 AM, Mark Brown

Quoted 2 lines

-       short reg;                                              /* negative reg = no direct dapm */
+       unsigned int reg;                       /* negative reg = no direct dapm */

Maybe you should update the comment now that this is unsigned int.

Bah, humbug - no, it needs to be signed int and we don't support the full 32 bits.