summaryrefslogtreecommitdiff
path: root/sound/pci/ice1712/pontis.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-08-30 16:57:37 +0200
committerJaroslav Kysela <perex@suse.cz>2006-09-23 10:45:18 +0200
commitf640c3205aca4fe231beccc9e719c946cf3fee7a (patch)
tree4fd4b1db6e426e2640be9eaecab71f14ab27d1cc /sound/pci/ice1712/pontis.c
parent680ef792a1afdb3bf38e4a0296cce996a5b95317 (diff)
[ALSA] Add dB scale information to ice1724 driver
Added the dB scale information to each board support code of ice1724 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ice1712/pontis.c')
-rw-r--r--sound/pci/ice1712/pontis.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
index 0efcad9260a5..6c74c2d2e7f3 100644
--- a/sound/pci/ice1712/pontis.c
+++ b/sound/pci/ice1712/pontis.c
@@ -31,6 +31,7 @@
#include <sound/core.h>
#include <sound/info.h>
+#include <sound/tlv.h>
#include "ice1712.h"
#include "envy24ht.h"
@@ -564,6 +565,8 @@ static int pontis_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
return changed;
}
+static DECLARE_TLV_DB_SCALE(db_scale_volume, -6400, 50, 1);
+
/*
* mixers
*/
@@ -571,17 +574,23 @@ static int pontis_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
static struct snd_kcontrol_new pontis_controls[] __devinitdata = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ),
.name = "PCM Playback Volume",
.info = wm_dac_vol_info,
.get = wm_dac_vol_get,
.put = wm_dac_vol_put,
+ .tlv = { .p = db_scale_volume },
},
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ),
.name = "Capture Volume",
.info = wm_adc_vol_info,
.get = wm_adc_vol_get,
.put = wm_adc_vol_put,
+ .tlv = { .p = db_scale_volume },
},
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,