diff options
Diffstat (limited to 'sound/pci/mixart/mixart_mixer.c')
-rw-r--r-- | sound/pci/mixart/mixart_mixer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c index 6fdda1f70b25..3ba6174c3df1 100644 --- a/sound/pci/mixart/mixart_mixer.c +++ b/sound/pci/mixart/mixart_mixer.c | |||
@@ -837,7 +837,7 @@ static int mixart_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem | |||
837 | if(is_aes) stored_volume = chip->digital_capture_volume[1]; /* AES capture */ | 837 | if(is_aes) stored_volume = chip->digital_capture_volume[1]; /* AES capture */ |
838 | else stored_volume = chip->digital_capture_volume[0]; /* analog capture */ | 838 | else stored_volume = chip->digital_capture_volume[0]; /* analog capture */ |
839 | } else { | 839 | } else { |
840 | snd_assert ( idx < MIXART_PLAYBACK_STREAMS ); | 840 | snd_BUG_ON(idx >= MIXART_PLAYBACK_STREAMS); |
841 | if(is_aes) stored_volume = chip->digital_playback_volume[MIXART_PLAYBACK_STREAMS + idx]; /* AES playback */ | 841 | if(is_aes) stored_volume = chip->digital_playback_volume[MIXART_PLAYBACK_STREAMS + idx]; /* AES playback */ |
842 | else stored_volume = chip->digital_playback_volume[idx]; /* analog playback */ | 842 | else stored_volume = chip->digital_playback_volume[idx]; /* analog playback */ |
843 | } | 843 | } |
@@ -863,7 +863,7 @@ static int mixart_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem | |||
863 | else /* analog capture */ | 863 | else /* analog capture */ |
864 | stored_volume = chip->digital_capture_volume[0]; | 864 | stored_volume = chip->digital_capture_volume[0]; |
865 | } else { | 865 | } else { |
866 | snd_assert ( idx < MIXART_PLAYBACK_STREAMS ); | 866 | snd_BUG_ON(idx >= MIXART_PLAYBACK_STREAMS); |
867 | if (is_aes) /* AES playback */ | 867 | if (is_aes) /* AES playback */ |
868 | stored_volume = chip->digital_playback_volume[MIXART_PLAYBACK_STREAMS + idx]; | 868 | stored_volume = chip->digital_playback_volume[MIXART_PLAYBACK_STREAMS + idx]; |
869 | else /* analog playback */ | 869 | else /* analog playback */ |
@@ -909,7 +909,7 @@ static int mixart_pcm_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_ | |||
909 | { | 909 | { |
910 | struct snd_mixart *chip = snd_kcontrol_chip(kcontrol); | 910 | struct snd_mixart *chip = snd_kcontrol_chip(kcontrol); |
911 | int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); /* index */ | 911 | int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); /* index */ |
912 | snd_assert ( idx < MIXART_PLAYBACK_STREAMS ); | 912 | snd_BUG_ON(idx >= MIXART_PLAYBACK_STREAMS); |
913 | mutex_lock(&chip->mgr->mixer_mutex); | 913 | mutex_lock(&chip->mgr->mixer_mutex); |
914 | if(kcontrol->private_value & MIXART_VOL_AES_MASK) /* AES playback */ | 914 | if(kcontrol->private_value & MIXART_VOL_AES_MASK) /* AES playback */ |
915 | idx += MIXART_PLAYBACK_STREAMS; | 915 | idx += MIXART_PLAYBACK_STREAMS; |
@@ -926,7 +926,7 @@ static int mixart_pcm_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_ | |||
926 | int is_aes = kcontrol->private_value & MIXART_VOL_AES_MASK; | 926 | int is_aes = kcontrol->private_value & MIXART_VOL_AES_MASK; |
927 | int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); /* index */ | 927 | int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); /* index */ |
928 | int i, j; | 928 | int i, j; |
929 | snd_assert ( idx < MIXART_PLAYBACK_STREAMS ); | 929 | snd_BUG_ON(idx >= MIXART_PLAYBACK_STREAMS); |
930 | mutex_lock(&chip->mgr->mixer_mutex); | 930 | mutex_lock(&chip->mgr->mixer_mutex); |
931 | j = idx; | 931 | j = idx; |
932 | if (is_aes) | 932 | if (is_aes) |