Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3531548imm; Sun, 10 Jun 2018 19:15:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLw9qOXXU0Iglfp2dfFT/qKHtBxzY5VJhMa5JSBj4MWJ7fEWrTxsMwsz+7S4qN48UKxiSrV X-Received: by 2002:a62:5788:: with SMTP id i8-v6mr15346363pfj.175.1528683317769; Sun, 10 Jun 2018 19:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528683317; cv=none; d=google.com; s=arc-20160816; b=hfdXF7aV8kl8+JCvQuu8Eol7UJB1nEdZmBq6VS1/CCMegoIjUGXXO4RO6aj0QYpH9/ fllJlE+PUqiLHyq9u0v47CeUqxqgF04KTeehVJccbZ0MsJxgGiBUNr6YutXduEejWQZS ELj/7rAbeqIfQnzXwDrQKUpUs9MqsTtnSd0922KzHXt7rPNVC/qrLeZebbm4j9Ycw5h4 fnEn+BcGzg5X2C5Na20bI2btoix/MtKLEPqt/+b9bJFHLXUgMJMstp5pZKbjfwE6oIZi nK0lHEDKgslrFSARS14C4gUOSv8BrNwac0AkxStOB+t40Hv3TpV3ML51mUMpsaWhrcrv Db+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:arc-authentication-results; bh=8Uq6u93H0mtx06sVkMYW9w+IlZ8pjdcrjJFcB8+YCjE=; b=fRUe8nbxcWCZQBzyKjt1jh7D2Xz4eMiGdybeDqm/qNTa1bntb7iuP8yjk0MBvl0qv+ FHy7+BAo8vhX7LM+JcCpGi9SScnrA18nzHgQ2gBKW7WZZEr391AF+z6vWf9ZwNbEEghF kZaht3yhoYKggMvruTJZnYSU+KThq7FCzQBCN+n6KDVGaDvpvbuJvY3EtSiYGrzTQnes f41cnjD00P26BtGuQfrhqO88B+bMI1UTRfZtxkpNUF9IoOcEM3zLBtzU1IEYvgEhDFxp FF+ZGgLj2/wl/a04U3pQL6lyYr0Jk94xO4pp66oozleF584lo4oKdXXHUrLIlo4uQTUX 2U/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si62348813plz.364.2018.06.10.19.15.03; Sun, 10 Jun 2018 19:15:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753889AbeFKCOf (ORCPT + 99 others); Sun, 10 Jun 2018 22:14:35 -0400 Received: from mx.socionext.com ([202.248.49.38]:16895 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753738AbeFKCOe (ORCPT ); Sun, 10 Jun 2018 22:14:34 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 11 Jun 2018 11:14:33 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 96F44600E8; Mon, 11 Jun 2018 11:14:33 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Mon, 11 Jun 2018 11:14:33 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id 22D66403FD; Mon, 11 Jun 2018 11:14:33 +0900 (JST) Received: from DESKTOPFLNNJ4T (unknown [10.213.132.95]) by yuzu.css.socionext.com (Postfix) with ESMTP id EE339120139; Mon, 11 Jun 2018 11:14:32 +0900 (JST) From: "Katsuhiro Suzuki" To: "'Kuninori Morimoto'" Cc: "Mark Brown" , , "Masami Hiramatsu" , "Jassi Brar" , , References: <20180608080843.11097-1-suzuki.katsuhiro@socionext.com> <87h8makxt7.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <87h8makxt7.wl-kuninori.morimoto.gx@renesas.com> Subject: Re: [PATCH] ASoC: audio-graph-card: add hp and mic detect gpios same as simple-card Date: Mon, 11 Jun 2018 11:14:29 +0900 Message-ID: <007301d40129$ee1c8380$ca558a80$@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHT/v/sk6RFhax+8k+xLUCtlsNRTaRZl3KAgAC9klA= Content-Language: ja x-securitypolicycheck: OK by SHieldMailChecker v2.5.2 x-shieldmailcheckerpolicyversion: POLICY180220 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Morimoto-san, Thank you for your reviewing. > -----Original Message----- > From: Kuninori Morimoto > Sent: Monday, June 11, 2018 8:53 AM > To: Suzuki, Katsuhiro > Cc: Mark Brown ; alsa-devel@alsa-project.org; Masami Hiramatsu > ; Jassi Brar ; > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] ASoC: audio-graph-card: add hp and mic detect gpios same as > simple-card > > > Hi Katsuhiro-san > > Thank you for your patch > > > This patch adds headphone and microphone jack detection gpios as same > > as simple-card driver. This feature move into simple-card-utils from > > simple-card to avoid the duplicating code. > > > > Signed-off-by: Katsuhiro Suzuki > > --- > > I think it can be 2 patches ? > 1. move function from simple-card to simple-card-utils > 2. use it from audio-graph-card > OK, I'll split this patch. > > +static int asoc_graph_soc_card_probe(struct snd_soc_card *card) > > +{ > > + struct graph_card_data *priv = snd_soc_card_get_drvdata(card); > > + int ret; > > + > > + ret = asoc_simple_card_init_hp(card, &priv->hp_jack, NULL); > > + if (ret < 0) > > + return ret; > > + > > + ret = asoc_simple_card_init_mic(card, &priv->mic_jack, NULL); > > + if (ret < 0) > > + return ret; > > + > > + return 0; > > +} > > + > > static int asoc_graph_card_probe(struct platform_device *pdev) > > { > > struct graph_card_data *priv; > > @@ -319,6 +336,7 @@ static int asoc_graph_card_probe(struct platform_device > *pdev) > > card->num_links = num; > > card->dapm_widgets = asoc_graph_card_dapm_widgets; > > card->num_dapm_widgets = ARRAY_SIZE(asoc_graph_card_dapm_widgets); > > + card->probe = asoc_graph_soc_card_probe; > > Current simple-card is calling init_hp/init_mic from > asoc_simple_card_dai_init(), and audio-graph-card has > asoc_graph_card_dai_init(). > simple/audio card are doing samethings in different style. > Thus, I want to synchronized whole simple/audio card. > Indeed. I need to add more one patch. 1. move function from simple-card to simple-card-utils 2. change calling init_hp/mic from soc_dai_link.init() to soc_card.probe() 3. use it from audio-graph-card Regards, -- Katsuhiro Suzuki > Best regards > --- > Kuninori Morimoto