Skip to content

Commit

Permalink
[ALSA] Add even more 'const' to everything related to TLV
Browse files Browse the repository at this point in the history
Mark TLV data as 'const'
Signed-of-by: Philipp Matthias Hahn <[email protected]>

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
tiwai authored and Jaroslav Kysela committed Feb 9, 2007
1 parent 517400c commit 0cb29ea
Show file tree
Hide file tree
Showing 36 changed files with 73 additions and 73 deletions.
2 changes: 1 addition & 1 deletion include/sound/ad1848.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct ad1848_mix_elem {
int index;
int type;
unsigned long private_value;
unsigned int *tlv;
const unsigned int *tlv;
};

#define AD1848_SINGLE(xname, xindex, reg, shift, mask, invert) \
Expand Down
4 changes: 2 additions & 2 deletions include/sound/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct snd_kcontrol_new {
snd_kcontrol_put_t *put;
union {
snd_kcontrol_tlv_rw_t *c;
unsigned int *p;
const unsigned int *p;
} tlv;
unsigned long private_value;
};
Expand All @@ -69,7 +69,7 @@ struct snd_kcontrol {
snd_kcontrol_put_t *put;
union {
snd_kcontrol_tlv_rw_t *c;
unsigned int *p;
const unsigned int *p;
} tlv;
unsigned long private_value;
void *private_data;
Expand Down
2 changes: 1 addition & 1 deletion include/sound/emu10k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ struct snd_emu10k1_fx8010_control_gpr {
unsigned int min; /* minimum range */
unsigned int max; /* maximum range */
unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
unsigned int *tlv;
const unsigned int *tlv;
};

/* old ABI without TLV support */
Expand Down
2 changes: 1 addition & 1 deletion include/sound/vx_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct snd_vx_hardware {
unsigned int num_ins;
unsigned int num_outs;
unsigned int output_level_max;
unsigned int *output_level_db_scale;
const unsigned int *output_level_db_scale;
};

/* hwdep id string */
Expand Down
2 changes: 1 addition & 1 deletion sound/drivers/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ static int snd_dummy_volume_put(struct snd_kcontrol *kcontrol,
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0);

#define DUMMY_CAPSRC(xname, xindex, addr) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
Expand Down
2 changes: 1 addition & 1 deletion sound/drivers/vx/vx_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
return 0;
}

static DECLARE_TLV_DB_SCALE(db_scale_audio_gain, -10975, 25, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_audio_gain, -10975, 25, 0);

