|
@@ -23,6 +23,7 @@
|
|
#include <sound/driver.h>
|
|
#include <sound/driver.h>
|
|
#include <sound/core.h>
|
|
#include <sound/core.h>
|
|
#include <sound/control.h>
|
|
#include <sound/control.h>
|
|
|
|
+#include <sound/tlv.h>
|
|
#include "vxpocket.h"
|
|
#include "vxpocket.h"
|
|
|
|
|
|
#define MIC_LEVEL_MIN 0
|
|
#define MIC_LEVEL_MIN 0
|
|
@@ -63,12 +64,17 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static DECLARE_TLV_DB_SCALE(db_scale_mic, -21, 3, 0);
|
|
|
|
+
|
|
static struct snd_kcontrol_new vx_control_mic_level = {
|
|
static struct snd_kcontrol_new vx_control_mic_level = {
|
|
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
|
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
|
|
|
+ .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
|
|
|
|
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ),
|
|
.name = "Mic Capture Volume",
|
|
.name = "Mic Capture Volume",
|
|
.info = vx_mic_level_info,
|
|
.info = vx_mic_level_info,
|
|
.get = vx_mic_level_get,
|
|
.get = vx_mic_level_get,
|
|
.put = vx_mic_level_put,
|
|
.put = vx_mic_level_put,
|
|
|
|
+ .tlv = { .p = db_scale_mic },
|
|
};
|
|
};
|
|
|
|
|
|
/*
|
|
/*
|