From patchwork Fri Nov 6 06:14:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ajye huang X-Patchwork-Id: 11886117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F7B1C388F2 for ; Fri, 6 Nov 2020 06:15:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2433420867 for ; Fri, 6 Nov 2020 06:15:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wElqrNDP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j3j3Ypm3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2433420867 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YZrA98uubOuDL2M3yLwsHDVb7InlOz3BVc31+PW7fsg=; b=wElqrNDPJoDso/dUINXyOboQY JVSNZ4LUOB5UExV39t6bhEOlyKkoLhbFxKHZcD7o+iVv/Pu+pWjToNhrVm/uSO/An7uv8Inhpa78G Dd/f7Vc5sKB0FJZMBbjEGjjqcQtWIfDpLPuL/UrbF3aeeK9r2anKqHqIQWOTxBDa2m0FftcwBHxOK QzrzYzQ5m/36C2vvZ0PzOTdD2WJYhqiPHu+SvTFYJji3PFJNcqp+b7rjy4ph6bm7nrclP/lArTDXM U25gRtaF1gJPLPVVT9OZ0KE9xROOdYjEPZmID6vxL7jCD6EpsK7qsdq7qeZGHejCfvV3CpWx4aqNG xjHtzVPyg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kav1P-0002KU-I5; Fri, 06 Nov 2020 06:14:51 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kav1N-0002JB-9k for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 06:14:50 +0000 Received: by mail-pg1-x531.google.com with SMTP id h6so143022pgk.4 for ; Thu, 05 Nov 2020 22:14:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l5wJhSF1myKTxNCEOkUYzTRb2ml1CsAb8yYtcmdDQEc=; b=j3j3Ypm3ruFiRx011vvNly7A5X1a5FTVUBD0VHrZdFLR2zwy/mlqzqfssGSOSUX7kz MieivpEEWrdLOc1R3xFYVIB6oKzXWqyW4jFiVluwTwT7K0Wbt4oe1XsifHVWEtD43WcU SlDwmaEtn8FUGoMr8wiBnYXLRcgTTLoT4eAheSe/5hKUMRdJvbEDhfIYPXZAygzxdIj7 2jzoJ4zmcQqY7LZwBHvbNQGtCDMPML/lCvfroFN7BxyVdyxgKc9qCIFMRS6bAOJghScK bcNOSO/xGqt+3tAZfI2Ner2fjeGL3GWjaTzijlUDG5a1GJGBN1Uio3icMREanKlpTI5T I8aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l5wJhSF1myKTxNCEOkUYzTRb2ml1CsAb8yYtcmdDQEc=; b=q6ATzYf6tu9/RQMKdguBIwQlzUa1ToxEBozJqOSvN+MXos+Ht4Hz7yD2VG/KtqJPCd DsKRtgWAOxvl72gSByIamUyQB3MLcgmpu/Eav6xgMXNmZfrAr7fAvnzysTG+cSaqv36T eYdgY4MUwFC0StVkmJA6HlxHJ6osLsuFTiJ4w1BgfJi0qOyOv4QkL4GF+eYIT/FzPhjL HPMOBGMACUlWIaX4Jru0BpvcUobcofl6lI52KkG/H/MuUsRYhJ8wqTSxjvohbD5aUdTF QaJofuPHJX8Qdin3krHc8e4aszv6nsoToENCdGfivTCZettt3R7SXklRAZX1PxnOCvzw XKaQ== X-Gm-Message-State: AOAM531WAxgj+l0eYFlpzhXzP7dz5kZXVKfuNidnpInFhIeGPz+/41UJ r5iuh92O/KViaL3KQvSfuEo= X-Google-Smtp-Source: ABdhPJx3Ggm4pls83AmffE9szLmq4frqWWbLnvgrh2jxFHSlCYaeyAYS0j8558fwaKy/sRuhwrFFhQ== X-Received: by 2002:a62:17c8:0:b029:18b:5a97:a8d1 with SMTP id 191-20020a6217c80000b029018b5a97a8d1mr467274pfx.15.1604643285394; Thu, 05 Nov 2020 22:14:45 -0800 (PST) Received: from localhost (114-34-18-97.HINET-IP.hinet.net. [114.34.18.97]) by smtp.gmail.com with ESMTPSA id q5sm746472pjj.26.2020.11.05.22.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 22:14:44 -0800 (PST) From: Ajye Huang X-Google-Original-From: Ajye Huang To: linux-kernel@vger.kernel.org Subject: [PATCH v6 1/2] ASoC: google: dt-bindings: modify machine bindings for two MICs case Date: Fri, 6 Nov 2020 14:14:32 +0800 Message-Id: <20201106061433.1483129-2-ajye_huang@compal.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106061433.1483129-1-ajye_huang@compal.corp-partner.google.com> References: <20201106061433.1483129-1-ajye_huang@compal.corp-partner.google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_011449_388937_AE34AA75 X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dianders@chromium.org, robh@kernel.org, alsa-devel@alsa-project.org, Banajit Goswami , Srinivasa Rao Mandadapu , Liam Girdwood , linux-arm-msm@vger.kernel.org, Patrick Lai , Ajye Huang , Andy Gross , Rob Herring , Bjorn Andersson , devicetree@vger.kernel.org, Mark Brown , Rohit kumar , tzungbi@chromium.org, srinivas.kandagatla@linaro.org, Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, cychiang@chromium.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a property "dmic-gpios" for switching between two MICs. Signed-off-by: Ajye Huang Reviewed-by: Rob Herring --- .../devicetree/bindings/sound/google,sc7180-trogdor.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml index efc34689d6b5..ce050a9dec94 100644 --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml @@ -34,6 +34,10 @@ properties: "#size-cells": const: 0 + dmic-gpios: + maxItems: 1 + description: GPIO for switching between DMICs + patternProperties: "^dai-link(@[0-9])?$": description: @@ -83,7 +87,7 @@ examples: - | sound { compatible = "google,sc7180-trogdor"; - model = "sc7180-rt5682-max98357a-1mic"; + model = "sc7180-rt5682-max98357a-2mic"; audio-routing = "Headphone Jack", "HPOL", @@ -92,6 +96,8 @@ examples: #address-cells = <1>; #size-cells = <0>; + dmic-gpios = <&tlmm 86 0>; + dai-link@0 { link-name = "MultiMedia0"; reg = <0>; From patchwork Fri Nov 6 06:14:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ajye huang X-Patchwork-Id: 11886119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89C81C4741F for ; Fri, 6 Nov 2020 06:15:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DB11208FE for ; Fri, 6 Nov 2020 06:15:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TCAGPRJs"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RPQyg8Vl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DB11208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CAWjc3lwxKKp4s9r/K0Wmy31WVi3N4zuLDX1V6XH958=; b=TCAGPRJsH2a/Qrg/WqvZff3zZ 1Ck84gZIWPpQFF0sWO+BWZGgsH0cwMcXTpgUX/skbyZ/2wy7MndpF4DA0srqUeO030N8uO7fk99Ib 2agxSFnfHQQKbN0ZFADyhxNqgsQvEKyALnlsn39c1vb9aKmQFQO3I5e5dpX8lmWJONE0FoTQwWOQr 7YltlSnQAluINY+fJ7ln1ze40Z622JN4ItbS846BaCTfZEU7KrgkJZGjxgJFS/ZaVE/YkObOx6B+6 +/WWiJ+pfewW6BwBB7JaNJorAvRqrPMo1gXvDeCWzs2vEHY95jqp32S7S7QEK5Fh9gudscRPLwa5m VfPVvkn6g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kav1T-0002Lm-Rd; Fri, 06 Nov 2020 06:14:55 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kav1Q-0002KX-Hi for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 06:14:53 +0000 Received: by mail-pg1-x544.google.com with SMTP id h6so143178pgk.4 for ; Thu, 05 Nov 2020 22:14:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bCp02/KdQKO37j/RsLXZ8/YoseoQ3xQo6vzDe5cyZuo=; b=RPQyg8VlQXYTcKx7JG93r5AqtGwDivqYuef5SRML9Q8LE9NtXaev+IzySz18wcZtD2 KpXVZ1UrZZMdHeov6F9bbIjiXTPHKgtp8QPxDQIblYF6d+X89V3v8mR0KfLTPPLnIWTB bwMOxtHh00t85QaI2uCXsTIv0SDChH85rfy73OwsYRiab5j/GfFNLdZXMDLgrP1x/I8x kirgnzX6G6LF1gduufsKqljmEbiDh8UTLqmSPNB7Dw5KndkxxMPsEFCYhUSwiD8QLQoH RZK0ruxtOgorUO+nz++CbTDA7EDAH3gjtEeoguGuB1K74evvp73fNP1Tyuo0R0X+0wyl tGKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bCp02/KdQKO37j/RsLXZ8/YoseoQ3xQo6vzDe5cyZuo=; b=IvjdEcXokDsYlnTHka5wUt+JONcI+RYDGtavNm0Z65kKQnm9D2R8ZIMHf5OK3VbBqo DJHml3JfInJ4mOQG8aBpJgEDu4pc4V0qGx15aR0QAdmhCElL4Z4Lu5vpphZx65+993mm Y6a4v5QBbhHKCT49awQpcXm/1uP+afjn4gqRbBBF/K3fjqHMAE4213+e4m0Cn6DTz8uA ugA14wFNGI/5/S1wuP3x7eO+hXWv1kQZeabvsRINih9xWTSvoaL764UVWpY3JI8lL2qK 71FgzSFujAEaDLxsXDlYgdrUQ64Nio+9oAOFYuMVpVp2gp/x3w9M4gI/1D/s14GLWbfn uK9g== X-Gm-Message-State: AOAM530mBhgG0ZoFZwECGmIVjxZJdBeg9wiD2jBWXhr9xpVzdsfSU7qh EueLzifpsGYjCae9aZUwisg= X-Google-Smtp-Source: ABdhPJwYPI2jygviL6WUqycB2ajwbeQhCK7O2POs7mepgfAE5dnjkpnarP8n78DdOzaHEy1DEvBHeQ== X-Received: by 2002:a17:90a:aa15:: with SMTP id k21mr744725pjq.169.1604643290556; Thu, 05 Nov 2020 22:14:50 -0800 (PST) Received: from localhost (114-34-18-97.HINET-IP.hinet.net. [114.34.18.97]) by smtp.gmail.com with ESMTPSA id b2sm425171pgg.2.2020.11.05.22.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 22:14:50 -0800 (PST) From: Ajye Huang X-Google-Original-From: Ajye Huang To: linux-kernel@vger.kernel.org Subject: [PATCH v6 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic Date: Fri, 6 Nov 2020 14:14:33 +0800 Message-Id: <20201106061433.1483129-3-ajye_huang@compal.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106061433.1483129-1-ajye_huang@compal.corp-partner.google.com> References: <20201106061433.1483129-1-ajye_huang@compal.corp-partner.google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_011452_656917_16B03FD2 X-CRM114-Status: GOOD ( 16.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dianders@chromium.org, robh@kernel.org, alsa-devel@alsa-project.org, Banajit Goswami , Srinivasa Rao Mandadapu , Liam Girdwood , linux-arm-msm@vger.kernel.org, Patrick Lai , Ajye Huang , Andy Gross , Rob Herring , Bjorn Andersson , Tzung-Bi Shih , devicetree@vger.kernel.org, Mark Brown , Rohit kumar , tzungbi@chromium.org, srinivas.kandagatla@linaro.org, Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, cychiang@chromium.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In addition, having mixer control to switch between DMICs by using "dmic-gpios" property. Refer to this one as an example, commit b7a742cff3f6 ("ASoC: AMD: Use mixer control to switch between DMICs") Signed-off-by: Ajye Huang Reviewed-by: Tzung-Bi Shih --- sound/soc/qcom/sc7180.c | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c index b391f64c3a80..455d3f2b8ce8 100644 --- a/sound/soc/qcom/sc7180.c +++ b/sound/soc/qcom/sc7180.c @@ -5,6 +5,8 @@ // sc7180.c -- ALSA SoC Machine driver for SC7180 #include +#include +#include #include #include #include @@ -28,6 +30,8 @@ struct sc7180_snd_data { u32 pri_mi2s_clk_count; struct snd_soc_jack hs_jack; struct snd_soc_jack hdmi_jack; + struct gpio_desc *dmic_sel; + int dmic_switch; }; static void sc7180_jack_free(struct snd_jack *jack) @@ -169,6 +173,27 @@ static int sc7180_snd_startup(struct snd_pcm_substream *substream) return 0; } +static int dmic_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol); + struct sc7180_snd_data *data = snd_soc_card_get_drvdata(dapm->card); + + ucontrol->value.integer.value[0] = data->dmic_switch; + return 0; +} + +static int dmic_set(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol); + struct sc7180_snd_data *data = snd_soc_card_get_drvdata(dapm->card); + + data->dmic_switch = ucontrol->value.integer.value[0]; + gpiod_set_value(data->dmic_sel, data->dmic_switch); + return 0; +} + static void sc7180_snd_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; @@ -206,6 +231,30 @@ static const struct snd_soc_dapm_widget sc7180_snd_widgets[] = { SND_SOC_DAPM_MIC("Headset Mic", NULL), }; +static const char * const dmic_mux_text[] = { + "Front Mic", + "Rear Mic", +}; + +static SOC_ENUM_SINGLE_DECL(sc7180_dmic_enum, + SND_SOC_NOPM, 0, dmic_mux_text); + +static const struct snd_kcontrol_new sc7180_dmic_mux_control = + SOC_DAPM_ENUM_EXT("DMIC Select Mux", sc7180_dmic_enum, + dmic_get, dmic_set); + +static const struct snd_soc_dapm_widget sc7180_snd_dual_mic_widgets[] = { + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_MIC("Headset Mic", NULL), + SND_SOC_DAPM_MIC("DMIC", NULL), + SND_SOC_DAPM_MUX("Dmic Mux", SND_SOC_NOPM, 0, 0, &sc7180_dmic_mux_control), +}; + +static const struct snd_soc_dapm_route sc7180_snd_dual_mic_audio_route[] = { + {"Dmic Mux", "Front Mic", "DMIC"}, + {"Dmic Mux", "Rear Mic", "DMIC"}, +}; + static void sc7180_add_ops(struct snd_soc_card *card) { struct snd_soc_dai_link *link; @@ -238,6 +287,18 @@ static int sc7180_snd_platform_probe(struct platform_device *pdev) card->dapm_widgets = sc7180_snd_widgets; card->num_dapm_widgets = ARRAY_SIZE(sc7180_snd_widgets); + if (of_property_read_bool(dev->of_node, "dmic-gpios")) { + card->dapm_widgets = sc7180_snd_dual_mic_widgets, + card->num_dapm_widgets = ARRAY_SIZE(sc7180_snd_dual_mic_widgets), + card->dapm_routes = sc7180_snd_dual_mic_audio_route, + card->num_dapm_routes = ARRAY_SIZE(sc7180_snd_dual_mic_audio_route), + data->dmic_sel = devm_gpiod_get(&pdev->dev, "dmic", GPIOD_OUT_LOW); + if (IS_ERR(data->dmic_sel)) { + dev_err(&pdev->dev, "DMIC gpio failed err=%ld\n", PTR_ERR(data->dmic_sel)); + return PTR_ERR(data->dmic_sel); + } + } + ret = qcom_snd_parse_of(card); if (ret) return ret;