aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/p16v.c
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2006-07-22 12:02:10 -0400
committerJaroslav Kysela <perex@suse.cz>2006-09-23 04:38:32 -0400
commit31508f83f591dc8764427b6321c89f8f9e84bad2 (patch)
treee8b131303a9397232b33fbaaf5591f097f93af35 /sound/pci/emu10k1/p16v.c
parentfff36e472b4315df77513f4339c5c199c6aad28b (diff)
[ALSA] snd-emu10k1: Implement dB gain infomation.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/emu10k1/p16v.c')
-rw-r--r--sound/pci/emu10k1/p16v.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 9905651935fb..1e44714b8623 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -100,6 +100,7 @@
100#include <sound/pcm.h> 100#include <sound/pcm.h>
101#include <sound/ac97_codec.h> 101#include <sound/ac97_codec.h>
102#include <sound/info.h> 102#include <sound/info.h>
103#include <sound/tlv.h>
103#include <sound/emu10k1.h> 104#include <sound/emu10k1.h>
104#include "p16v.h" 105#include "p16v.h"
105 106
@@ -784,12 +785,16 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
784 } 785 }
785 return change; 786 return change;
786} 787}
788static DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);
787 789
788#define P16V_VOL(xname,xreg,xhl) { \ 790#define P16V_VOL(xname,xreg,xhl) { \
789 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 791 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
792 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \
793 SNDRV_CTL_ELEM_ACCESS_TLV_READ, \
790 .info = snd_p16v_volume_info, \ 794 .info = snd_p16v_volume_info, \
791 .get = snd_p16v_volume_get, \ 795 .get = snd_p16v_volume_get, \
792 .put = snd_p16v_volume_put, \ 796 .put = snd_p16v_volume_put, \
797 .tlv.p = snd_p16v_db_scale1, \
793 .private_value = ((xreg) | ((xhl) << 8)) \ 798 .private_value = ((xreg) | ((xhl) << 8)) \
794} 799}
795 800