From: 邱建斌 Date: Sat, 24 Sep 2011 02:10:50 +0000 (+0800) Subject: wm8994: fix on callint the soundrecord a bug X-Git-Tag: firefly_0821_release~9767^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3d5e55646746d4d1ef2f7f66097bd4a7b03623ab;p=firefly-linux-kernel-4.4.55.git wm8994: fix on callint the soundrecord a bug --- 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");