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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 05BEDC34056 for ; Wed, 19 Feb 2020 18:54:09 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8354F24671 for ; Wed, 19 Feb 2020 18:54:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ah+xLdur" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8354F24671 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 BACF21697; Wed, 19 Feb 2020 19:53:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BACF21697 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1582138446; bh=qVWKmPXLQb1OpzWQpMnkRQWf9oD8AzUHso3Iav+pITE=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ah+xLdurF86j3prLtfqsTRTVFAuAslR05f0vafyqEM8eIYk3csJjNrGqbRVboL6w5 xoLK1xMtXZoAye8vptAQ/Utmeun0wPVuJ7mwwch9r4P9Z/4VIQ8QOw/1YEKHMeY/fT F2zQ8kYpr1EIWujh4903yyDkJb0pl8Pl1LbP28BU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 53073F80273; Wed, 19 Feb 2020 19:53:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2BFB6F80276; Wed, 19 Feb 2020 19:53:15 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 05335F8025F for ; Wed, 19 Feb 2020 19:53:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05335F8025F X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2020 10:53:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,461,1574150400"; d="scan'208";a="283184514" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by FMSMGA003.fm.intel.com with ESMTP; 19 Feb 2020 10:53:07 -0800 Date: Wed, 19 Feb 2020 20:53:06 +0200 (EET) From: Kai Vehmanen X-X-Sender: kvehmane@eliteleevi.tm.intel.com To: Kai Vehmanen Subject: Re: [PATCH] ASoC: soc-pcm: Revert "call snd_soc_component_open/close() once" In-Reply-To: <20200219182650.1416-1-kai.vehmanen@linux.intel.com> Message-ID: References: <20200219182650.1416-1-kai.vehmanen@linux.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7 02160 Espoo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, kuninori.morimoto.gx@renesas.com, ranjani.sridharan@linux.intel.com, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, digetx@gmail.com 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" Hey, On Wed, 19 Feb 2020, Kai Vehmanen wrote: > ASoC component open/close and snd_soc_component_module_get/put are > called independently for each component-substream pair, so the logic > in the reverted patch was not sufficient and led to PCM playback and > module unload errors. I tried to keep part of the original patch at first, but I kept hitting new issues either in component load, or in module unload-reload flow. Thanks to Pierre and Ranjani for early reviews. So in the end I ended up with a full revert. This at least works on all SOF device topologies I tested with. At the root of the problem is that component open is called with multiple substreams and driver open (and close) should be called for each substream as well. This also caused problems to the added module refcounting logic.. so that is reverted as well. Br, Kai