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

Commit 71a29560 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Lock the CODEC in PXA external jack controls



When doing anything with the system, especially DAPM, we need to hold the
CODEC mutex.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 6424dca2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -100,8 +100,13 @@ static int corgi_startup(struct snd_pcm_substream *substream)
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec *codec = rtd->codec;

	mutex_lock(&codec->mutex);

	/* check the jack status at stream startup */
	corgi_ext_control(codec);

	mutex_unlock(&codec->mutex);

	return 0;
}

+4 −0
Original line number Diff line number Diff line
@@ -72,9 +72,13 @@ static int magician_startup(struct snd_pcm_substream *substream)
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec *codec = rtd->codec;

	mutex_lock(&codec->mutex);

	/* check the jack status at stream startup */
	magician_ext_control(codec);

	mutex_unlock(&codec->mutex);

	return 0;
}

+5 −0
Original line number Diff line number Diff line
@@ -77,8 +77,13 @@ static int poodle_startup(struct snd_pcm_substream *substream)
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec *codec = rtd->codec;

	mutex_lock(&codec->mutex);

	/* check the jack status at stream startup */
	poodle_ext_control(codec);

	mutex_unlock(&codec->mutex);

	return 0;
}

+5 −0
Original line number Diff line number Diff line
@@ -108,8 +108,13 @@ static int spitz_startup(struct snd_pcm_substream *substream)
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec *codec = rtd->codec;

	mutex_lock(&codec->mutex);

	/* check the jack status at stream startup */
	spitz_ext_control(codec);

	mutex_unlock(&codec->mutex);

	return 0;
}

+5 −0
Original line number Diff line number Diff line
@@ -81,8 +81,13 @@ static int tosa_startup(struct snd_pcm_substream *substream)
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec *codec = rtd->codec;

	mutex_lock(&codec->mutex);

	/* check the jack status at stream startup */
	tosa_ext_control(codec);

	mutex_unlock(&codec->mutex);

	return 0;
}