diff options
author | Jaroslav Kysela <perex@suse.cz> | 2006-06-01 12:34:01 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:36:42 -0400 |
commit | 42750b04c5baa7c5ffdf0a8be2b9b320efdf069f (patch) | |
tree | 52aea8f1eeb44405b67bc5b381cce6bc20e2bff6 /sound/pci/ca0106 | |
parent | 3eeab61aa3ddd3c0bedb7449ada1599de22fdb5a (diff) |
[ALSA] Control API - TLV implementation for additional information like dB scale
This patch implements a TLV mechanism to transfer an additional information
like dB scale to the user space. The types might be extended in future.
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ca0106')
-rw-r--r-- | sound/pci/ca0106/ca0106_mixer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 146eed70dce6..35309b3ed8c0 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -70,9 +70,12 @@ | |||
70 | #include <sound/pcm.h> | 70 | #include <sound/pcm.h> |
71 | #include <sound/ac97_codec.h> | 71 | #include <sound/ac97_codec.h> |
72 | #include <sound/info.h> | 72 | #include <sound/info.h> |
73 | #include <sound/tlv.h> | ||
73 | 74 | ||
74 | #include "ca0106.h" | 75 | #include "ca0106.h" |
75 | 76 | ||
77 | static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale, -5150, 75, 1); | ||
78 | |||
76 | static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, | 79 | static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, |
77 | struct snd_ctl_elem_info *uinfo) | 80 | struct snd_ctl_elem_info *uinfo) |
78 | { | 81 | { |
@@ -472,6 +475,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
472 | .info = snd_ca0106_volume_info, \ | 475 | .info = snd_ca0106_volume_info, \ |
473 | .get = snd_ca0106_volume_get, \ | 476 | .get = snd_ca0106_volume_get, \ |
474 | .put = snd_ca0106_volume_put, \ | 477 | .put = snd_ca0106_volume_put, \ |
478 | .tlv = snd_ca0106_db_scale, \ | ||
475 | .private_value = ((chid) << 8) | (reg) \ | 479 | .private_value = ((chid) << 8) | (reg) \ |
476 | } | 480 | } |
477 | 481 | ||