diff options
author | Manoj Gangwal <mgangwal@nvidia.com> | 2012-08-30 15:23:09 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:33:09 -0700 |
commit | e814ffa56adde8cdee29f1f61ba17a5f6aa52f72 (patch) | |
tree | ca6d2dc81d1019cf78160b8e0b45055a1a6c095a /sound/soc/codecs/tlv320aic326x.c | |
parent | 5e6f4fb9fe3e87af28c3e583f68159bee52fd716 (diff) |
asoc: aic326x codecs: Fix HP detection issue.
There was issue with the flags used in headset
detection function of TI codec.
Bug 1041365
Change-Id: I44c990ebbe30ebdbd79d486ce3f1f03f6c3c507e
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/128469
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Tested-by: Scott Peterson <speterson@nvidia.com>
Rebase-Id: R756cf53fb27b7fa18d0a4514420b4e06be44f9b4
Diffstat (limited to 'sound/soc/codecs/tlv320aic326x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic326x.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic326x.c b/sound/soc/codecs/tlv320aic326x.c index 814f310f8a5b..5b0be9bb642e 100644 --- a/sound/soc/codecs/tlv320aic326x.c +++ b/sound/soc/codecs/tlv320aic326x.c @@ -1626,11 +1626,17 @@ static void aic3262_hs_jack_report(struct snd_soc_codec *codec, /* Sync status */ status = snd_soc_read(codec, AIC3262_DAC_FLAG); - /* We will check only stereo MIC and headphone */ - if (status & AIC3262_JACK_WITH_STEREO_HS) + + switch (status & AIC3262_JACK_TYPE_MASK) { + case AIC3262_JACK_WITH_MIC: + state |= SND_JACK_HEADSET; + break; + case AIC3262_JACK_WITHOUT_MIC: state |= SND_JACK_HEADPHONE; - if (status & AIC3262_JACK_WITH_MIC) - state |= SND_JACK_MICROPHONE; + break; + default: + break; + } mutex_unlock(&aic3262->mutex); |