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 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 5D23FC43334 for ; Tue, 12 Jul 2022 08:01:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 56E24E11; Tue, 12 Jul 2022 10:00:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 56E24E11 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657612876; bh=XXz3aa2aC2vSQAHcR+WNJs9TRR4YGBOBs/Xr1Spf5gg=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YYFDAKsb7GSFd5AaZpC846cHb5sXEYnYQLjD6XoZMbGLqFZg0hqLXuKdVU/YdXuMW XqW0WqukGPxPbX+pBBbqGDlULQZANVU8FURuCrx7dCtBbOnfYGbV7fKQHmY7mo+JT7 E4NpNYd4FYxKhDVTr4YlbjtDJMN/nNKLR5DmFl8s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D47EAF8023B; Tue, 12 Jul 2022 10:00:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A768F80246; Tue, 12 Jul 2022 10:00:24 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E583AF800E8 for ; Tue, 12 Jul 2022 10:00:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E583AF800E8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WN9sSDUB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657612821; x=1689148821; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=XXz3aa2aC2vSQAHcR+WNJs9TRR4YGBOBs/Xr1Spf5gg=; b=WN9sSDUBI3olOp5I2KgI4pyeTpKFXSkDfKfb74kl9uh9aTKwc9/VMujp IyQAcDS4Nlsyusi02zJWTPqRIc04F9qSXEIBmuDqdLex3QpP/rkIsjxTS gEAL2la+yVipGbSepQ671wLugeOUdpbNPrPSvGC1SQdOStLIBJ61Jz3y+ zAGGZOAdqZkU1JX1CCpHhzsIdGBcUkwTgFP56KiIQ+C4xA5RVnSjI2HTT I2YnWNe7bDIUM85sT7K4NCgN37MTExUuwRMb3hcB0QgjGQD/qhUHkE5Ag ZpFQ8mgeMa/YzqLD4gVyR6WHcDYgRdTgfLNOzYLXUd73CAQpjNoHOLogQ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="267905687" X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="267905687" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 01:00:05 -0700 X-IronPort-AV: E=Sophos;i="5.92,265,1650956400"; d="scan'208";a="684684108" Received: from ahedstro-mobl.ger.corp.intel.com (HELO [10.249.254.175]) ([10.249.254.175]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 00:59:41 -0700 Message-ID: <48a9865b-9cf8-f99a-235f-565da9c0529d@linux.intel.com> Date: Tue, 12 Jul 2022 11:00:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.10.0 Subject: Re: Sound not working after commit bbf7d3b1c4f40eb02dd1dffb500ba00b0bff0303 on Amlogic A311D device Content-Language: en-US To: Pierre-Louis Bossart , Alex Natalsson References: <15259e38-eccf-d294-a330-a48b5bbbdedf@linux.intel.com> <18d3e724-e43f-c166-e322-26cc5e3890b7@linux.intel.com> From: =?UTF-8?Q?P=c3=a9ter_Ujfalusi?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: ALSA Development Mailing List , Kai Vehmanen , Takashi Iwai , Ranjani Sridharan , linux-sound@vger.kernel.org, Mark Brown , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 11/07/2022 17:33, Pierre-Louis Bossart wrote: > > > On 7/9/22 06:19, Alex Natalsson wrote: >>>> + if (!fe_substream) { >>>> + dev_err(fe->dev, "%s: fe_substream not initialized\n", >>>> __func__); >>>> + return -EINVAL; >>>> + } >>>> + if (!be_substream) { >>>> + dev_err(be->dev, "%s: be_substream not initialized\n", >>>> __func__); >>>> + return -EINVAL; >>>> + } >>>> + >> >> Will be this in upstream or needing bugzilla reporting message? > I created a patch based on this, see > https://github.com/thesofproject/linux/pull/3735 > > I am not sure however if this is the 'right' fix. There was a comment > from Peter Ujfalusi that a BE substream may be initialized later, but if > that's the case then the atomicity check that was introduced is done in > the wrong location. fwiw, the dpcm_apply_symmetry() have this check at line 1822: /* A backend may not have the requested substream */ if (!be_substream) continue; both dpcm_be_connect() and dpcm_apply_symmetry() are called via dpcm_fe_dai_open() line 2736-2739: /* calculate valid and active FE <-> BE dpcms */ dpcm_process_paths(fe, stream, &list, 1); ret = dpcm_fe_dai_startup(fe_substream); dpcm_fe_dai_open -> dpcm_process_paths -> dpcm_add_paths > dpcm_be_connect dpcm_fe_dai_open -> dpcm_fe_dai_startup -> dpcm_apply_symmetry If the check was added by 6246f283d5e02 ("ASoC: dpcm: skip missing substream while applying symmetry") It looks like that it is not uncommon to not have be_substream at this point... > Takashi, we could use your guidance here. > Thanks > -Pierre -- Péter