[ALSA] snd-pcsp - fix pcsp_treble_info() to honour an item number

This solves the problem with mixers wrongly displaying the PWM freq.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Stas Sergeev
2008-05-24 18:05:47 +02:00
committed by Takashi Iwai
父節點 97ec710cab
當前提交 97e08f5d73
共有 2 個文件被更改,包括 6 次插入3 次删除

查看文件

@@ -50,7 +50,8 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol,
uinfo->value.enumerated.items = chip->max_treble + 1;
if (uinfo->value.enumerated.item > chip->max_treble)
uinfo->value.enumerated.item = chip->max_treble;
sprintf(uinfo->value.enumerated.name, "%d", PCSP_RATE());
sprintf(uinfo->value.enumerated.name, "%d",
PCSP_CALC_RATE(uinfo->value.enumerated.item));
return 0;
}