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

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
...@@ -100,8 +100,13 @@ static int corgi_startup(struct snd_pcm_substream *substream) ...@@ -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_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
corgi_ext_control(codec); corgi_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -72,9 +72,13 @@ static int magician_startup(struct snd_pcm_substream *substream) ...@@ -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_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
magician_ext_control(codec); magician_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -77,8 +77,13 @@ static int poodle_startup(struct snd_pcm_substream *substream) ...@@ -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_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
poodle_ext_control(codec); poodle_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -108,8 +108,13 @@ static int spitz_startup(struct snd_pcm_substream *substream) ...@@ -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_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
spitz_ext_control(codec); spitz_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -81,8 +81,13 @@ static int tosa_startup(struct snd_pcm_substream *substream) ...@@ -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_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
tosa_ext_control(codec); tosa_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment