aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sh')
-rw-r--r--sound/sh/aica.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 8861d2f7796e..12c41df255a1 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -523,11 +523,14 @@ static int aica_pcmvolume_put(struct snd_kcontrol *kcontrol,
523 struct snd_ctl_elem_value *ucontrol) 523 struct snd_ctl_elem_value *ucontrol)
524{ 524{
525 struct snd_card_aica *dreamcastcard; 525 struct snd_card_aica *dreamcastcard;
526 unsigned int vol;
526 dreamcastcard = kcontrol->private_data; 527 dreamcastcard = kcontrol->private_data;
527 if (unlikely(!dreamcastcard->channel)) 528 if (unlikely(!dreamcastcard->channel))
528 return -ETXTBSY; 529 return -ETXTBSY;
529 if (unlikely(dreamcastcard->channel->vol == 530 vol = ucontrol->value.integer.value[0];
530 ucontrol->value.integer.value[0])) 531 if (vol > 0xff)
532 return -EINVAL;
533 if (unlikely(dreamcastcard->channel->vol == vol))
531 return 0; 534 return 0;
532 dreamcastcard->channel->vol = ucontrol->value.integer.value[0]; 535 dreamcastcard->channel->vol = ucontrol->value.integer.value[0];
533 dreamcastcard->master_volume = ucontrol->value.integer.value[0]; 536 dreamcastcard->master_volume = ucontrol->value.integer.value[0];