Commit 680ef792 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Add dB scale information to ice1712 driver

Added the dB scale information for native digital volumes of ice1712 driver.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 723b2b0d
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#include <sound/cs8427.h> #include <sound/cs8427.h>
#include <sound/info.h> #include <sound/info.h>
#include <sound/initval.h> #include <sound/initval.h>
#include <sound/tlv.h>
#include <sound/asoundef.h> #include <sound/asoundef.h>
...@@ -1377,6 +1378,7 @@ static int snd_ice1712_pro_mixer_volume_put(struct snd_kcontrol *kcontrol, struc ...@@ -1377,6 +1378,7 @@ static int snd_ice1712_pro_mixer_volume_put(struct snd_kcontrol *kcontrol, struc
return change; return change;
} }
static DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0);
static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = { static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = {
{ {
...@@ -1390,12 +1392,15 @@ static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata ...@@ -1390,12 +1392,15 @@ static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata
}, },
{ {
.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 = "Multi Playback Volume", .name = "Multi Playback Volume",
.info = snd_ice1712_pro_mixer_volume_info, .info = snd_ice1712_pro_mixer_volume_info,
.get = snd_ice1712_pro_mixer_volume_get, .get = snd_ice1712_pro_mixer_volume_get,
.put = snd_ice1712_pro_mixer_volume_put, .put = snd_ice1712_pro_mixer_volume_put,
.private_value = 0, .private_value = 0,
.count = 10, .count = 10,
.tlv = { .p = db_scale_playback }
}, },
}; };
...@@ -1420,11 +1425,14 @@ static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_switch __devinitd ...@@ -1420,11 +1425,14 @@ static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_switch __devinitd
static struct snd_kcontrol_new snd_ice1712_multi_capture_analog_volume __devinitdata = { static struct snd_kcontrol_new snd_ice1712_multi_capture_analog_volume __devinitdata = {
.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 = "H/W Multi Capture Volume", .name = "H/W Multi Capture Volume",
.info = snd_ice1712_pro_mixer_volume_info, .info = snd_ice1712_pro_mixer_volume_info,
.get = snd_ice1712_pro_mixer_volume_get, .get = snd_ice1712_pro_mixer_volume_get,
.put = snd_ice1712_pro_mixer_volume_put, .put = snd_ice1712_pro_mixer_volume_put,
.private_value = 10, .private_value = 10,
.tlv = { .p = db_scale_playback }
}; };
static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_volume __devinitdata = { static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_volume __devinitdata = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment