From eda293580eea70ea0342837e44e53dd9b312bdd5 Mon Sep 17 00:00:00 2001 From: Akhil Karuturi Date: Thu, 23 Apr 2020 18:57:36 -0700 Subject: [PATCH] ASOC: Remove support for ANC headphones ANC headphones are no longer supported, removed dead code related to the feature. Change-Id: I3dd51b5b1d9f77fd870947608f8a14fc3f7aeed0 Signed-off-by: Akhil Karuturi --- techpack/audio/asoc/codecs/wcd-mbhc-v2.c | 11 +++-------- techpack/audio/include/asoc/wcd-mbhc-v2.h | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/techpack/audio/asoc/codecs/wcd-mbhc-v2.c b/techpack/audio/asoc/codecs/wcd-mbhc-v2.c index ee24ea63a031..1fd3f96a20a9 100644 --- a/techpack/audio/asoc/codecs/wcd-mbhc-v2.c +++ b/techpack/audio/asoc/codecs/wcd-mbhc-v2.c @@ -654,7 +654,6 @@ void wcd_mbhc_report_plug(struct wcd_mbhc *mbhc, int insertion, } mbhc->hph_status &= ~(SND_JACK_HEADSET | SND_JACK_LINEOUT | - SND_JACK_ANC_HEADPHONE | SND_JACK_UNSUPPORTED); } @@ -672,8 +671,9 @@ void wcd_mbhc_report_plug(struct wcd_mbhc *mbhc, int insertion, mbhc->jiffies_atreport = jiffies; } else if (jack_type == SND_JACK_LINEOUT) { mbhc->current_plug = MBHC_PLUG_TYPE_HIGH_HPH; - } else if (jack_type == SND_JACK_ANC_HEADPHONE) - mbhc->current_plug = MBHC_PLUG_TYPE_ANC_HEADPHONE; + } else { + pr_debug("%s: invalid Jack type %d\n",__func__, jack_type); + } if (mbhc->mbhc_cb->hph_pa_on_status) is_pa_on = mbhc->mbhc_cb->hph_pa_on_status(component); @@ -826,8 +826,6 @@ void wcd_mbhc_find_plug_and_report(struct wcd_mbhc *mbhc, anc_mic_found = mbhc->mbhc_fn->wcd_mbhc_detect_anc_plug_type(mbhc); jack_type = SND_JACK_HEADSET; - if (anc_mic_found) - jack_type = SND_JACK_ANC_HEADPHONE; /* * If Headphone was reported previously, this will @@ -1010,9 +1008,6 @@ static void wcd_mbhc_swch_irq_handler(struct wcd_mbhc *mbhc) mbhc->is_extn_cable = false; jack_type = SND_JACK_LINEOUT; break; - case MBHC_PLUG_TYPE_ANC_HEADPHONE: - jack_type = SND_JACK_ANC_HEADPHONE; - break; default: pr_info("%s: Invalid current plug: %d\n", __func__, mbhc->current_plug); diff --git a/techpack/audio/include/asoc/wcd-mbhc-v2.h b/techpack/audio/include/asoc/wcd-mbhc-v2.h index 193414138711..340d68cee76e 100644 --- a/techpack/audio/include/asoc/wcd-mbhc-v2.h +++ b/techpack/audio/include/asoc/wcd-mbhc-v2.h @@ -123,7 +123,7 @@ do { \ #define WCD_MBHC_JACK_MASK (SND_JACK_HEADSET | SND_JACK_OC_HPHL | \ SND_JACK_OC_HPHR | SND_JACK_LINEOUT | \ - SND_JACK_MECHANICAL | SND_JACK_MICROPHONE2 | \ + SND_JACK_MECHANICAL | \ SND_JACK_UNSUPPORTED) #define WCD_MBHC_JACK_BUTTON_MASK (SND_JACK_BTN_0 | SND_JACK_BTN_1 | \