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

Commit 3fc6c5a1 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v4.0-rc4' of...

Merge tag 'asoc-fix-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.0

As well as the usual collection of driver specific fixes there's a few
more generic things:

 - Lots of fixes from Takashi for drivers using the wrong field in the
   control union to communicate with userspace, leading to potential
   errors on 64 bit systems.
 - A fix from Lars for locking of the lists of devices we maintain,
   mostly only likely to trigger during device probe and removal.
parents cc261738 33484c67
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -317,7 +317,7 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
{
{
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
	unsigned int deemph = ucontrol->value.enumerated.item[0];
	unsigned int deemph = ucontrol->value.integer.value[0];


	if (deemph > 1)
	if (deemph > 1)
		return -EINVAL;
		return -EINVAL;
@@ -333,7 +333,7 @@ static int adav80x_get_deemph(struct snd_kcontrol *kcontrol,
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);


	ucontrol->value.enumerated.item[0] = adav80x->deemph;
	ucontrol->value.integer.value[0] = adav80x->deemph;
	return 0;
	return 0;
};
};


+2 −2
Original line number Original line Diff line number Diff line
@@ -76,7 +76,7 @@ static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
{
{
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
	struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
	int deemph = ucontrol->value.enumerated.item[0];
	int deemph = ucontrol->value.integer.value[0];


	if (deemph > 1)
	if (deemph > 1)
		return -EINVAL;
		return -EINVAL;
@@ -92,7 +92,7 @@ static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
	struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);


	ucontrol->value.enumerated.item[0] = ak4641->deemph;
	ucontrol->value.integer.value[0] = ak4641->deemph;
	return 0;
	return 0;
};
};


+22 −22
Original line number Original line Diff line number Diff line
@@ -343,25 +343,25 @@ static const struct snd_soc_dapm_widget ak4671_dapm_widgets[] = {
};
};


