From 97e08f5d732bbfd5180f73aa7875d328421bee8a Mon Sep 17 00:00:00 2001
From: Stas Sergeev <stsp@aknet.ru>
Date: Sat, 24 May 2008 18:05:47 +0200
Subject: [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>
---
 sound/drivers/pcsp/pcsp_mixer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'sound/drivers/pcsp/pcsp_mixer.c')

diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c
index 64a695fef74e..caeb0f57fcca 100644
--- a/sound/drivers/pcsp/pcsp_mixer.c
+++ b/sound/drivers/pcsp/pcsp_mixer.c
@@ -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;
 }
 
-- 
cgit v1.2.2