Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3660221imm; Sun, 10 Jun 2018 22:42:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJbmv1ZbDdno7BDaK4F8v0gwZ2VohW0IpvB2bfEvaY9FJgYahLEgwlxYLBYxkc0O+s7fV6Q X-Received: by 2002:a63:9a01:: with SMTP id o1-v6mr13398538pge.439.1528695736597; Sun, 10 Jun 2018 22:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528695736; cv=none; d=google.com; s=arc-20160816; b=IZtBCr1WVPi1eBIlI2N15srCuV6luqGq1hDHqgWT4XLAl2CLi7WaI1Yun0DaFkt/Da PtanQWN/n1XY3y43Qcc4YFWkJKwUfZ6HYnKqAOpcW0I7IZmulSNrMOl04mv/oSH2lOcp BW1UQI68WwzY4KN1KWRIfSbLc0Nd9S5/R7QlsQ4XGloXoTo9jhhWcGt7LSejsyY28zhN c3k6G/9uHKwX9vcFdtKsQzqj/P7zrMaIu2BfJjKgcO6AaEL4Lk5rmQCKFS8qxIStuuDA kNuPCyHqO8s4Np/9PTo/uro4Odz1vtnx+rUAJzv6wH7ea/IqysDMyE2evef9EnyozF1r M49w== 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=C3WWHcjlhFGXSeRO+m3Ms686EDkfjM0VYZ/oKDHvGG0=; b=vmZU7tawNNwr4toj80Oi07tCpezD5STG79OX43+IQY5t0+gq74CCDhuQapKpcKnmzD oPuwGxtlQVM9BMEu36EdwSHTmUVqdYXFLFdyQqQtWyOsJrNtLanqAoXoR5Eac/ZweVpO 4OXvQJlYz94jg7cwCXF4fwal02UcT7YeVpZz1EGpAnqQK1z1aMLsOf/A0K4p8ScNup01 ugmf/+CduzpfFC2k3DRGuC+jMZ2ZJMbQWQd5aH4PVfuWKi/FDlMOOgd8p61bdl6H/FmS Lyu9vSDO/7RtpVHI9YAJBpDFGSnMs93SZiMmgjM+0QXRFRsDrsIC+ERVyOy53WPqlN9Z dSTw== 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 n10-v6si60895396pfe.70.2018.06.10.22.42.02; Sun, 10 Jun 2018 22:42:16 -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 S1753977AbeFKFj4 (ORCPT + 99 others); Mon, 11 Jun 2018 01:39:56 -0400 Received: from mx.socionext.com ([202.248.49.38]:20223 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753750AbeFKFjz (ORCPT ); Mon, 11 Jun 2018 01:39:55 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 11 Jun 2018 14:39:54 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 57F5A6006F; Mon, 11 Jun 2018 14:39:54 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Mon, 11 Jun 2018 14:39:54 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id E409740389; Mon, 11 Jun 2018 14:39:53 +0900 (JST) Received: from DESKTOPFLNNJ4T (unknown [10.213.132.95]) by yuzu.css.socionext.com (Postfix) with ESMTP id BBE1F120139; Mon, 11 Jun 2018 14:39:53 +0900 (JST) From: "Katsuhiro Suzuki" To: "'Kuninori Morimoto'" Cc: "Mark Brown" , , "Masami Hiramatsu" , "Jassi Brar" , , References: <20180611051559.18082-1-suzuki.katsuhiro@socionext.com> <20180611051559.18082-2-suzuki.katsuhiro@socionext.com> <87tvq96gnm.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <87tvq96gnm.wl-kuninori.morimoto.gx@renesas.com> Subject: Re: [PATCH v2 2/3] ASoC: simple-card: move hp and mic detection to soc_card probe Date: Mon, 11 Jun 2018 14:39:50 +0900 Message-ID: <007401d40146$9ddaaec0$d9900c40$@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: AQHUAUNKMw3htV1h6EmRYccv/MXyMaRZ8EuAgACXr0A= 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, > -----Original Message----- > From: Kuninori Morimoto > Sent: Monday, June 11, 2018 2:27 PM > 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 v2 2/3] ASoC: simple-card: move hp and mic detection to soc_card > probe > > > Hi Katsuhiro-san > > > This patch moves headphone and microphone detection to probe() of > > snd_soc_card from init() of snd_soc_dai_link. This is because init() > > is called (and an input device /dev/input/eventX is created too) > > twice or above if simple card has two or more DAI links. > > > > Signed-off-by: Katsuhiro Suzuki > > or above ? > It seems if simple card has multiple DAI links, it creates multiple input devices. For example simple card has 3-links, 3 input devices /dev/input/event0, event1, event2 are created. Is it correct? > > - ret = asoc_simple_card_init_hp(rtd->card, &priv->hp_jack, PREFIX); > > - if (ret < 0) > > - return ret; > > - > > - ret = asoc_simple_card_init_mic(rtd->card, &priv->mic_jack, PREFIX); > > - if (ret < 0) > > - return ret; > (snip) > > + 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; > > I think we want to keep "PREFIX" ? > Oops... Thank you. I'll fix it. Regards, -- Katsuhiro Suzuki > > Best regards > --- > Kuninori Morimoto