static const struct snd_soc_dapm_route ak4671_intercon[] = {
static const struct snd_soc_dapm_route ak4671_intercon[] = {
	{"DAC Left", "NULL", "PMPLL"},
	{"DAC Left", NULL, "PMPLL"},
	{"DAC Right", "NULL", "PMPLL"},
	{"DAC Right", NULL, "PMPLL"},
	{"ADC Left", "NULL", "PMPLL"},
	{"ADC Left", NULL, "PMPLL"},
	{"ADC Right", "NULL", "PMPLL"},
	{"ADC Right", NULL, "PMPLL"},


	/* Outputs */
	/* Outputs */
	{"LOUT1", "NULL", "LOUT1 Mixer"},
	{"LOUT1", NULL, "LOUT1 Mixer"},
	{"ROUT1", "NULL", "ROUT1 Mixer"},
	{"ROUT1", NULL, "ROUT1 Mixer"},
	{"LOUT2", "NULL", "LOUT2 Mix Amp"},
	{"LOUT2", NULL, "LOUT2 Mix Amp"},
	{"ROUT2", "NULL", "ROUT2 Mix Amp"},
	{"ROUT2", NULL, "ROUT2 Mix Amp"},
	{"LOUT3", "NULL", "LOUT3 Mixer"},
	{"LOUT3", NULL, "LOUT3 Mixer"},
	{"ROUT3", "NULL", "ROUT3 Mixer"},
	{"ROUT3", NULL, "ROUT3 Mixer"},


	{"LOUT1 Mixer", "DACL", "DAC Left"},
	{"LOUT1 Mixer", "DACL", "DAC Left"},
	{"ROUT1 Mixer", "DACR", "DAC Right"},
	{"ROUT1 Mixer", "DACR", "DAC Right"},
	{"LOUT2 Mixer", "DACHL", "DAC Left"},
	{"LOUT2 Mixer", "DACHL", "DAC Left"},
	{"ROUT2 Mixer", "DACHR", "DAC Right"},
	{"ROUT2 Mixer", "DACHR", "DAC Right"},
	{"LOUT2 Mix Amp", "NULL", "LOUT2 Mixer"},
	{"LOUT2 Mix Amp", NULL, "LOUT2 Mixer"},
	{"ROUT2 Mix Amp", "NULL", "ROUT2 Mixer"},
	{"ROUT2 Mix Amp", NULL, "ROUT2 Mixer"},
	{"LOUT3 Mixer", "DACSL", "DAC Left"},
	{"LOUT3 Mixer", "DACSL", "DAC Left"},
	{"ROUT3 Mixer", "DACSR", "DAC Right"},
	{"ROUT3 Mixer", "DACSR", "DAC Right"},


@@ -381,18 +381,18 @@ static const struct snd_soc_dapm_route ak4671_intercon[] = {
	{"LIN2", NULL, "Mic Bias"},
	{"LIN2", NULL, "Mic Bias"},
	{"RIN2", NULL, "Mic Bias"},
	{"RIN2", NULL, "Mic Bias"},


	{"ADC Left", "NULL", "LIN MUX"},
	{"ADC Left", NULL, "LIN MUX"},
	{"ADC Right", "NULL", "RIN MUX"},
	{"ADC Right", NULL, "RIN MUX"},


	/* Analog Loops */
	/* Analog Loops */
	{"LIN1 Mixing Circuit", "NULL", "LIN1"},
	{"LIN1 Mixing Circuit", NULL, "LIN1"},
	{"RIN1 Mixing Circuit", "NULL", "RIN1"},
	{"RIN1 Mixing Circuit", NULL, "RIN1"},
	{"LIN2 Mixing Circuit", "NULL", "LIN2"},
	{"LIN2 Mixing Circuit", NULL, "LIN2"},
	{"RIN2 Mixing Circuit", "NULL", "RIN2"},
	{"RIN2 Mixing Circuit", NULL, "RIN2"},
	{"LIN3 Mixing Circuit", "NULL", "LIN3"},
	{"LIN3 Mixing Circuit", NULL, "LIN3"},
	{"RIN3 Mixing Circuit", "NULL", "RIN3"},
	{"RIN3 Mixing Circuit", NULL, "RIN3"},
	{"LIN4 Mixing Circuit", "NULL", "LIN4"},
	{"LIN4 Mixing Circuit", NULL, "LIN4"},
	{"RIN4 Mixing Circuit", "NULL", "RIN4"},
	{"RIN4 Mixing Circuit", NULL, "RIN4"},


	{"LOUT1 Mixer", "LINL1", "LIN1 Mixing Circuit"},
	{"LOUT1 Mixer", "LINL1", "LIN1 Mixing Circuit"},
	{"ROUT1 Mixer", "RINR1", "RIN1 Mixing Circuit"},
	{"ROUT1 Mixer", "RINR1", "RIN1 Mixing Circuit"},
+2 −2
Original line number Original line Diff line number Diff line
@@ -286,7 +286,7 @@ static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);


	ucontrol->value.enumerated.item[0] = cs4271->deemph;
	ucontrol->value.integer.value[0] = cs4271->deemph;
	return 0;
	return 0;
}
}


@@ -296,7 +296,7 @@ static int cs4271_put_deemph(struct snd_kcontrol *kcontrol,
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);


	cs4271->deemph = ucontrol->value.enumerated.item[0];
	cs4271->deemph = ucontrol->value.integer.value[0];
	return cs4271_set_deemph(codec);
	return cs4271_set_deemph(codec);
}
}


+4 −4
Original line number Original line Diff line number Diff line
@@ -876,11 +876,11 @@ static const struct snd_soc_dapm_widget da732x_dapm_widgets[] = {


static const struct snd_soc_dapm_route da732x_dapm_routes[] = {
static const struct snd_soc_dapm_route da732x_dapm_routes[] = {
	/* Inputs */
	/* Inputs */
	{"AUX1L PGA", "NULL", "AUX1L"},
	{"AUX1L PGA", NULL, "AUX1L"},
	{"AUX1R PGA", "NULL", "AUX1R"},
	{"AUX1R PGA", NULL, "AUX1R"},
	{"MIC1 PGA", NULL, "MIC1"},
	{"MIC1 PGA", NULL, "MIC1"},
	{"MIC2 PGA", "NULL", "MIC2"},
	{"MIC2 PGA", NULL, "MIC2"},
	{"MIC3 PGA", "NULL", "MIC3"},
	{"MIC3 PGA", NULL, "MIC3"},


	/* Capture Path */
	/* Capture Path */
	{"ADC1 Left MUX", "MIC1", "MIC1 PGA"},
	{"ADC1 Left MUX", "MIC1", "MIC1 PGA"},
Loading