diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2006-07-22 10:02:48 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:38:26 -0400 |
commit | fff36e472b4315df77513f4339c5c199c6aad28b (patch) | |
tree | 02c3041d3c006520cb4056847c27b30cdd48254d /sound/pci/ca0106/ca0106_mixer.c | |
parent | f1265391ea002a28933dc1a8a55948c0ed64c9d0 (diff) |
[ALSA] snd-ca0106: Fix dB gain TLVs.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ca0106/ca0106_mixer.c')
-rw-r--r-- | sound/pci/ca0106/ca0106_mixer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index df75270939ac..6d64438cecc9 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -74,7 +74,8 @@ | |||
74 | 74 | ||
75 | #include "ca0106.h" | 75 | #include "ca0106.h" |
76 | 76 | ||
77 | static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale, -5150, 75, 1); | 77 | static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1); |
78 | static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1); | ||
78 | 79 | ||
79 | static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, | 80 | static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, |
80 | struct snd_ctl_elem_info *uinfo) | 81 | struct snd_ctl_elem_info *uinfo) |
@@ -477,16 +478,19 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
477 | .info = snd_ca0106_volume_info, \ | 478 | .info = snd_ca0106_volume_info, \ |
478 | .get = snd_ca0106_volume_get, \ | 479 | .get = snd_ca0106_volume_get, \ |
479 | .put = snd_ca0106_volume_put, \ | 480 | .put = snd_ca0106_volume_put, \ |
480 | .tlv.p = snd_ca0106_db_scale, \ | 481 | .tlv.p = snd_ca0106_db_scale1, \ |
481 | .private_value = ((chid) << 8) | (reg) \ | 482 | .private_value = ((chid) << 8) | (reg) \ |
482 | } | 483 | } |
483 | 484 | ||
484 | #define I2C_VOLUME(xname,chid) \ | 485 | #define I2C_VOLUME(xname,chid) \ |
485 | { \ | 486 | { \ |
486 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 487 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
488 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ | ||
489 | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \ | ||
487 | .info = snd_ca0106_i2c_volume_info, \ | 490 | .info = snd_ca0106_i2c_volume_info, \ |
488 | .get = snd_ca0106_i2c_volume_get, \ | 491 | .get = snd_ca0106_i2c_volume_get, \ |
489 | .put = snd_ca0106_i2c_volume_put, \ | 492 | .put = snd_ca0106_i2c_volume_put, \ |
493 | .tlv.p = snd_ca0106_db_scale2, \ | ||
490 | .private_value = chid \ | 494 | .private_value = chid \ |
491 | } | 495 | } |
492 | 496 | ||