aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97/ac97_codec.c
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/ac97_codec.c
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/ac97_codec.c')
-rw-r--r--sound/pci/ac97/ac97_codec.c16
1 files changed, 8 insertions, 8 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;