From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 DA4EAC433B4 for ; Tue, 27 Apr 2021 15:29:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F98F60FF1 for ; Tue, 27 Apr 2021 15:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236928AbhD0PaX (ORCPT ); Tue, 27 Apr 2021 11:30:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235974AbhD0PaW (ORCPT ); Tue, 27 Apr 2021 11:30:22 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEFB5C061574 for ; Tue, 27 Apr 2021 08:29:38 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 22EF422258; Tue, 27 Apr 2021 17:29:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1619537376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iEVFDUINoOm1rLf1JpF4YSna7leXoZim54DERO49TZg=; b=L4N6lp0+PC1eCnVBMbtTlBBkb+IzG0TBsOvw84xVahqO+Sh7B/0/M9CY15dE/d80zOyPbe xPQyAn33WuYdxKv0CcnDut2h1bdBkOToAcYb8hue/Muh7BERXKSAYvreEiwaIUTzbXMmlE I4JIhiY7P7Ly+JZ4CHEa9PAlxOeT6ts= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 27 Apr 2021 17:29:35 +0200 From: Michael Walle To: Mark Brown Cc: Guillaume Tucker , kernelci-results@groups.io, Kuninori Morimoto , Heiko Thiery , alsa-devel@alsa-project.org, Jaroslav Kysela , Liam Girdwood , Takashi Iwai , Stephan Gerhold , Thierry Reding , Jon Hunter , linux-kernel@vger.kernel.org Subject: Re: broonie-sound/for-next bisection: baseline.bootrr.asoc-simple-card-probed on kontron-sl28-var3-ads2 In-Reply-To: References: <6080e82c.1c69fb81.cd60c.2a13@mx.google.com> <3ca62063-41b4-c25b-a7bc-8a8160e7b684@collabora.com> <877dkp5141.wl-kuninori.morimoto.gx@renesas.com> <20210426144242.GF4590@sirena.org.uk> <8735vc4r59.wl-kuninori.morimoto.gx@renesas.com> <20210427101926.GA4605@sirena.org.uk> <20210427135703.GH4605@sirena.org.uk> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-04-27 16:16, schrieb Michael Walle: > Am 2021-04-27 15:57, schrieb Mark Brown: >> On Tue, Apr 27, 2021 at 03:43:42PM +0200, Michael Walle wrote: >>> Am 2021-04-27 14:51, schrieb Guillaume Tucker: >>> > On 27/04/2021 11:19, Mark Brown wrote: >>> > > On Tue, Apr 27, 2021 at 07:28:34AM +0900, Kuninori Morimoto wrote: >> >>> > > > > > If so, all sai1 - sai6 are using "fsl,vf610-sai", >>> > > > > > all saiX doesn't have .name. I think it should have different name. >>> > > > > > In your case, at least, sai5 / sai6 needs to have > > Where does that (null) come from? I've briefly tried the following > patch and I'd assume I get a duplicate for "abc-wm8904-hifi", but I > still > get the old (null)-wm8904-hifi. > > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c > index 407a45e48eee..36280008b5c6 100644 > --- a/sound/soc/fsl/fsl_sai.c > +++ b/sound/soc/fsl/fsl_sai.c > @@ -1081,6 +1081,7 @@ static int fsl_sai_probe(struct platform_device > *pdev) > sai->cpu_dai_drv.symmetric_rate = 1; > sai->cpu_dai_drv.symmetric_channels = 1; > sai->cpu_dai_drv.symmetric_sample_bits = 1; > + sai->cpu_dai_drv.name = "abc"; > > if (of_find_property(np, "fsl,sai-synchronous-rx", NULL) && > of_find_property(np, "fsl,sai-asynchronous", NULL)) { Ok here it is whats going on: We have a simple-audio-card. We use freescale/fsl-ls1028a-kontron-sl28-var3-ads2.dts. The codec name is parsed correctly and set to either f140000.audio-controller or f150000.audio-controller. Thus have different names. _But_ later asoc_simple_canonicalize_cpu() will reset the dai_name pointer to NULL in simple_parse_node() if "single" is 1 and then we end up having two links with the same name. Which begs the two questions: (1) What is "single" actually and when should it be 1? (2) If single is 1, then the sysfs file will be named "(null)-codec-name". Do we want that? I guess there is a reason for it to be set to NULL, see [1]. -michael [1] https://elixir.bootlin.com/linux/v5.12/source/sound/soc/generic/simple-card-utils.c#L420