static struct snd_kcontrol_new vx_control_audio_gain = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Expand Down
10 changes: 5 additions & 5 deletions sound/i2c/other/ak4xxx-adda.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,17 @@ static const unsigned char vol_cvt_datt[128] = {
/*
* dB tables
*/
static DECLARE_TLV_DB_SCALE(db_scale_vol_datt, -6350, 50, 1);
static DECLARE_TLV_DB_SCALE(db_scale_8bit, -12750, 50, 1);
static DECLARE_TLV_DB_SCALE(db_scale_7bit, -6350, 50, 1);
static DECLARE_TLV_DB_LINEAR(db_scale_linear, TLV_DB_GAIN_MUTE, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_vol_datt, -6350, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_8bit, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_7bit, -6350, 50, 1);
static const DECLARE_TLV_DB_LINEAR(db_scale_linear, TLV_DB_GAIN_MUTE, 0);

/*
* initialize all the ak4xxx chips
*/
void snd_akm4xxx_init(struct snd_akm4xxx *ak)
{
static unsigned char inits_ak4524[] = {
static const unsigned char inits_ak4524[] = {
0x00, 0x07, /* 0: all power up */
0x01, 0x00, /* 1: ADC/DAC reset */
0x02, 0x60, /* 2: 24bit I2S */
Expand Down
2 changes: 1 addition & 1 deletion sound/i2c/other/pt2258.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static int pt2258_switch_put(struct snd_kcontrol *kcontrol,
return -EIO;
}

static DECLARE_TLV_DB_SCALE(pt2258_db_scale, -7900, 100, 0);
static const DECLARE_TLV_DB_SCALE(pt2258_db_scale, -7900, 100, 0);

int snd_pt2258_build_controls(struct snd_pt2258 *pt)
{
Expand Down
10 changes: 5 additions & 5 deletions sound/isa/ad1816a/ad1816a_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,11 @@ static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
static DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);

static struct snd_kcontrol_new snd_ad1816a_controls[] __devinitdata = {
AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1),
Expand Down
6 changes: 3 additions & 3 deletions sound/isa/ad1848/ad1848_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,9 +1223,9 @@ int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip,

EXPORT_SYMBOL(snd_ad1848_add_ctl_elem);

static DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);

static struct ad1848_mix_elem snd_ad1848_controls[] = {
AD1848_DOUBLE("PCM Playback Switch", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1),
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/opl3sa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ static int snd_opl3sa2_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0);
static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);

static struct snd_kcontrol_new snd_opl3sa2_controls[] = {
OPL3SA2_DOUBLE("Master Playback Switch", 0, 0x07, 0x08, 7, 7, 1, 1),
Expand Down
16 changes: 8 additions & 8 deletions sound/pci/ac97/ac97_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,13 +1190,13 @@ static int snd_ac97_cmute_new_stereo(struct snd_card *card, char *name, int reg,
/*
* set dB information
*/
static DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
static DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);

static unsigned int *find_db_scale(unsigned int maxval)
static const unsigned int *find_db_scale(unsigned int maxval)
{
switch (maxval) {
case 0x0f: return db_scale_4bit;
Expand All @@ -1206,8 +1206,8 @@ static unsigned int *find_db_scale(unsigned int maxval)
return NULL;
}

static void set_tlv_db_scale(struct snd_kcontrol *kctl, unsigned int *tlv)
{
static void set_tlv_db_scale(struct snd_kcontrol *kctl, const unsigned int *tlv)
{
kctl->tlv.p = tlv;
if (tlv)
kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/ac97/ac97_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontro

/* replace with a new TLV */
static void reset_tlv(struct snd_ac97 *ac97, const char *name,
unsigned int *tlv)
const unsigned int *tlv)
{
struct snd_ctl_elem_id sid;
struct snd_kcontrol *kctl;
Expand Down Expand Up @@ -1569,7 +1569,7 @@ static const struct snd_kcontrol_new snd_ac97_controls_ad1885[] = {
AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */
};

static DECLARE_TLV_DB_SCALE(db_scale_6bit_6db_max, -8850, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_6bit_6db_max, -8850, 150, 0);

static int patch_ad1885_specific(struct snd_ac97 * ac97)
{
Expand Down Expand Up @@ -2527,7 +2527,7 @@ static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc650[] = {
/* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */
};

static DECLARE_TLV_DB_SCALE(db_scale_5bit_3db_max, -4350, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit_3db_max, -4350, 150, 0);

static int patch_alc650_specific(struct snd_ac97 * ac97)
{
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/ac97/ak4531_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ static int snd_ak4531_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_master, -6200, 200, 0);
static DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0);
static DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_master, -6200, 200, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0);

static struct snd_kcontrol_new snd_ak4531_controls[] = {

Expand Down
4 changes: 2 additions & 2 deletions sound/pci/ca0106/ca0106_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@

#include "ca0106.h"

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 const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1);
static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1);

static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs4281.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ static int snd_cs4281_put_volume(struct snd_kcontrol *kcontrol,
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_dsp, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_dsp, -4650, 150, 0);

static struct snd_kcontrol_new snd_cs4281_fm_vol =
{
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/echoaudio/echoaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable " ECHOCARD_NAME " soundcard.");

static unsigned int channels_list[10] = {1, 2, 4, 6, 8, 10, 12, 14, 16, 999999};
static DECLARE_TLV_DB_SCALE(db_scale_output_gain, -12800, 100, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_output_gain, -12800, 100, 1);

static int get_firmware(const struct firmware **fw_entry,
const struct firmware *frm, struct echoaudio *chip)
Expand Down Expand Up @@ -1085,7 +1085,7 @@ static int snd_echo_input_gain_put(struct snd_kcontrol *kcontrol,
return changed;
}

static DECLARE_TLV_DB_SCALE(db_scale_input_gain, -2500, 50, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_input_gain, -2500, 50, 0);

static struct snd_kcontrol_new snd_echo_line_input_gain __devinitdata = {
.name = "Line Capture Volume",
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/emu10k1/emufx.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static const u32 db_table[101] = {
};

/* EMU10k1/EMU10k2 DSP control db gain */
static DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1);
static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1);

static const u32 onoff_table[2] = {
0x00000000, 0x00000001
Expand Down Expand Up @@ -657,7 +657,7 @@ snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id)

#define MAX_TLV_SIZE 256

static unsigned int *copy_tlv(unsigned int __user *_tlv)
static unsigned int *copy_tlv(const unsigned int __user *_tlv)
{
unsigned int data[2];
unsigned int *tlv;
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/emu10k1/emumixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#define AC97_ID_STAC9758 0x83847658

static DECLARE_TLV_DB_SCALE(snd_audigy_db_scale2, -10350, 50, 1); /* WM8775 gain scale */
static const DECLARE_TLV_DB_SCALE(snd_audigy_db_scale2, -10350, 50, 1); /* WM8775 gain scale */

static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/emu10k1/p16v.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
}
return change;
}
static DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);
static const DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);

#define P16V_VOL(xname,xreg,xhl) { \
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/es1938.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ static unsigned int db_scale_line[] = {
8, 15, TLV_DB_SCALE_ITEM(-750, 150, 0),
};

static DECLARE_TLV_DB_SCALE(db_scale_capture, 0, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_capture, 0, 150, 0);

static struct snd_kcontrol_new snd_es1938_controls[] = {
ES1938_DOUBLE_TLV("Master Playback Volume", 0, 0x60, 0x62, 0, 0, 63, 0,
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/fm801.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ static int snd_fm801_put_mux(struct snd_kcontrol *kcontrol,
return snd_fm801_update_bits(chip, FM801_REC_SRC, 7, val);
}

static DECLARE_TLV_DB_SCALE(db_scale_dsp, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_dsp, -3450, 150, 0);

#define FM801_CONTROLS ARRAY_SIZE(snd_fm801_controls)

Expand Down
10 changes: 5 additions & 5 deletions sound/pci/ice1712/aureon.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,11 @@ static int aureon_ac97_mmute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
static DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);
static DECLARE_TLV_DB_SCALE(db_scale_wm_adc, -1200, 100, 0);
static DECLARE_TLV_DB_SCALE(db_scale_ac97_master, -4650, 150, 0);
static DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_wm_adc, -1200, 100, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_ac97_master, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_ac97_gain, -3450, 150, 0);

/*
* Logarithmic volume values for WM8770
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/ice1712/ice1712.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ static int snd_ice1712_pro_mixer_volume_put(struct snd_kcontrol *kcontrol, struc
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0);

static const struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = {
{
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/ice1712/phase.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ static int phase28_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ct
return 0;
}

static DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
static DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1);

static const struct snd_kcontrol_new phase28_dac_controls[] __devinitdata = {
{
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/ice1712/pontis.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static int pontis_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
return changed;
}

static DECLARE_TLV_DB_SCALE(db_scale_volume, -6400, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_volume, -6400, 50, 1);

/*
* mixers
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/ice1712/prodigy192.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ static int aureon_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl
}
#endif

static DECLARE_TLV_DB_SCALE(db_scale_dac, -19125, 75, 0);
static DECLARE_TLV_DB_SCALE(db_scale_adc, 0, 150, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_dac, -19125, 75, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_adc, 0, 150, 0);

/*
* mixers
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/mixart/mixart_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static int mixart_analog_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
return changed;
}

static DECLARE_TLV_DB_SCALE(db_scale_analog, -9600, 50, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_analog, -9600, 50, 0);

static struct snd_kcontrol_new mixart_control_analog_level = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Expand Down Expand Up @@ -872,7 +872,7 @@ static int mixart_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
return changed;
}

static DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0);

static struct snd_kcontrol_new snd_mixart_pcm_vol =
{
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/pcxhr/pcxhr_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
#define PCXHR_ANALOG_PLAYBACK_LEVEL_MAX 128 /* 0.0 dB */
#define PCXHR_ANALOG_PLAYBACK_ZERO_LEVEL 104 /* -24.0 dB ( 0.0 dB - fix level +24.0 dB ) */

static DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -9600, 50, 0);
static DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -12800, 100, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -9600, 50, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -12800, 100, 0);

static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip, int is_capture, int channel)
{
Expand Down Expand Up @@ -195,7 +195,7 @@ static struct snd_kcontrol_new pcxhr_control_output_switch = {
#define PCXHR_DIGITAL_LEVEL_MAX 0x1ff /* +18 dB */
#define PCXHR_DIGITAL_ZERO_LEVEL 0x1b7 /* 0 dB */

static DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0);

#define MORE_THAN_ONE_STREAM_LEVEL 0x000001
#define VALID_STREAM_PAN_LEVEL_MASK 0x800000
Expand Down
Loading

0 comments on commit 0cb29ea

Please sign in to comment.