aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/vx222/vx222_ops.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-08-23 13:53:28 -0400
committerJaroslav Kysela <perex@suse.cz>2006-09-23 04:44:12 -0400
commit1186ed8c7dc9c0185e783beddf241509cc224f1a (patch)
treef24bf18a5d860ab9a4655c6bc8f67a6eb4a2b667 /sound/pci/vx222/vx222_ops.c
parentc6ff77f71fe692fa48fe02dbfe74a01f3d5e55e2 (diff)
[ALSA] Add dB scale information to vxpocket and vx222 drivers
Added the dB scale information to vxpocket and vx222 drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/vx222/vx222_ops.c')
-rw-r--r--sound/pci/vx222/vx222_ops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 9b6d345b83a6..5e51950e05f9 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -28,6 +28,7 @@
28 28
29#include <sound/core.h> 29#include <sound/core.h>
30#include <sound/control.h> 30#include <sound/control.h>
31#include <sound/tlv.h>
31#include <asm/io.h> 32#include <asm/io.h>
32#include "vx222.h" 33#include "vx222.h"
33 34
@@ -845,6 +846,8 @@ static void vx2_set_input_level(struct snd_vx222 *chip)
845 846
846#define MIC_LEVEL_MAX 0xff 847#define MIC_LEVEL_MAX 0xff
847 848
849static DECLARE_TLV_DB_SCALE(db_scale_mic, -6450, 50, 0);
850
848/* 851/*
849 * controls API for input levels 852 * controls API for input levels
850 */ 853 */
@@ -922,18 +925,24 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
922 925
923static struct snd_kcontrol_new vx_control_input_level = { 926static struct snd_kcontrol_new vx_control_input_level = {
924 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 927 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
928 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
929 SNDRV_CTL_ELEM_ACCESS_TLV_READ),
925 .name = "Capture Volume", 930 .name = "Capture Volume",
926 .info = vx_input_level_info, 931 .info = vx_input_level_info,
927 .get = vx_input_level_get, 932 .get = vx_input_level_get,
928 .put = vx_input_level_put, 933 .put = vx_input_level_put,
934 .tlv = { .p = db_scale_mic },
929}; 935};
930 936
931static struct snd_kcontrol_new vx_control_mic_level = { 937static struct snd_kcontrol_new vx_control_mic_level = {
932 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 938 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
939 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
940 SNDRV_CTL_ELEM_ACCESS_TLV_READ),
933 .name = "Mic Capture Volume", 941 .name = "Mic Capture Volume",
934 .info = vx_mic_level_info, 942 .info = vx_mic_level_info,
935 .get = vx_mic_level_get, 943 .get = vx_mic_level_get,
936 .put = vx_mic_level_put, 944 .put = vx_mic_level_put,
945 .tlv = { .p = db_scale_mic },
937}; 946};
938 947
939/* 948/*