Commit fff36e47 authored by James Courtier-Dutton's avatar James Courtier-Dutton Committed by Jaroslav Kysela

[ALSA] snd-ca0106: Fix dB gain TLVs.

Signed-off-by: default avatarJames Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent f1265391
...@@ -74,7 +74,8 @@ ...@@ -74,7 +74,8 @@
#include "ca0106.h" #include "ca0106.h"
static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale, -5150, 75, 1); static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1);
static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1);
static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) struct snd_ctl_elem_info *uinfo)
...@@ -477,16 +478,19 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, ...@@ -477,16 +478,19 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol,
.info = snd_ca0106_volume_info, \ .info = snd_ca0106_volume_info, \
.get = snd_ca0106_volume_get, \ .get = snd_ca0106_volume_get, \
.put = snd_ca0106_volume_put, \ .put = snd_ca0106_volume_put, \
.tlv.p = snd_ca0106_db_scale, \ .tlv.p = snd_ca0106_db_scale1, \
.private_value = ((chid) << 8) | (reg) \ .private_value = ((chid) << 8) | (reg) \
} }
#define I2C_VOLUME(xname,chid) \ #define I2C_VOLUME(xname,chid) \
{ \ { \
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \
SNDRV_CTL_ELEM_ACCESS_TLV_READ, \
.info = snd_ca0106_i2c_volume_info, \ .info = snd_ca0106_i2c_volume_info, \
.get = snd_ca0106_i2c_volume_get, \ .get = snd_ca0106_i2c_volume_get, \
.put = snd_ca0106_i2c_volume_put, \ .put = snd_ca0106_i2c_volume_put, \
.tlv.p = snd_ca0106_db_scale2, \
.private_value = chid \ .private_value = chid \
} }
......
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