diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-30 10:56:30 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:45:13 -0400 |
commit | 680ef792a1afdb3bf38e4a0296cce996a5b95317 (patch) | |
tree | 6259caf21efb03a5f528187413871467d75e3bda /sound | |
parent | 723b2b0d36fa7cea81a962af2d40d88520d5a5f1 (diff) |
[ALSA] Add dB scale information to ice1712 driver
Added the dB scale information for native digital volumes of ice1712 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 9b8325d65d8d..dc69392eafa3 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <sound/cs8427.h> | 62 | #include <sound/cs8427.h> |
63 | #include <sound/info.h> | 63 | #include <sound/info.h> |
64 | #include <sound/initval.h> | 64 | #include <sound/initval.h> |
65 | #include <sound/tlv.h> | ||
65 | 66 | ||
66 | #include <sound/asoundef.h> | 67 | #include <sound/asoundef.h> |
67 | 68 | ||
@@ -1377,6 +1378,7 @@ static int snd_ice1712_pro_mixer_volume_put(struct snd_kcontrol *kcontrol, struc | |||
1377 | return change; | 1378 | return change; |
1378 | } | 1379 | } |
1379 | 1380 | ||
1381 | static DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0); | ||
1380 | 1382 | ||
1381 | static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = { | 1383 | static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = { |
1382 | { | 1384 | { |
@@ -1390,12 +1392,15 @@ static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata | |||
1390 | }, | 1392 | }, |
1391 | { | 1393 | { |
1392 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1394 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1395 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
1396 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
1393 | .name = "Multi Playback Volume", | 1397 | .name = "Multi Playback Volume", |
1394 | .info = snd_ice1712_pro_mixer_volume_info, | 1398 | .info = snd_ice1712_pro_mixer_volume_info, |
1395 | .get = snd_ice1712_pro_mixer_volume_get, | 1399 | .get = snd_ice1712_pro_mixer_volume_get, |
1396 | .put = snd_ice1712_pro_mixer_volume_put, | 1400 | .put = snd_ice1712_pro_mixer_volume_put, |
1397 | .private_value = 0, | 1401 | .private_value = 0, |
1398 | .count = 10, | 1402 | .count = 10, |
1403 | .tlv = { .p = db_scale_playback } | ||
1399 | }, | 1404 | }, |
1400 | }; | 1405 | }; |
1401 | 1406 | ||
@@ -1420,11 +1425,14 @@ static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_switch __devinitd | |||
1420 | 1425 | ||
1421 | static struct snd_kcontrol_new snd_ice1712_multi_capture_analog_volume __devinitdata = { | 1426 | static struct snd_kcontrol_new snd_ice1712_multi_capture_analog_volume __devinitdata = { |
1422 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1427 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1428 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
1429 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
1423 | .name = "H/W Multi Capture Volume", | 1430 | .name = "H/W Multi Capture Volume", |
1424 | .info = snd_ice1712_pro_mixer_volume_info, | 1431 | .info = snd_ice1712_pro_mixer_volume_info, |
1425 | .get = snd_ice1712_pro_mixer_volume_get, | 1432 | .get = snd_ice1712_pro_mixer_volume_get, |
1426 | .put = snd_ice1712_pro_mixer_volume_put, | 1433 | .put = snd_ice1712_pro_mixer_volume_put, |
1427 | .private_value = 10, | 1434 | .private_value = 10, |
1435 | .tlv = { .p = db_scale_playback } | ||
1428 | }; | 1436 | }; |
1429 | 1437 | ||
1430 | static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_volume __devinitdata = { | 1438 | static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_volume __devinitdata = { |