From 3d5e55646746d4d1ef2f7f66097bd4a7b03623ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Sat, 24 Sep 2011 10:10:50 +0800 Subject: [PATCH] wm8994: fix on callint the soundrecord a bug --- sound/soc/codecs/wm8994.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 65892019b8df..629ea11c62bf 100755 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -2564,9 +2564,14 @@ static int wm8994_trigger(struct snd_pcm_substream *substream, // struct snd_soc_dai *codec_dai = machine->codec_dai; struct snd_soc_codec *codec = dai->codec; struct wm8994_priv *wm8994 = codec->private_data; + char last_route = wm8994->kcontrol.private_value & 0xff; if(wm8994_current_mode >= wm8994_handsetMIC_to_baseband_to_headset && wm8994_current_mode != null) return 0; + if((last_route == SPEAKER_INCALL || last_route == EARPIECE_INCALL + || last_route == HEADSET_INCALL || BLUETOOTH_SCO_INCALL) + && wm8994_current_mode == wm8994_record_add) + return 0; // DBG("%s::%d status = %d substream->stream '%s'\n",__FUNCTION__,__LINE__, // cmd, substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "PLAYBACK":"CAPTURE"); -- 2.34.1