From 7880a551f1ef6fb22fdfc79f45823bd027c3475b Mon Sep 17 00:00:00 2001 From: Prasad Kumpatla Date: Tue, 25 Oct 2022 10:56:53 +0530 Subject: [PATCH] asoc: add conditional compilation for wcdusb_ss APIs add conditional compilation for wcdusb_ss APIs. Change-Id: Ie70f4a737d9a93e3ebb4d9c7b59e08d94c13d20c Signed-off-by: Prasad Kumpatla --- asoc/pineapple.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/asoc/pineapple.c b/asoc/pineapple.c index f544bf0889..d34f4bd7e7 100644 --- a/asoc/pineapple.c +++ b/asoc/pineapple.c @@ -14,7 +14,9 @@ #include #include #include +#if IS_ENABLED(CONFIG_QCOM_WCD_USBSS_I2C) #include +#endif #include #include #include @@ -125,6 +127,7 @@ static struct wcd_mbhc_config wcd_mbhc_cfg = { static bool msm_usbc_swap_gnd_mic(struct snd_soc_component *component, bool active) { + bool ret = false; struct snd_soc_card *card = component->card; struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(card); @@ -132,8 +135,11 @@ static bool msm_usbc_swap_gnd_mic(struct snd_soc_component *component, bool acti if (!pdata->wcd_usbss_handle) return false; - return wcd_usbss_switch_update(WCD_USBSS_GND_MIC_SWAP_AATC, +#if IS_ENABLED(CONFIG_QCOM_WCD_USBSS_I2C) + ret = wcd_usbss_switch_update(WCD_USBSS_GND_MIC_SWAP_AATC, WCD_USBSS_CABLE_CONNECT); +#endif + return ret; } static void msm_parse_upd_configuration(struct platform_device *pdev,