diff options
Diffstat (limited to 'sound/sparc')
-rw-r--r-- | sound/sparc/amd7930.c | 3 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 1 | ||||
-rw-r--r-- | sound/sparc/dbri.c | 20 |
3 files changed, 16 insertions, 8 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 07962a35f241..0c63e0585b15 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/moduleparam.h> | 37 | #include <linux/moduleparam.h> |
38 | 38 | ||
39 | #include <sound/driver.h> | ||
40 | #include <sound/core.h> | 39 | #include <sound/core.h> |
41 | #include <sound/pcm.h> | 40 | #include <sound/pcm.h> |
42 | #include <sound/info.h> | 41 | #include <sound/info.h> |
@@ -859,7 +858,7 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem | |||
859 | spin_lock_irqsave(&amd->lock, flags); | 858 | spin_lock_irqsave(&amd->lock, flags); |
860 | 859 | ||
861 | if (*swval != ucontrol->value.integer.value[0]) { | 860 | if (*swval != ucontrol->value.integer.value[0]) { |
862 | *swval = ucontrol->value.integer.value[0]; | 861 | *swval = ucontrol->value.integer.value[0] & 0xff; |
863 | __amd7930_update_map(amd); | 862 | __amd7930_update_map(amd); |
864 | change = 1; | 863 | change = 1; |
865 | } else | 864 | } else |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index f8c7a120ccbb..1c4797be72ee 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | 21 | ||
22 | #include <sound/driver.h> | ||
23 | #include <sound/core.h> | 22 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
25 | #include <sound/info.h> | 24 | #include <sound/info.h> |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 376b98691c96..3d00e0797b11 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -53,7 +53,6 @@ | |||
53 | * other DBRI low-level stuff | 53 | * other DBRI low-level stuff |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <sound/driver.h> | ||
57 | #include <linux/interrupt.h> | 56 | #include <linux/interrupt.h> |
58 | #include <linux/delay.h> | 57 | #include <linux/delay.h> |
59 | #include <linux/irq.h> | 58 | #include <linux/irq.h> |
@@ -2279,14 +2278,25 @@ static int snd_cs4215_put_volume(struct snd_kcontrol *kcontrol, | |||
2279 | struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); | 2278 | struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); |
2280 | struct dbri_streaminfo *info = | 2279 | struct dbri_streaminfo *info = |
2281 | &dbri->stream_info[kcontrol->private_value]; | 2280 | &dbri->stream_info[kcontrol->private_value]; |
2281 | unsigned int vol[2]; | ||
2282 | int changed = 0; | 2282 | int changed = 0; |
2283 | 2283 | ||
2284 | if (info->left_gain != ucontrol->value.integer.value[0]) { | 2284 | vol[0] = ucontrol->value.integer.value[0]; |
2285 | info->left_gain = ucontrol->value.integer.value[0]; | 2285 | vol[1] = ucontrol->value.integer.value[1]; |
2286 | if (kcontrol->private_value == DBRI_PLAY) { | ||
2287 | if (vol[0] > DBRI_MAX_VOLUME || vol[1] > DBRI_MAX_VOLUME) | ||
2288 | return -EINVAL; | ||
2289 | } else { | ||
2290 | if (vol[0] > DBRI_MAX_GAIN || vol[1] > DBRI_MAX_GAIN) | ||
2291 | return -EINVAL; | ||
2292 | } | ||
2293 | |||
2294 | if (info->left_gain != vol[0]) { | ||
2295 | info->left_gain = vol[0]; | ||
2286 | changed = 1; | 2296 | changed = 1; |
2287 | } | 2297 | } |
2288 | if (info->right_gain != ucontrol->value.integer.value[1]) { | 2298 | if (info->right_gain != vol[1]) { |
2289 | info->right_gain = ucontrol->value.integer.value[1]; | 2299 | info->right_gain = vol[1]; |
2290 | changed = 1; | 2300 | changed = 1; |
2291 | } | 2301 | } |
2292 | if (changed) { | 2302 | if (changed) { |