[ALSA] ice1724 - Check value ranges in ctl callbacks
Check the value ranges in ctl put callbacks properly. Also fixed the wrong access type to enum elements in aureon.c. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
此提交包含在:
@@ -241,7 +241,7 @@ static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
|
||||
|
||||
for (i = 0; i < 2; ++i) {
|
||||
reg = STAC946X_MIC_L_VOLUME + i;
|
||||
nvol = ucontrol->value.integer.value[i];
|
||||
nvol = ucontrol->value.integer.value[i] & 0x0f;
|
||||
ovol = 0x0f - stac9460_get(ice, reg);
|
||||
change = ((ovol & 0x0f) != nvol);
|
||||
if (change)
|
||||
|
新增問題並參考
封鎖使用者