aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-01-29 09:33:49 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:03:19 -0500
commit0cb29ea0d449d7c0ecc9649a08ab63476389701d (patch)
tree64e007b7a767c8e63f32b346c1069804e8e2df80 /sound/pci/ac97
parent517400cbc75d0604bc34c1866dff7e55ca1be2b4 (diff)
[ALSA] Add even more 'const' to everything related to TLV
Mark TLV data as 'const' Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ac97')
-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
3 files changed, 14 insertions, 14 deletions
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