Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cb29ea0 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Add even more 'const' to everything related to TLV



Mark TLV data as 'const'
Signed-of-by: default avatarPhilipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 517400cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) \
+2 −2
Original line number Diff line number Diff line
@@ -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;
};
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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, \
Loading