aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/ad1848.h2
-rw-r--r--include/sound/control.h4
-rw-r--r--include/sound/emu10k1.h2
-rw-r--r--include/sound/vx_core.h2
-rw-r--r--sound/drivers/dummy.c2
-rw-r--r--sound/drivers/vx/vx_mixer.c2
-rw-r--r--sound/i2c/other/ak4xxx-adda.c10
-rw-r--r--sound/i2c/other/pt2258.c2
-rw-r--r--sound/isa/ad1816a/ad1816a_lib.c10
-rw-r--r--sound/isa/ad1848/ad1848_lib.c6
-rw-r--r--sound/isa/opl3sa2.c4
-rw-r--r--sound/pci/ac97/ac97_codec.c16
-rw-r--r--sound/pci/ac97/ac97_patch.c6
-rw-r--r--sound/pci/ac97/ak4531_codec.c6
-rw-r--r--sound/pci/ca0106/ca0106_mixer.c4
-rw-r--r--sound/pci/cs4281.c2
-rw-r--r--sound/pci/echoaudio/echoaudio.c4
-rw-r--r--sound/pci/emu10k1/emufx.c4
-rw-r--r--sound/pci/emu10k1/emumixer.c2
-rw-r--r--sound/pci/emu10k1/p16v.c2
-rw-r--r--sound/pci/es1938.c2
-rw-r--r--sound/pci/fm801.c2
-rw-r--r--sound/pci/ice1712/aureon.c10
-rw-r--r--sound/pci/ice1712/ice1712.c2
-rw-r--r--sound/pci/ice1712/phase.c4
-rw-r--r--sound/pci/ice1712/pontis.c2
-rw-r--r--sound/pci/ice1712/prodigy192.c4
-rw-r--r--sound/pci/mixart/mixart_mixer.c4
-rw-r--r--sound/pci/pcxhr/pcxhr_mixer.c6
-rw-r--r--sound/pci/trident/trident_main.c4
-rw-r--r--sound/pci/via82xx.c2
-rw-r--r--sound/pci/vx222/vx222.c4
-rw-r--r--sound/pci/vx222/vx222_ops.c2
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c2
-rw-r--r--sound/pcmcia/vx/vxp_mixer.c2
-rw-r--r--sound/pcmcia/vx/vxpocket.c2
36 files changed, 73 insertions, 73 deletions
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index c8de6f83338f..b2c3f00a9b35 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -185,7 +185,7 @@ struct ad1848_mix_elem {
185 int index; 185 int index;
186 int type; 186 int type;
187 unsigned long private_value; 187 unsigned long private_value;
188 unsigned int *tlv; 188 const unsigned int *tlv;
189}; 189};
190 190
191#define AD1848_SINGLE(xname, xindex, reg, shift, mask, invert) \ 191#define AD1848_SINGLE(xname, xindex, reg, shift, mask, invert) \
diff --git a/include/sound/control.h b/include/sound/control.h
index f1361d6694ff..72e759f619b1 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -49,7 +49,7 @@ struct snd_kcontrol_new {
49 snd_kcontrol_put_t *put; 49 snd_kcontrol_put_t *put;
50 union { 50 union {
51 snd_kcontrol_tlv_rw_t *c; 51 snd_kcontrol_tlv_rw_t *c;
52 unsigned int *p; 52 const unsigned int *p;
53 } tlv; 53 } tlv;
54 unsigned long private_value; 54 unsigned long private_value;
55}; 55};
@@ -69,7 +69,7 @@ struct snd_kcontrol {
69 snd_kcontrol_put_t *put; 69 snd_kcontrol_put_t *put;
70 union { 70 union {
71 snd_kcontrol_tlv_rw_t *c; 71 snd_kcontrol_tlv_rw_t *c;
72 unsigned int *p; 72 const unsigned int *p;
73 } tlv; 73 } tlv;
74 unsigned long private_value; 74 unsigned long private_value;
75 void *private_data; 75 void *private_data;
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 975df288ce49..eb7ce96ddf3a 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1903,7 +1903,7 @@ struct snd_emu10k1_fx8010_control_gpr {
1903 unsigned int min; /* minimum range */ 1903 unsigned int min; /* minimum range */
1904 unsigned int max; /* maximum range */ 1904 unsigned int max; /* maximum range */
1905 unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ 1905 unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
1906 unsigned int *tlv; 1906 const unsigned int *tlv;
1907}; 1907};
1908 1908
1909/* old ABI without TLV support */ 1909/* old ABI without TLV support */
diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index 217394652090..4830651cc4cf 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -128,7 +128,7 @@ struct snd_vx_hardware {
128 unsigned int num_ins; 128 unsigned int num_ins;
129 unsigned int num_outs; 129 unsigned int num_outs;
130 unsigned int output_level_max; 130 unsigned int output_level_max;
131 unsigned int *output_level_db_scale; 131 const unsigned int *output_level_db_scale;
132}; 132};
133 133
134/* hwdep id string */ 134/* hwdep id string */
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 42001efa9f3e..8339bad969ba 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -501,7 +501,7 @@ static int snd_dummy_volume_put(struct snd_kcontrol *kcontrol,
501 return change; 501 return change;
502} 502}
503 503
504static DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0); 504static const DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0);
505 505
506#define DUMMY_CAPSRC(xname, xindex, addr) \ 506#define DUMMY_CAPSRC(xname, xindex, addr) \
507{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ 507{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c
index 1613ed844ac6..f63152a6a223 100644
--- a/sound/drivers/vx/vx_mixer.c
+++ b/sound/drivers/vx/vx_mixer.c
@@ -716,7 +716,7 @@ static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
716 return 0; 716 return 0;
717} 717}
718 718
719static DECLARE_TLV_DB_SCALE(db_scale_audio_gain, -10975, 25, 0); 719static const DECLARE_TLV_DB_SCALE(db_scale_audio_gain, -10975, 25, 0);
720 720
721static struct snd_kcontrol_new vx_control_audio_gain = { 721static struct snd_kcontrol_new vx_control_audio_gain = {
722 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 722 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index 3d9d6c5d354e..8805110017a7 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -162,17 +162,17 @@ static const unsigned char vol_cvt_datt[128] = {
162/* 162/*
163 * dB tables 163 * dB tables
164 */ 164 */
165static DECLARE_TLV_DB_SCALE(db_scale_vol_datt, -6350, 50, 1); 165static const DECLARE_TLV_DB_SCALE(db_scale_vol_datt, -6350, 50, 1);
166static DECLARE_TLV_DB_SCALE(db_scale_8bit, -12750, 50, 1); 166static const DECLARE_TLV_DB_SCALE(db_scale_8bit, -12750, 50, 1);
167static DECLARE_TLV_DB_SCALE(db_scale_7bit, -6350, 50, 1); 167static const DECLARE_TLV_DB_SCALE(db_scale_7bit, -6350, 50, 1);
168static DECLARE_TLV_DB_LINEAR(db_scale_linear, TLV_DB_GAIN_MUTE, 0); 168static const DECLARE_TLV_DB_LINEAR(db_scale_linear, TLV_DB_GAIN_MUTE, 0);
169 169
170/* 170/*
171 * initialize all the ak4xxx chips 171 * initialize all the ak4xxx chips
172 */ 172 */
173void snd_akm4xxx_init(struct snd_akm4xxx *ak) 173void snd_akm4xxx_init(struct snd_akm4xxx *ak)
174{ 174{
175 static unsigned char inits_ak4524[] = { 175 static const unsigned char inits_ak4524[] = {
176 0x00, 0x07, /* 0: all power up */ 176 0x00, 0x07, /* 0: all power up */
177 0x01, 0x00, /* 1: ADC/DAC reset */ 177 0x01, 0x00, /* 1: ADC/DAC reset */
178 0x02, 0x60, /* 2: 24bit I2S */ 178 0x02, 0x60, /* 2: 24bit I2S */
diff --git a/sound/i2c/other/pt2258.c b/sound/i2c/other/pt2258.c
index 50df1df2f2b9..e91cc3b44de5 100644
--- a/sound/i2c/other/pt2258.c
+++ b/sound/i2c/other/pt2258.c
@@ -185,7 +185,7 @@ static int pt2258_switch_put(struct snd_kcontrol *kcontrol,
185 return -EIO; 185 return -EIO;
186} 186}
187 187
188static DECLARE_TLV_DB_SCALE(pt2258_db_scale, -7900, 100, 0); 188static const DECLARE_TLV_DB_SCALE(pt2258_db_scale, -7900, 100, 0);
189 189
190int snd_pt2258_build_controls(struct snd_pt2258 *pt) 190int snd_pt2258_build_controls(struct snd_pt2258 *pt)
191{ 191{
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index b524e0d9ee44..ec9209cd5177 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -906,11 +906,11 @@ static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_
906 return change; 906 return change;
907} 907}
908 908
909static DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0); 909static const DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
910static DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0); 910static const DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
911static DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0); 911static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
912static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0); 912static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
913static DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0); 913static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
914 914
915static struct snd_kcontrol_new snd_ad1816a_controls[] __devinitdata = { 915static struct snd_kcontrol_new snd_ad1816a_controls[] __devinitdata = {
916AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1), 916AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1),
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index 666b3bcc19f0..8094282c2ae1 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -1223,9 +1223,9 @@ int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip,
1223 1223
1224EXPORT_SYMBOL(snd_ad1848_add_ctl_elem); 1224EXPORT_SYMBOL(snd_ad1848_add_ctl_elem);
1225 1225
1226static DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0); 1226static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
1227static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0); 1227static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
1228static DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0); 1228static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
1229 1229
1230static struct ad1848_mix_elem snd_ad1848_controls[] = { 1230static struct ad1848_mix_elem snd_ad1848_controls[] = {
1231AD1848_DOUBLE("PCM Playback Switch", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1), 1231AD1848_DOUBLE("PCM Playback Switch", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1),
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 419b4ebbf00e..1e30713d2cad 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -486,8 +486,8 @@ static int snd_opl3sa2_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_
486 return change; 486 return change;
487} 487}
488 488
489static DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0); 489static const DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0);
490static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0); 490static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
491 491
492static struct snd_kcontrol_new snd_opl3sa2_controls[] = { 492static struct snd_kcontrol_new snd_opl3sa2_controls[] = {
493OPL3SA2_DOUBLE("Master Playback Switch", 0, 0x07, 0x08, 7, 7, 1, 1), 493OPL3SA2_DOUBLE("Master Playback Switch", 0, 0x07, 0x08, 7, 7, 1, 1),
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index bd8cfdcfbdf1..8b7853c14b5b 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1190,13 +1190,13 @@ static int snd_ac97_cmute_new_stereo(struct snd_card *card, char *name, int reg,
1190/* 1190/*
1191 * set dB information 1191 * set dB information
1192 */ 1192 */
1193static DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0); 1193static const DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
1194static DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0); 1194static const DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
1195static DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0); 1195static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
1196static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0); 1196static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
1197static DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0); 1197static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
1198 1198
1199static unsigned int *find_db_scale(unsigned int maxval) 1199static const unsigned int *find_db_scale(unsigned int maxval)
1200{ 1200{
1201 switch (maxval) { 1201 switch (maxval) {
1202 case 0x0f: return db_scale_4bit; 1202 case 0x0f: return db_scale_4bit;
@@ -1206,8 +1206,8 @@ static unsigned int *find_db_scale(unsigned int maxval)
1206 return NULL; 1206 return NULL;
1207} 1207}
1208 1208
1209static void set_tlv_db_scale(struct snd_kcontrol *kctl, unsigned int *tlv) 1209static void set_tlv_db_scale(struct snd_kcontrol *kctl, const unsigned int *tlv)
1210{ 1210{
1211 kctl->tlv.p = tlv; 1211 kctl->tlv.p = tlv;
1212 if (tlv) 1212 if (tlv)
1213 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; 1213 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index f1950fa1f0ef..641d0c8d659e 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -54,7 +54,7 @@ static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontro
54 54
55/* replace with a new TLV */ 55/* replace with a new TLV */
56static void reset_tlv(struct snd_ac97 *ac97, const char *name, 56static void reset_tlv(struct snd_ac97 *ac97, const char *name,
57 unsigned int *tlv) 57 const unsigned int *tlv)
58{ 58{
59 struct snd_ctl_elem_id sid; 59 struct snd_ctl_elem_id sid;
60 struct snd_kcontrol *kctl; 60 struct snd_kcontrol *kctl;
@@ -1569,7 +1569,7 @@ static const struct snd_kcontrol_new snd_ac97_controls_ad1885[] = {
1569 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */ 1569 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */
1570}; 1570};
1571 1571
1572static DECLARE_TLV_DB_SCALE(db_scale_6bit_6db_max, -8850, 150, 0); 1572static const DECLARE_TLV_DB_SCALE(db_scale_6bit_6db_max, -8850, 150, 0);
1573 1573
1574static int patch_ad1885_specific(struct snd_ac97 * ac97) 1574static int patch_ad1885_specific(struct snd_ac97 * ac97)
1575{ 1575{
@@ -2527,7 +2527,7 @@ static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc650[] = {
2527 /* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */ 2527 /* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */
2528}; 2528};
2529 2529
2530static DECLARE_TLV_DB_SCALE(db_scale_5bit_3db_max, -4350, 150, 0); 2530static const DECLARE_TLV_DB_SCALE(db_scale_5bit_3db_max, -4350, 150, 0);
2531 2531
2532static int patch_alc650_specific(struct snd_ac97 * ac97) 2532static int patch_alc650_specific(struct snd_ac97 * ac97)
2533{ 2533{
diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
index c153cb79c518..dc26820a03a5 100644
--- a/sound/pci/ac97/ak4531_codec.c
+++ b/sound/pci/ac97/ak4531_codec.c
@@ -267,9 +267,9 @@ static int snd_ak4531_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl
267 return change; 267 return change;
268} 268}
269 269
270static DECLARE_TLV_DB_SCALE(db_scale_master, -6200, 200, 0); 270static const DECLARE_TLV_DB_SCALE(db_scale_master, -6200, 200, 0);
271static DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0); 271static const DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0);
272static DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0); 272static const DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0);
273 273
274static struct snd_kcontrol_new snd_ak4531_controls[] = { 274static struct snd_kcontrol_new snd_ak4531_controls[] = {
275 275
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c
index 289f78a41608..b913a1fb8c21 100644
--- a/sound/pci/ca0106/ca0106_mixer.c
+++ b/sound/pci/ca0106/ca0106_mixer.c
@@ -74,8 +74,8 @@
74 74
75#include "ca0106.h" 75#include "ca0106.h"
76 76
77static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1); 77static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1);
78static DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1); 78static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1);
79 79
80static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, 80static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol,
81 struct snd_ctl_elem_info *uinfo) 81 struct snd_ctl_elem_info *uinfo)
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 8e5519de7115..44cf54607647 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1055,7 +1055,7 @@ static int snd_cs4281_put_volume(struct snd_kcontrol *kcontrol,
1055 return change; 1055 return change;
1056} 1056}
1057 1057
1058static DECLARE_TLV_DB_SCALE(db_scale_dsp, -4650, 150, 0); 1058static const DECLARE_TLV_DB_SCALE(db_scale_dsp, -4650, 150, 0);
1059 1059
1060static struct snd_kcontrol_new snd_cs4281_fm_vol = 1060static struct snd_kcontrol_new snd_cs4281_fm_vol =
1061{ 1061{
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 3410bd4450ad..6a428b81dba6 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -34,7 +34,7 @@ module_param_array(enable, bool, NULL, 0444);
34MODULE_PARM_DESC(enable, "Enable " ECHOCARD_NAME " soundcard."); 34MODULE_PARM_DESC(enable, "Enable " ECHOCARD_NAME " soundcard.");
35 35
36static unsigned int channels_list[10] = {1, 2, 4, 6, 8, 10, 12, 14, 16, 999999}; 36static unsigned int channels_list[10] = {1, 2, 4, 6, 8, 10, 12, 14, 16, 999999};
37static DECLARE_TLV_DB_SCALE(db_scale_output_gain, -12800, 100, 1); 37static const DECLARE_TLV_DB_SCALE(db_scale_output_gain, -12800, 100, 1);
38 38
39static int get_firmware(const struct firmware **fw_entry, 39static int get_firmware(const struct firmware **fw_entry,
40 const struct firmware *frm, struct echoaudio *chip) 40 const struct firmware *frm, struct echoaudio *chip)
@@ -1085,7 +1085,7 @@ static int snd_echo_input_gain_put(struct snd_kcontrol *kcontrol,
1085 return changed; 1085 return changed;
1086} 1086}
1087 1087
1088static DECLARE_TLV_DB_SCALE(db_scale_input_gain, -2500, 50, 0); 1088static const DECLARE_TLV_DB_SCALE(db_scale_input_gain, -2500, 50, 0);
1089 1089
1090static struct snd_kcontrol_new snd_echo_line_input_gain __devinitdata = { 1090static struct snd_kcontrol_new snd_echo_line_input_gain __devinitdata = {
1091 .name = "Line Capture Volume", 1091 .name = "Line Capture Volume",
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 7b173c496953..c02012cccd8e 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -296,7 +296,7 @@ static const u32 db_table[101] = {
296}; 296};
297 297
298/* EMU10k1/EMU10k2 DSP control db gain */ 298/* EMU10k1/EMU10k2 DSP control db gain */
299static DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); 299static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1);
300 300
301static const u32 onoff_table[2] = { 301static const u32 onoff_table[2] = {
302 0x00000000, 0x00000001 302 0x00000000, 0x00000001
@@ -657,7 +657,7 @@ snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id)
657 657
658#define MAX_TLV_SIZE 256 658#define MAX_TLV_SIZE 256
659 659
660static unsigned int *copy_tlv(unsigned int __user *_tlv) 660static unsigned int *copy_tlv(const unsigned int __user *_tlv)
661{ 661{
662 unsigned int data[2]; 662 unsigned int data[2];
663 unsigned int *tlv; 663 unsigned int *tlv;
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 0469546fc333..0981af842b76 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -42,7 +42,7 @@
42 42
43#define AC97_ID_STAC9758 0x83847658 43#define AC97_ID_STAC9758 0x83847658
44 44
45static DECLARE_TLV_DB_SCALE(snd_audigy_db_scale2, -10350, 50, 1); /* WM8775 gain scale */ 45static const DECLARE_TLV_DB_SCALE(snd_audigy_db_scale2, -10350, 50, 1); /* WM8775 gain scale */
46 46
47static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 47static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
48{ 48{
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 5da637c73393..465f8d505329 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -785,7 +785,7 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
785 } 785 }
786 return change; 786 return change;
787} 787}
788static DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1); 788static const DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);
789 789
790#define P16V_VOL(xname,xreg,xhl) { \ 790#define P16V_VOL(xname,xreg,xhl) { \
791 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 791 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index 66ac26c5a240..fec29a108945 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1344,7 +1344,7 @@ static unsigned int db_scale_line[] = {
1344 8, 15, TLV_DB_SCALE_ITEM(-750, 150, 0), 1344 8, 15, TLV_DB_SCALE_ITEM(-750, 150, 0),
1345}; 1345};
1346 1346
1347static DECLARE_TLV_DB_SCALE(db_scale_capture, 0, 150, 0); 1347static const DECLARE_TLV_DB_SCALE(db_scale_capture, 0, 150, 0);
1348 1348
1349static struct snd_kcontrol_new snd_es1938_controls[] = { 1349static struct snd_kcontrol_new snd_es1938_controls[] = {
1350ES1938_DOUBLE_TLV("Master Playback Volume", 0, 0x60, 0x62, 0, 0, 63, 0, 1350ES1938_DOUBLE_TLV("Master Playback Volume", 0, 0x60, 0x62, 0, 0, 63, 0,
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index b7b361ce3a93..6dc578bbeec9 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1157,7 +1157,7 @@ static int snd_fm801_put_mux(struct snd_kcontrol *kcontrol,
1157 return snd_fm801_update_bits(chip, FM801_REC_SRC, 7, val); 1157 return snd_fm801_update_bits(chip, FM801_REC_SRC, 7, val);
1158} 1158}
1159 1159
1160static DECLARE_TLV_DB_SCALE(db_scale_dsp, -3450, 150, 0); 1160static const DECLARE_TLV_DB_SCALE(db_scale_dsp, -3450, 150, 0);
1161 1161
1162#define FM801_CONTROLS ARRAY_SIZE(snd_fm801_controls) 1162#define FM801_CONTROLS ARRAY_SIZE(snd_fm801_controls)
1163 1163
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 625a9a32b7c7..6941d85dfec9 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -664,11 +664,11 @@ static int aureon_ac97_mmute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
664 return change; 664 return change;
665} 665}
666 666
667static DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); 667static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
668static DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1); 668static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);
669static DECLARE_TLV_DB_SCALE(db_scale_wm_adc, -1200, 100, 0); 669static const DECLARE_TLV_DB_SCALE(db_scale_wm_adc, -1200, 100, 0);
670static DECLARE_TLV_DB_SCALE(db_scale_ac97_master, -4650, 150, 0); 670static const DECLARE_TLV_DB_SCALE(db_scale_ac97_master, -4650, 150, 0);
671static DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0); 671static const DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0);
672 672
673/* 673/*
674 * Logarithmic volume values for WM8770 674 * Logarithmic volume values for WM8770
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index b8baadba810c..830a1bbd7110 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -1378,7 +1378,7 @@ static int snd_ice1712_pro_mixer_volume_put(struct snd_kcontrol *kcontrol, struc
1378 return change; 1378 return change;
1379} 1379}
1380 1380
1381static DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0); 1381static const DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0);
1382 1382
1383static const struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = { 1383static const struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = {
1384 { 1384 {
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c
index 2d97ac8a07d3..0751718f4d7b 100644
--- a/sound/pci/ice1712/phase.c
+++ b/sound/pci/ice1712/phase.c
@@ -697,8 +697,8 @@ static int phase28_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ct
697 return 0; 697 return 0;
698} 698}
699 699
700static DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); 700static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
701static DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1); 701static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);
702 702
703static const struct snd_kcontrol_new phase28_dac_controls[] __devinitdata = { 703static const struct snd_kcontrol_new phase28_dac_controls[] __devinitdata = {
704 { 704 {
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
index 4c35ddecb8e6..9552497f0765 100644
--- a/sound/pci/ice1712/pontis.c
+++ b/sound/pci/ice1712/pontis.c
@@ -565,7 +565,7 @@ static int pontis_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
565 return changed; 565 return changed;
566} 566}
567 567
568static DECLARE_TLV_DB_SCALE(db_scale_volume, -6400, 50, 1); 568static const DECLARE_TLV_DB_SCALE(db_scale_volume, -6400, 50, 1);
569 569
570/* 570/*
571 * mixers 571 * mixers
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c
index d551e71c67ca..31cc66eb9f8f 100644
--- a/sound/pci/ice1712/prodigy192.c
+++ b/sound/pci/ice1712/prodigy192.c
@@ -357,8 +357,8 @@ static int aureon_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl
357} 357}
358#endif 358#endif
359 359
360static DECLARE_TLV_DB_SCALE(db_scale_dac, -19125, 75, 0); 360static const DECLARE_TLV_DB_SCALE(db_scale_dac, -19125, 75, 0);
361static DECLARE_TLV_DB_SCALE(db_scale_adc, 0, 150, 0); 361static const DECLARE_TLV_DB_SCALE(db_scale_adc, 0, 150, 0);
362 362
363/* 363/*
364 * mixers 364 * mixers
diff --git a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c
index 13de0f71d4b7..d7d15c036e02 100644
--- a/sound/pci/mixart/mixart_mixer.c
+++ b/sound/pci/mixart/mixart_mixer.c
@@ -389,7 +389,7 @@ static int mixart_analog_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
389 return changed; 389 return changed;
390} 390}
391 391
392static DECLARE_TLV_DB_SCALE(db_scale_analog, -9600, 50, 0); 392static const DECLARE_TLV_DB_SCALE(db_scale_analog, -9600, 50, 0);
393 393
394static struct snd_kcontrol_new mixart_control_analog_level = { 394static struct snd_kcontrol_new mixart_control_analog_level = {
395 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 395 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -872,7 +872,7 @@ static int mixart_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
872 return changed; 872 return changed;
873} 873}
874 874
875static DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0); 875static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0);
876 876
877static struct snd_kcontrol_new snd_mixart_pcm_vol = 877static struct snd_kcontrol_new snd_mixart_pcm_vol =
878{ 878{
diff --git a/sound/pci/pcxhr/pcxhr_mixer.c b/sound/pci/pcxhr/pcxhr_mixer.c
index b133ad9e095e..d9cc8d2beb6d 100644
--- a/sound/pci/pcxhr/pcxhr_mixer.c
+++ b/sound/pci/pcxhr/pcxhr_mixer.c
@@ -44,8 +44,8 @@
44#define PCXHR_ANALOG_PLAYBACK_LEVEL_MAX 128 /* 0.0 dB */ 44#define PCXHR_ANALOG_PLAYBACK_LEVEL_MAX 128 /* 0.0 dB */
45#define PCXHR_ANALOG_PLAYBACK_ZERO_LEVEL 104 /* -24.0 dB ( 0.0 dB - fix level +24.0 dB ) */ 45#define PCXHR_ANALOG_PLAYBACK_ZERO_LEVEL 104 /* -24.0 dB ( 0.0 dB - fix level +24.0 dB ) */
46 46
47static DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -9600, 50, 0); 47static const DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -9600, 50, 0);
48static DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -12800, 100, 0); 48static const DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -12800, 100, 0);
49 49
50static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip, int is_capture, int channel) 50static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip, int is_capture, int channel)
51{ 51{
@@ -195,7 +195,7 @@ static struct snd_kcontrol_new pcxhr_control_output_switch = {
195#define PCXHR_DIGITAL_LEVEL_MAX 0x1ff /* +18 dB */ 195#define PCXHR_DIGITAL_LEVEL_MAX 0x1ff /* +18 dB */
196#define PCXHR_DIGITAL_ZERO_LEVEL 0x1b7 /* 0 dB */ 196#define PCXHR_DIGITAL_ZERO_LEVEL 0x1b7 /* 0 dB */
197 197
198static DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0); 198static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0);
199 199
200#define MORE_THAN_ONE_STREAM_LEVEL 0x000001 200#define MORE_THAN_ONE_STREAM_LEVEL 0x000001
201#define VALID_STREAM_PAN_LEVEL_MASK 0x800000 201#define VALID_STREAM_PAN_LEVEL_MASK 0x800000
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 474f2d451ae8..3bff32167f66 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -2627,7 +2627,7 @@ static int snd_trident_vol_control_get(struct snd_kcontrol *kcontrol,
2627 return 0; 2627 return 0;
2628} 2628}
2629 2629
2630static DECLARE_TLV_DB_SCALE(db_scale_gvol, -6375, 25, 0); 2630static const DECLARE_TLV_DB_SCALE(db_scale_gvol, -6375, 25, 0);
2631 2631
2632static int snd_trident_vol_control_put(struct snd_kcontrol *kcontrol, 2632static int snd_trident_vol_control_put(struct snd_kcontrol *kcontrol,
2633 struct snd_ctl_elem_value *ucontrol) 2633 struct snd_ctl_elem_value *ucontrol)
@@ -2844,7 +2844,7 @@ static int snd_trident_pcm_rvol_control_put(struct snd_kcontrol *kcontrol,
2844 return change; 2844 return change;
2845} 2845}
2846 2846
2847static DECLARE_TLV_DB_SCALE(db_scale_crvol, -3175, 25, 1); 2847static const DECLARE_TLV_DB_SCALE(db_scale_crvol, -3175, 25, 1);
2848 2848
2849static struct snd_kcontrol_new snd_trident_pcm_rvol_control __devinitdata = 2849static struct snd_kcontrol_new snd_trident_pcm_rvol_control __devinitdata =
2850{ 2850{
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 22caf5d7ff1e..a28992269f5e 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1699,7 +1699,7 @@ static int snd_via8233_pcmdxs_volume_put(struct snd_kcontrol *kcontrol,
1699 return change; 1699 return change;
1700} 1700}
1701 1701
1702static DECLARE_TLV_DB_SCALE(db_scale_dxs, -9450, 150, 1); 1702static const DECLARE_TLV_DB_SCALE(db_scale_dxs, -9450, 150, 1);
1703 1703
1704static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = { 1704static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = {
1705 .name = "PCM Playback Volume", 1705 .name = "PCM Playback Volume",
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index 89f58ea180b3..474eac9490ae 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -73,8 +73,8 @@ MODULE_DEVICE_TABLE(pci, snd_vx222_ids);
73/* 73/*
74 */ 74 */
75 75
76static DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0); 76static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
77static DECLARE_TLV_DB_SCALE(db_scale_akm, -7350, 50, 0); 77static const DECLARE_TLV_DB_SCALE(db_scale_akm, -7350, 50, 0);
78 78
79static struct snd_vx_hardware vx222_old_hw = { 79static struct snd_vx_hardware vx222_old_hw = {
80 80
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 5e51950e05f9..55558bef7166 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -846,7 +846,7 @@ static void vx2_set_input_level(struct snd_vx222 *chip)
846 846
847#define MIC_LEVEL_MAX 0xff 847#define MIC_LEVEL_MAX 0xff
848 848
849static DECLARE_TLV_DB_SCALE(db_scale_mic, -6450, 50, 0); 849static const DECLARE_TLV_DB_SCALE(db_scale_mic, -6450, 50, 0);
850 850
851/* 851/*
852 * controls API for input levels 852 * controls API for input levels
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 8b076932f4f5..fd12674d0394 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1504,7 +1504,7 @@ static int snd_ymfpci_put_single(struct snd_kcontrol *kcontrol,
1504 return change; 1504 return change;
1505} 1505}
1506 1506
1507static DECLARE_TLV_DB_LINEAR(db_scale_native, TLV_DB_GAIN_MUTE, 0); 1507static const DECLARE_TLV_DB_LINEAR(db_scale_native, TLV_DB_GAIN_MUTE, 0);
1508 1508
1509#define YMFPCI_DOUBLE(xname, xindex, reg) \ 1509#define YMFPCI_DOUBLE(xname, xindex, reg) \
1510{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ 1510{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
diff --git a/sound/pcmcia/vx/vxp_mixer.c b/sound/pcmcia/vx/vxp_mixer.c
index bced7b623b12..2b1f996c898d 100644
--- a/sound/pcmcia/vx/vxp_mixer.c
+++ b/sound/pcmcia/vx/vxp_mixer.c
@@ -64,7 +64,7 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
64 return 0; 64 return 0;
65} 65}
66 66
67static DECLARE_TLV_DB_SCALE(db_scale_mic, -21, 3, 0); 67static const DECLARE_TLV_DB_SCALE(db_scale_mic, -21, 3, 0);
68 68
69static struct snd_kcontrol_new vx_control_mic_level = { 69static struct snd_kcontrol_new vx_control_mic_level = {
70 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 70 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index d7df59e9c647..363bcb5f08e6 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -91,7 +91,7 @@ static int snd_vxpocket_dev_free(struct snd_device *device)
91 * Only output levels can be modified 91 * Only output levels can be modified
92 */ 92 */
93 93
94static DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0); 94static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
95 95
96static struct snd_vx_hardware vxpocket_hw = { 96static struct snd_vx_hardware vxpocket_hw = {
97 .name = "VXPocket", 97 .name = "VXPocket",