aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-08-23 06:14:25 -0400
committerJaroslav Kysela <perex@suse.cz>2006-09-23 04:43:05 -0400
commit9f6ab25063f04597e02968ae8393e8f4703c1563 (patch)
tree279423663dc11dd50d3246a9d3073ded4d706645
parent9107226d2ca8a15534da96313a1d370fb1eb8f9e (diff)
[ALSA] Add dB scale information to cs4281 driver
Added the dB scale information to cs4281 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/pci/cs4281.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 9631456ec3de..1990430a21c1 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -33,6 +33,7 @@
33#include <sound/pcm.h> 33#include <sound/pcm.h>
34#include <sound/rawmidi.h> 34#include <sound/rawmidi.h>
35#include <sound/ac97_codec.h> 35#include <sound/ac97_codec.h>
36#include <sound/tlv.h>
36#include <sound/opl3.h> 37#include <sound/opl3.h>
37#include <sound/initval.h> 38#include <sound/initval.h>
38 39
@@ -1054,6 +1055,8 @@ static int snd_cs4281_put_volume(struct snd_kcontrol *kcontrol,
1054 return change; 1055 return change;
1055} 1056}
1056 1057
1058static DECLARE_TLV_DB_SCALE(db_scale_dsp, -4650, 150, 0);
1059
1057static struct snd_kcontrol_new snd_cs4281_fm_vol = 1060static struct snd_kcontrol_new snd_cs4281_fm_vol =
1058{ 1061{
1059 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1062 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1062,6 +1065,7 @@ static struct snd_kcontrol_new snd_cs4281_fm_vol =
1062 .get = snd_cs4281_get_volume, 1065 .get = snd_cs4281_get_volume,
1063 .put = snd_cs4281_put_volume, 1066 .put = snd_cs4281_put_volume,
1064 .private_value = ((BA0_FMLVC << 16) | BA0_FMRVC), 1067 .private_value = ((BA0_FMLVC << 16) | BA0_FMRVC),
1068 .tlv = { .p = db_scale_dsp },
1065}; 1069};
1066 1070
1067static struct snd_kcontrol_new snd_cs4281_pcm_vol = 1071static struct snd_kcontrol_new snd_cs4281_pcm_vol =
@@ -1072,6 +1076,7 @@ static struct snd_kcontrol_new snd_cs4281_pcm_vol =
1072 .get = snd_cs4281_get_volume, 1076 .get = snd_cs4281_get_volume,
1073 .put = snd_cs4281_put_volume, 1077 .put = snd_cs4281_put_volume,
1074 .private_value = ((BA0_PPLVC << 16) | BA0_PPRVC), 1078 .private_value = ((BA0_PPLVC << 16) | BA0_PPRVC),
1079 .tlv = { .p = db_scale_dsp },
1075}; 1080};
1076 1081
1077static void snd_cs4281_mixer_free_ac97_bus(struct snd_ac97_bus *bus) 1082static void snd_cs4281_mixer_free_ac97_bus(struct snd_ac97_bus *bus)