aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sparc')
-rw-r--r--sound/sparc/amd7930.c2
-rw-r--r--sound/sparc/dbri.c13
2 files changed, 13 insertions, 2 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 07962a35f241..b1d431587158 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -859,7 +859,7 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem
859 spin_lock_irqsave(&amd->lock, flags); 859 spin_lock_irqsave(&amd->lock, flags);
860 860
861 if (*swval != ucontrol->value.integer.value[0]) { 861 if (*swval != ucontrol->value.integer.value[0]) {
862 *swval = ucontrol->value.integer.value[0]; 862 *swval = ucontrol->value.integer.value[0] & 0xff;
863 __amd7930_update_map(amd); 863 __amd7930_update_map(amd);
864 change = 1; 864 change = 1;
865 } else 865 } else
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 376b98691c96..af1bf4bf9459 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2279,9 +2279,20 @@ static int snd_cs4215_put_volume(struct snd_kcontrol *kcontrol,
2279 struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); 2279 struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol);
2280 struct dbri_streaminfo *info = 2280 struct dbri_streaminfo *info =
2281 &dbri->stream_info[kcontrol->private_value]; 2281 &dbri->stream_info[kcontrol->private_value];
2282 unsigned int vol[2];
2282 int changed = 0; 2283 int changed = 0;
2283 2284
2284 if (info->left_gain != ucontrol->value.integer.value[0]) { 2285 vol[0] = ucontrol->value.integer.value[0];
2286 vol[1] = ucontrol->value.integer.value[1];
2287 if (kcontrol->private_value == DBRI_PLAY) {
2288 if (vol[0] > DBRI_MAX_VOLUME || vol[1] > DBRI_MAX_VOLUME)
2289 return -EINVAL;
2290 } else {
2291 if (vol[0] > DBRI_MAX_GAIN || vol[1] > DBRI_MAX_GAIN)
2292 return -EINVAL;
2293 }
2294
2295 if (info->left_gain !=
2285 info->left_gain = ucontrol->value.integer.value[0]; 2296 info->left_gain = ucontrol->value.integer.value[0];
2286 changed = 1; 2297 changed = 1;
2287 } 2298 }