diff options
author | Jon Smirl <jonsmirl@gmail.com> | 2008-07-29 10:22:24 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-07-29 15:32:29 -0400 |
commit | 815ecf8dec95d07e260a16ebe8409f4b7c0fdc0f (patch) | |
tree | 8ba73e2a041c69ca36158074c0e3d51cc0156acf | |
parent | 0c94161580eee8137b868301434ea392083258b5 (diff) |
ALSA: ASoC: convert use of uint to unsigned int
ASOC: convert use of uint to unsigned int
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | include/sound/soc.h | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 48 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 36 |
3 files changed, 43 insertions, 43 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 5ca231f080a0..a1e0357a84d7 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -527,7 +527,7 @@ struct snd_soc_pcm_runtime { | |||
527 | /* mixer control */ | 527 | /* mixer control */ |
528 | struct soc_mixer_control { | 528 | struct soc_mixer_control { |
529 | int min, max; | 529 | int min, max; |
530 | uint reg, rreg, shift, rshift, invert; | 530 | unsigned int reg, rreg, shift, rshift, invert; |
531 | }; | 531 | }; |
532 | 532 | ||
533 | /* enumerated kcontrol */ | 533 | /* enumerated kcontrol */ |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 11a881caba76..1563ceedf61a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1457,8 +1457,8 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | |||
1457 | struct soc_mixer_control *mc = | 1457 | struct soc_mixer_control *mc = |
1458 | (struct soc_mixer_control *)kcontrol->private_value; | 1458 | (struct soc_mixer_control *)kcontrol->private_value; |
1459 | int max = mc->max; | 1459 | int max = mc->max; |
1460 | uint shift = mc->min; | 1460 | unsigned int shift = mc->min; |
1461 | uint rshift = mc->rshift; | 1461 | unsigned int rshift = mc->rshift; |
1462 | 1462 | ||
1463 | if (max == 1) | 1463 | if (max == 1) |
1464 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 1464 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
@@ -1487,12 +1487,12 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, | |||
1487 | struct soc_mixer_control *mc = | 1487 | struct soc_mixer_control *mc = |
1488 | (struct soc_mixer_control *)kcontrol->private_value; | 1488 | (struct soc_mixer_control *)kcontrol->private_value; |
1489 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 1489 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
1490 | uint reg = mc->reg; | 1490 | unsigned int reg = mc->reg; |
1491 | uint shift = mc->shift; | 1491 | unsigned int shift = mc->shift; |
1492 | uint rshift = mc->rshift; | 1492 | unsigned int rshift = mc->rshift; |
1493 | int max = mc->max; | 1493 | int max = mc->max; |
1494 | uint mask = (1 << fls(max)) - 1; | 1494 | unsigned int mask = (1 << fls(max)) - 1; |
1495 | uint invert = mc->invert; | 1495 | unsigned int invert = mc->invert; |
1496 | 1496 | ||
1497 | ucontrol->value.integer.value[0] = | 1497 | ucontrol->value.integer.value[0] = |
1498 | (snd_soc_read(codec, reg) >> shift) & mask; | 1498 | (snd_soc_read(codec, reg) >> shift) & mask; |
@@ -1526,12 +1526,12 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, | |||
1526 | struct soc_mixer_control *mc = | 1526 | struct soc_mixer_control *mc = |
1527 | (struct soc_mixer_control *)kcontrol->private_value; | 1527 | (struct soc_mixer_control *)kcontrol->private_value; |
1528 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 1528 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
1529 | uint reg = mc->reg; | 1529 | unsigned int reg = mc->reg; |
1530 | uint shift = mc->shift; | 1530 | unsigned int shift = mc->shift; |
1531 | uint rshift = mc->rshift; | 1531 | unsigned int rshift = mc->rshift; |
1532 | int max = mc->max; | 1532 | int max = mc->max; |
1533 | uint mask = (1 << fls(max)) - 1; | 1533 | unsigned int mask = (1 << fls(max)) - 1; |
1534 | uint invert = mc->invert; | 1534 | unsigned int invert = mc->invert; |
1535 | unsigned short val, val2, val_mask; | 1535 | unsigned short val, val2, val_mask; |
1536 | 1536 | ||
1537 | val = (ucontrol->value.integer.value[0] & mask); | 1537 | val = (ucontrol->value.integer.value[0] & mask); |
@@ -1594,12 +1594,12 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol, | |||
1594 | struct soc_mixer_control *mc = | 1594 | struct soc_mixer_control *mc = |
1595 | (struct soc_mixer_control *)kcontrol->private_value; | 1595 | (struct soc_mixer_control *)kcontrol->private_value; |
1596 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 1596 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
1597 | uint reg = mc->reg; | 1597 | unsigned int reg = mc->reg; |
1598 | uint reg2 = mc->rreg; | 1598 | unsigned int reg2 = mc->rreg; |
1599 | uint shift = mc->shift; | 1599 | unsigned int shift = mc->shift; |
1600 | int max = mc->max; | 1600 | int max = mc->max; |
1601 | uint mask = (1<<fls(max))-1; | 1601 | unsigned int mask = (1<<fls(max))-1; |
1602 | uint invert = mc->invert; | 1602 | unsigned int invert = mc->invert; |
1603 | 1603 | ||
1604 | ucontrol->value.integer.value[0] = | 1604 | ucontrol->value.integer.value[0] = |
1605 | (snd_soc_read(codec, reg) >> shift) & mask; | 1605 | (snd_soc_read(codec, reg) >> shift) & mask; |
@@ -1631,12 +1631,12 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, | |||
1631 | struct soc_mixer_control *mc = | 1631 | struct soc_mixer_control *mc = |
1632 | (struct soc_mixer_control *)kcontrol->private_value; | 1632 | (struct soc_mixer_control *)kcontrol->private_value; |
1633 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 1633 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
1634 | uint reg = mc->reg; | 1634 | unsigned int reg = mc->reg; |
1635 | uint reg2 = mc->rreg; | 1635 | unsigned int reg2 = mc->rreg; |
1636 | uint shift = mc->shift; | 1636 | unsigned int shift = mc->shift; |
1637 | int max = mc->max; | 1637 | int max = mc->max; |
1638 | uint mask = (1 << fls(max)) - 1; | 1638 | unsigned int mask = (1 << fls(max)) - 1; |
1639 | uint invert = mc->invert; | 1639 | unsigned int invert = mc->invert; |
1640 | int err; | 1640 | int err; |
1641 | unsigned short val, val2, val_mask; | 1641 | unsigned short val, val2, val_mask; |
1642 | 1642 | ||
@@ -1701,7 +1701,7 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | |||
1701 | struct soc_mixer_control *mc = | 1701 | struct soc_mixer_control *mc = |
1702 | (struct soc_mixer_control *)kcontrol->private_value; | 1702 | (struct soc_mixer_control *)kcontrol->private_value; |
1703 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 1703 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
1704 | uint reg = mc->reg; | 1704 | unsigned int reg = mc->reg; |
1705 | int min = mc->min; | 1705 | int min = mc->min; |
1706 | int val = snd_soc_read(codec, reg); | 1706 | int val = snd_soc_read(codec, reg); |
1707 | 1707 | ||
@@ -1728,7 +1728,7 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, | |||
1728 | struct soc_mixer_control *mc = | 1728 | struct soc_mixer_control *mc = |
1729 | (struct soc_mixer_control *)kcontrol->private_value; | 1729 | (struct soc_mixer_control *)kcontrol->private_value; |
1730 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 1730 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
1731 | uint reg = mc->reg; | 1731 | unsigned int reg = mc->reg; |
1732 | int min = mc->min; | 1732 | int min = mc->min; |
1733 | unsigned short val; | 1733 | unsigned short val; |
1734 | 1734 | ||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index f08be8a329e9..7a88f764daf8 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -106,11 +106,11 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, | |||
106 | int val; | 106 | int val; |
107 | struct soc_mixer_control *mc = (struct soc_mixer_control *) | 107 | struct soc_mixer_control *mc = (struct soc_mixer_control *) |
108 | w->kcontrols[i].private_value; | 108 | w->kcontrols[i].private_value; |
109 | uint reg = mc->reg; | 109 | unsigned int reg = mc->reg; |
110 | uint shift = mc->shift; | 110 | unsigned int shift = mc->shift; |
111 | int max = mc->max; | 111 | int max = mc->max; |
112 | uint mask = (1 << fls(max)) - 1; | 112 | unsigned int mask = (1 << fls(max)) - 1; |
113 | uint invert = mc->invert; | 113 | unsigned int invert = mc->invert; |
114 | 114 | ||
115 | val = snd_soc_read(w->codec, reg); | 115 | val = snd_soc_read(w->codec, reg); |
116 | val = (val >> shift) & mask; | 116 | val = (val >> shift) & mask; |
@@ -252,11 +252,11 @@ static int dapm_set_pga(struct snd_soc_dapm_widget *widget, int power) | |||
252 | if (widget->num_kcontrols && k) { | 252 | if (widget->num_kcontrols && k) { |
253 | struct soc_mixer_control *mc = | 253 | struct soc_mixer_control *mc = |
254 | (struct soc_mixer_control *)k->private_value; | 254 | (struct soc_mixer_control *)k->private_value; |
255 | uint reg = mc->reg; | 255 | unsigned int reg = mc->reg; |
256 | uint shift = mc->shift; | 256 | unsigned int shift = mc->shift; |
257 | int max = mc->max; | 257 | int max = mc->max; |
258 | uint mask = (1 << fls(max)) - 1; | 258 | unsigned int mask = (1 << fls(max)) - 1; |
259 | uint invert = mc->invert; | 259 | unsigned int invert = mc->invert; |
260 | 260 | ||
261 | if (power) { | 261 | if (power) { |
262 | int i; | 262 | int i; |
@@ -1141,12 +1141,12 @@ int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, | |||
1141 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); | 1141 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); |
1142 | struct soc_mixer_control *mc = | 1142 | struct soc_mixer_control *mc = |
1143 | (struct soc_mixer_control *)kcontrol->private_value; | 1143 | (struct soc_mixer_control *)kcontrol->private_value; |
1144 | uint reg = mc->reg; | 1144 | unsigned int reg = mc->reg; |
1145 | uint shift = mc->shift; | 1145 | unsigned int shift = mc->shift; |
1146 | uint rshift = mc->rshift; | 1146 | unsigned int rshift = mc->rshift; |
1147 | int max = mc->max; | 1147 | int max = mc->max; |
1148 | uint invert = mc->invert; | 1148 | unsigned int invert = mc->invert; |
1149 | uint mask = (1 << fls(max)) - 1; | 1149 | unsigned int mask = (1 << fls(max)) - 1; |
1150 | 1150 | ||
1151 | /* return the saved value if we are powered down */ | 1151 | /* return the saved value if we are powered down */ |
1152 | if (widget->id == snd_soc_dapm_pga && !widget->power) { | 1152 | if (widget->id == snd_soc_dapm_pga && !widget->power) { |
@@ -1186,12 +1186,12 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | |||
1186 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); | 1186 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); |
1187 | struct soc_mixer_control *mc = | 1187 | struct soc_mixer_control *mc = |
1188 | (struct soc_mixer_control *)kcontrol->private_value; | 1188 | (struct soc_mixer_control *)kcontrol->private_value; |
1189 | uint reg = mc->reg; | 1189 | unsigned int reg = mc->reg; |
1190 | uint shift = mc->shift; | 1190 | unsigned int shift = mc->shift; |
1191 | uint rshift = mc->rshift; | 1191 | unsigned int rshift = mc->rshift; |
1192 | int max = mc->max; | 1192 | int max = mc->max; |
1193 | uint mask = (1 << fls(max)) - 1; | 1193 | unsigned int mask = (1 << fls(max)) - 1; |
1194 | uint invert = mc->invert; | 1194 | unsigned int invert = mc->invert; |
1195 | unsigned short val, val2, val_mask; | 1195 | unsigned short val, val2, val_mask; |
1196 | int ret; | 1196 | int ret; |
1197 | 1197 | ||