Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3340915pxx; Mon, 2 Nov 2020 06:30:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJrEvMJtIIBKyTucZ6U1OikFZIM0pkEyBfjhdRym4mkJylu91aqWquVorr8da4gkMQZrXc X-Received: by 2002:a17:906:6545:: with SMTP id u5mr15522143ejn.346.1604327446982; Mon, 02 Nov 2020 06:30:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604327446; cv=none; d=google.com; s=arc-20160816; b=oqSdq8rh5zwck1FUfry/zxsgtRaUXUVTwFBBfVQTDhOc4dtbKoNjKHjaChFl/Suty4 kjTVyX7AXEMNpnKvbPQbhWVOK0t7/7vluRjIYJxHVzs/WY6ud+7+7sobJRSNB3Rg7IVN JQtjXeFD1VXR+XxNFayRHmpw/OwGwh+2SbY9FDJfQ2mLgGMchiWsSwnINQNbYuCh8FiD 8A2L8KtR0puilouqtAY7aCbAa90gAd5n0rEjGH6yCp78Zb+TFcDLfOsL2tKOzBJVCcMx b6KMIrG25AovCz/7lTlSHdQHYzSKeBY9VXC/IxazW/Z7z6VNjwSklqymcXNUEeqn9+pH rt/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KxbCraeiLdRhhJpaK4sNkK6tPwuu92CTTqqZ8+wCJio=; b=bOiXrjbqnAhtGZ4pukxZUb4fOIDczIIv8JMUaXuL3g4pnq50sWNQw8QKyjSWRVavDS STBEVnPrQ3LRPyNrOnHZVF4G9i8sBF7v4kMb1ZQIU0tF7vPE3s+z8X3Ha8jco2ck9dLN LhjB3odnqxISfEqowyQfr0AXG0r+vd9nye/ZInvbTdbqvM3ohABC3VQc28i2Kbk79uOA kq1TNE6cV8c+ZrRmsXzKk6xYNKOA3lXBgpAIeI34ylD0szWZD/TULoLZAioi6mNoIBxr Oq20WamlSG3HuHTShIIvd5Eld9IAmWSPqalmMlEWpoCI1fjkSrEBr3n9ApjieTEKksSG 4M2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZM4LaTgz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 63si3488518edb.454.2020.11.02.06.30.24; Mon, 02 Nov 2020 06:30:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZM4LaTgz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725940AbgKBON6 (ORCPT + 99 others); Mon, 2 Nov 2020 09:13:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbgKBON5 (ORCPT ); Mon, 2 Nov 2020 09:13:57 -0500 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76CBEC0617A6 for ; Mon, 2 Nov 2020 06:13:57 -0800 (PST) Received: by mail-lf1-x141.google.com with SMTP id a7so17619347lfk.9 for ; Mon, 02 Nov 2020 06:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KxbCraeiLdRhhJpaK4sNkK6tPwuu92CTTqqZ8+wCJio=; b=ZM4LaTgzml5bUPWSYTKj3diGMPNamkdpShH5l8t1VMnmUehipaDrX71br6RaGOveNc /yl8Xzi0wn8Cxlsb498dQw5DOCL5LLMqIUxozIqEL8Jv/Dfj/H+Bb9yIVxfgwO2Qgwq3 eUytQo5ExrWGWR6O4ZESs3SNl+spxTGTn5gsYW9CwiSsMuMHxhVbhV+NhCgL3wDzIWn4 Ht6OUKJNYAkn1Hfq3yRM9OUyYjva3aGEPid7gLU80nOcfW8sb4adbwyvbbNYDBFH4WqG 26EaYiNDR9YIwdHeFIDLSJilMRqoe/8Z2OeUaLrrI1jXOwP2uh3xV7We0sPiS4LFhUPm 1lxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KxbCraeiLdRhhJpaK4sNkK6tPwuu92CTTqqZ8+wCJio=; b=c+DAvQ5r4XMG0yGRPX640IsGPLd56uzwRrMSNs/mfqovEtaKa7tHmkkRrsSMmenxot nwjXoNZKRLKstjCTFSbF1dxC3C0MANcI+su5dLTYxF08K8FkY6EIePaO7pUHbzorQ7C9 2vIE9njZ8QHgRH8bM7hz3nS6kI+4ViUPWM+DtMmGJDIUB9oedRJZGhSLno8dLsIzLdF8 wSfrjqAYQH98BJxRqLkVUB/+S5HQpjUrHyr5ekaKGFQI1ojlVgLjvZVoyFxiNDsIVyH+ 1fQ0lewhqedbmMlGh1YCPhnMwc3Mitc5+zroUx21GONnuUHf0/SYSmmgTeioa09QZbfz SATA== X-Gm-Message-State: AOAM531SML8bf85DbX6MGawKFR15PGMhr/h2TvOFXh5x03583uLUoDNL qh0zqIrL4y7IVzQC54wo+a8h9K1Z5VW6kzQKZpeZzw== X-Received: by 2002:a19:a56:: with SMTP id 83mr4927665lfk.131.1604326435967; Mon, 02 Nov 2020 06:13:55 -0800 (PST) MIME-Version: 1.0 References: <20201102062408.331572-1-ajye_huang@compal.corp-partner.google.com> <20201102062408.331572-3-ajye_huang@compal.corp-partner.google.com> In-Reply-To: From: Ajye Huang Date: Mon, 2 Nov 2020 22:13:45 +0800 Message-ID: Subject: Re: [PATCH v3 2/2] ASoC: qcom: sc7180: Modify machine driver for 2mic To: Tzung-Bi Shih Cc: Ajye Huang , Linux Kernel Mailing List , Mark Brown , Rohit kumar , Banajit Goswami , Patrick Lai , Srinivasa Rao Mandadapu , Srini Kandagatla , Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , Cheng-Yi Chiang , Tzung-Bi Shih , Douglas Anderson , "moderated list:ARM/Mediatek SoC support" , linux-arm-msm , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , ALSA development Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 2, 2020 at 6:46 PM Tzung-Bi Shih wrote: > > On Mon, Nov 2, 2020 at 2:24 PM Ajye Huang wrote: > > > > 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 > > I am not sure if it would be better if you use another email (e.g. > @gmail) for signoff. > hi, Tzung-Bi Thank you for your review, it's our company's rule to use this PD account > > +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); > > + > > + if (data) > > You don't need to check for NULL. If snd_soc_card_get_drvdata() > returns NULL, it shouldn't run into here. See other > snd_soc_card_get_drvdata() calls in the file. > your are right, I will remove on v4 > > +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); > > + > > + if (data) { > > Ditto. > I will remove it on v4 > > + if (IS_ERR(data->dmic_sel)) { > > + dev_err(&pdev->dev, "DMIC gpio failed err=%d\n", > > + PTR_ERR(data->dmic_sel)); > > + return PTR_ERR(data->dmic_sel); > > Remove 1 level indent. Your are really attentive, I will remove the indent on v4, thank you so much.