diff options
Diffstat (limited to 'sound/soc/pxa/magician.c')
-rw-r--r-- | sound/soc/pxa/magician.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index aace19e0fe2c..31242be08823 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
@@ -45,27 +45,31 @@ static void magician_ext_control(struct snd_soc_codec *codec) | |||
45 | { | 45 | { |
46 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 46 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
47 | 47 | ||
48 | snd_soc_dapm_mutex_lock(dapm); | ||
49 | |||
48 | if (magician_spk_switch) | 50 | if (magician_spk_switch) |
49 | snd_soc_dapm_enable_pin(dapm, "Speaker"); | 51 | snd_soc_dapm_enable_pin_unlocked(dapm, "Speaker"); |
50 | else | 52 | else |
51 | snd_soc_dapm_disable_pin(dapm, "Speaker"); | 53 | snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker"); |
52 | if (magician_hp_switch) | 54 | if (magician_hp_switch) |
53 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); | 55 | snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack"); |
54 | else | 56 | else |
55 | snd_soc_dapm_disable_pin(dapm, "Headphone Jack"); | 57 | snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack"); |
56 | 58 | ||
57 | switch (magician_in_sel) { | 59 | switch (magician_in_sel) { |
58 | case MAGICIAN_MIC: | 60 | case MAGICIAN_MIC: |
59 | snd_soc_dapm_disable_pin(dapm, "Headset Mic"); | 61 | snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Mic"); |
60 | snd_soc_dapm_enable_pin(dapm, "Call Mic"); | 62 | snd_soc_dapm_enable_pin_unlocked(dapm, "Call Mic"); |
61 | break; | 63 | break; |
62 | case MAGICIAN_MIC_EXT: | 64 | case MAGICIAN_MIC_EXT: |
63 | snd_soc_dapm_disable_pin(dapm, "Call Mic"); | 65 | snd_soc_dapm_disable_pin_unlocked(dapm, "Call Mic"); |
64 | snd_soc_dapm_enable_pin(dapm, "Headset Mic"); | 66 | snd_soc_dapm_enable_pin_unlocked(dapm, "Headset Mic"); |
65 | break; | 67 | break; |
66 | } | 68 | } |
67 | 69 | ||
68 | snd_soc_dapm_sync(dapm); | 70 | snd_soc_dapm_sync_unlocked(dapm); |
71 | |||
72 | snd_soc_dapm_mutex_unlock(dapm); | ||
69 | } | 73 | } |
70 | 74 | ||
71 | static int magician_startup(struct snd_pcm_substream *substream) | 75 | static int magician_startup(struct snd_pcm_substream *substream) |