Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25842721rwd; Mon, 3 Jul 2023 01:37:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wCxj3ZHbpavXiAYYUzhg3aF9bzxmIPwBf5w/Re7uHLB89IyuPfV8EIv6ZBEaZzHSH4tLk X-Received: by 2002:a05:6808:118e:b0:3a3:7db3:81a6 with SMTP id j14-20020a056808118e00b003a37db381a6mr7911856oil.35.1688373463209; Mon, 03 Jul 2023 01:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688373463; cv=none; d=google.com; s=arc-20160816; b=fVSO4/E242dbxt65DL6joPaZDwoTZbVPbSOJZcDy4NdeabMPRSMWUQHUsruDujE9pZ 97FkkuzcRix82Rg6wcxqzlZul4Qs2Zizv1QOFy96pistF0c6/awAFTdmfB6WJ7Qk98lz c8oAni2S3qLde0QmF0OyhjApzjxSD2UvOlcMZ90Eb0yGEZc8xnQRnPp+htkBOTZnBw2T 3OdsBc5wRiyDS9PnVgEF6ud3c+Vjh2TB62lqhet90x8tcgrTr2+ZPIxHsrcWt/mP8W+z i0M1c0Q8TOxUBfGAb++o5a2qcNTuRdGo9jaNoZyCsI8yurnZHZ1PMH84Rx03vmzUvoE/ Jr3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=UpkuB3/PahTMC3E01tkVXYrfpgLpPbrbEH63Q3jfRXo=; fh=EFbpZkTZTFtcdRaixCBW1FMkKvwwx+C7HrzXcSb8ny4=; b=WiPewOyl6XVoAter2ClaortM6Zzsr3aiex09IdQbpa4fR2Jc589qMPC6GJHtlN4oJG v6EHvrxgseHUeNTsG/U9wbRbumfZIrIOmov9dpt+D3vdluxTT/Ocqoo35ak513jMf63P DxhtnD1+8wI2vLzXJDCUKXrJcF6hUFw6F/VO68llGvquNoUJXaIP9dZvHL3rI9nxMXQX zHollogJ7SD2RPpfzhJffbyBG0VzPy/T1Qn6PsmPiVkcu2q8bmKNNuggGEp0ZkIrAn1Q HAt2kfrvOEbC6s1J9PvseyO8m0Z/Ev1W6Uogmj6l8a8PXpNnUUfmlalXs4qXgNYxpliv I3NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=aJje8umu; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a64-20020a639043000000b005538aedccecsi18616804pge.565.2023.07.03.01.37.30; Mon, 03 Jul 2023 01:37:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=aJje8umu; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbjGCITp (ORCPT + 99 others); Mon, 3 Jul 2023 04:19:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbjGCITo (ORCPT ); Mon, 3 Jul 2023 04:19:44 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B66E6F; Mon, 3 Jul 2023 01:19:31 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3368B218F6; Mon, 3 Jul 2023 08:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688372370; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UpkuB3/PahTMC3E01tkVXYrfpgLpPbrbEH63Q3jfRXo=; b=aJje8umumX+wbjeh/5WR+y740OPtf3TqtEYdg8fi56N38n6f+o5F4bQKfkU1tGir/mD2Pk JtD0nyrvIaIPHs9Y2dmpNwfRdR0s7ygD8MbOfwlSdp2Gs/Oj3uSPqibe8KFrjCUPMPDlFf BykWceTpucFYTP0aqh27bgWta1D2FZI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688372370; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UpkuB3/PahTMC3E01tkVXYrfpgLpPbrbEH63Q3jfRXo=; b=jmqiKABTTV2EIlXnmTNx//2wzH20PGtjQsULnm6Zpk+W33q4yANxojTDrMLbWEhhuyqajv dYmEfZFeF01bH1CQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E4FCB138FC; Mon, 3 Jul 2023 08:19:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0OLxNpGEomQZbwAAMHmgww (envelope-from ); Mon, 03 Jul 2023 08:19:29 +0000 Date: Mon, 03 Jul 2023 10:19:29 +0200 Message-ID: <877crh76ge.wl-tiwai@suse.de> From: Takashi Iwai To: Johan Hovold Cc: Srinivas Kandagatla , Mark Brown , johan+linaro@kernel.org, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Stable@vger.kernel.org Subject: Re: [PATCH] ASoC: qdsp6: q6apm: use dai link pcm id as pcm device number In-Reply-To: References: <20230628092404.13927-1-srinivas.kandagatla@linaro.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 03 Jul 2023 10:03:52 +0200, Johan Hovold wrote: > > On Mon, Jul 03, 2023 at 09:48:34AM +0200, Johan Hovold wrote: > > On Wed, Jun 28, 2023 at 10:24:04AM +0100, Srinivas Kandagatla wrote: > > > For some reason we ended up with a setup without this flag. > > > This resulted in inconsistent sound card devices numbers which > > > are also not starting as expected at dai_link->id. > > > (Ex: MultiMedia1 pcm ended up with device number 4 instead of 0) > > > > > > With this patch patch now the MultiMedia1 PCM ends up with device number 0 > > > as expected. > > > > This appears to fix the intermittent probe breakage that I see every > > five boots or so: > > > > [ 11.843320] q6apm-dai 3000000.remoteproc:glink-edge:gpr:service@1:dais: Adding to iommu group 23 > > [ 11.867467] snd-sc8280xp sound: ASoC: adding FE link failed > > [ 11.867574] snd-sc8280xp sound: ASoC: topology: could not load header: -517 > > [ 11.867725] qcom-apm gprsvc:service:2:1: tplg component load failed-517 > > [ 11.867933] qcom-apm gprsvc:service:2:1: ASoC: error at snd_soc_component_probe on gprsvc:service:2:1: -22 > > [ 11.868379] snd-sc8280xp sound: ASoC: failed to instantiate card -22 > > [ 11.873645] snd-sc8280xp: probe of sound failed with error -22 > > > > and which I've reported here: > > > > https://lore.kernel.org/lkml/ZIHMMFtuDtvdpFAZ@hovoldconsulting.com/ > > > > as unrelated changes in timings resulting from that series made the > > problem much harder (but not impossible) to hit. > > > > With this fix, I've rebooted 20+ times without hitting the issue once. > > > > I'm guessing that you found this issue while investigated that probe > > race, Srini? It does look related, and it does seem to make the problem > > go away, but I'm not comfortable claiming that the intermittent probe > > breakage has been resolved without some analysis to back that up. > > Ok, scratch that. I just hit the race again also with this patch > applied: > > [ 11.815028] q6apm-dai 3000000.remoteproc:glink-edge:gpr:service@1:dais: Adding to iommu group 23 > [ 11.838667] snd-sc8280xp sound: ASoC: adding FE link failed > [ 11.838774] snd-sc8280xp sound: ASoC: topology: could not load header: -517 > [ 11.838916] qcom-apm gprsvc:service:2:1: tplg component load failed-517 > [ 11.838996] qcom-apm gprsvc:service:2:1: ASoC: error at snd_soc_component_probe on gprsvc:service:2:1: -22 > [ 11.839430] snd-sc8280xp sound: ASoC: failed to instantiate card -22 > [ 11.844801] snd-sc8280xp: probe of sound failed with error -22 Isn't it rather an issue about the error code passing in qcom driver? How about the change like below? Takashi --- a/sound/soc/qcom/qdsp6/topology.c +++ b/sound/soc/qcom/qdsp6/topology.c @@ -1276,10 +1276,8 @@ int audioreach_tplg_init(struct snd_soc_component *component) } ret = snd_soc_tplg_component_load(component, &audioreach_tplg_ops, fw); - if (ret < 0) { - dev_err(dev, "tplg component load failed%d\n", ret); - ret = -EINVAL; - } + if (ret < 0) + dev_err_probe(dev, ret, "tplg component load failed %d\n", ret); release_firmware(fw); err: