From patchwork Mon Jul 10 01:20:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 701117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21A2AEB64DC for ; Mon, 10 Jul 2023 01:23:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D3D0E207; Mon, 10 Jul 2023 03:22:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D3D0E207 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688952214; bh=uHfGZsWQlIaWPXIOISjEx33qMR61fUrzglPCK8bC7AY=; h=Date:From:Subject:To:Cc:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TMcOrCcbjL9MboHXhbs+PmCqdcEYYNJst7SCQyvSZubpWAYG9x06HbZxIKr3fSE2O QUR4IiqWVJrgJONXBnDXleP3KPQxxKZsja5h0dAnkpFlM6IOKTTfmJWZ6r9NekOhmM FXMBANnJsQ9OuEQ0t0I7lgSPYrtBGLimFJf+DGGM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B800FF805E0; Mon, 10 Jul 2023 03:20:46 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8C422F80563; Mon, 10 Jul 2023 03:20:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED994F8053B; Mon, 10 Jul 2023 03:20:43 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 3F2B0F8047D for ; Mon, 10 Jul 2023 03:20:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3F2B0F8047D Date: 10 Jul 2023 10:20:38 +0900 X-IronPort-AV: E=Sophos;i="6.01,193,1684767600"; d="scan'208";a="167840802" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 10 Jul 2023 10:20:38 +0900 Received: from venus.renesas.com (unknown [10.166.252.89]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 92918400B9EE; Mon, 10 Jul 2023 10:20:38 +0900 (JST) Message-ID: <877cr8o93t.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 11/15] ASoC: rsnd: use DAI driver ID instead of DAI ID User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown , Cezary Rojewski , "Pierre-Louis Bossart" , =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= Cc: Linux-ALSA In-Reply-To: <87mt04o96f.wl-kuninori.morimoto.gx@renesas.com> References: <87mt04o96f.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Message-ID-Hash: FCY5LQSF3TDEFOL74NHHRYPMCD2CDFNN X-Message-ID-Hash: FCY5LQSF3TDEFOL74NHHRYPMCD2CDFNN X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Current rsnd is using DAI ID to get own priv data without setting driver->id. It was no problem for Single Component, but will be problem in case of Multi Component, because it is not a DAI serial number. struct snd_soc_dai *snd_soc_register_dai(...) { ... if (dai_drv->id) dai->id = dai_drv->id; else dai->id = component->num_dai; ... } This patch sets driver->id, and get serial number. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6a522e6dd85a..f3f17b784025 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1378,6 +1378,7 @@ static void __rsnd_dai_probe(struct rsnd_priv *priv, drv->name = rdai->name; drv->ops = &rsnd_soc_dai_ops; drv->pcm_new = rsnd_pcm_new; + drv->id = dai_i; io_playback->rdai = rdai; io_capture->rdai = rdai;