[alsa-devel] [PATCH] ASoC: dapm: Allow DAPM registers to be unsigned int
Supports larger register maps.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- include/sound/soc-dapm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index a4ae018..ab3216b 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -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 */
On Thu, Mar 8, 2012 at 9:48 AM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
/* 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.
On 03/08/2012 01:52 PM, Fabio Estevam wrote:
On Thu, Mar 8, 2012 at 9:48 AM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
/* 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.
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.
On Thu, Mar 08, 2012 at 09:52:20AM -0300, Fabio Estevam wrote:
On Thu, Mar 8, 2012 at 9:48 AM, Mark Brown
- 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.
participants (3)
-
Fabio Estevam
-
Lars-Peter Clausen
-
Mark Brown