From patchwork Wed Jan 26 01:16:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liao, Bard" X-Patchwork-Id: 536793 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 81F78C5DF62 for ; Wed, 26 Jan 2022 01:18:33 +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 7884E1F65; Wed, 26 Jan 2022 02:17:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7884E1F65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1643159911; bh=rqczjyKj/SlLMVDMYtVBQmFXTLQ/61Vrv+fruQKZRP8=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=jgsJQkNFDk6VB1Bl1dF5EVeUHJbom9KuNRVfrlCRkCs7uo8u4WnzGBkHbBYeCCj4y yKZ8yZr7KYbylCKsfmMX83I0oH8QusdYLl770VVbSNwyzzJYQoUINFvcXwHIhiUSXB CK97+6AoouLzjRzBHN6/0oGJNMwwW0w4CI30Reqk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0C2B0F804CF; Wed, 26 Jan 2022 02:17:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2C647F80118; Wed, 26 Jan 2022 02:17:38 +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 32765F80118 for ; Wed, 26 Jan 2022 02:17:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 32765F80118 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QS5+qLOk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643159856; x=1674695856; h=from:to:cc:subject:date:message-id; bh=rqczjyKj/SlLMVDMYtVBQmFXTLQ/61Vrv+fruQKZRP8=; b=QS5+qLOkeU4csJVPvJ+Qs4CkUvXtNKVoPw/9ORPMpG9PtMjSQgl24BH1 HFDm8N2v7ebirfiJo9PsRdIQya7WVbgLoPSeKVgMJpdWMvg4iaI7l5JKG zpnpHfPL4UKjETveZSRWu21hCW+2YsHPDHXDkWpiVvNB7bz3rG4eq56sk SoKgicwIpdvIkWwDvgMSHRVADPMBqBjwGFdjU4jboLGJQstJfwekRxHC0 GGURw38JqWJ31sg3OYOWxwMTft6FoXoBHsUZ0LLFQWc0TQHfU+bqo7xuI VCs8ffoo10ORQIBT7nwaqCskd59A5vIWBNtKjWOy8a1PXYY/QllIOgaRm Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10238"; a="246236102" X-IronPort-AV: E=Sophos;i="5.88,316,1635231600"; d="scan'208";a="246236102" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 17:17:30 -0800 X-IronPort-AV: E=Sophos;i="5.88,316,1635231600"; d="scan'208";a="520617308" Received: from bard-ubuntu.sh.intel.com ([10.239.185.57]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 17:17:27 -0800 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Subject: [PATCH 00/19] soundwire: stream: cleanup of 'stream' support Date: Wed, 26 Jan 2022 09:16:56 +0800 Message-Id: <20220126011715.28204-1-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 Cc: vinod.koul@linaro.org, gregkh@linuxfoundation.org, pierre-louis.bossart@linux.intel.com, linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org, sanyog.r.kale@intel.com, bard.liao@intel.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" This series revisits the SoundWire 'sdw_stream' support to split allocation and configuration steps. This is necessary if for example the routines are called multiple times from the hw_params stage. This also helps with better error handling. Pierre-Louis Bossart (19): soundwire: stream: remove unused parameter in sdw_stream_add_slave soundwire: stream: add slave runtime to list earlier soundwire: stream: simplify check on port range soundwire: stream: add alloc/config/free helpers for ports soundwire: stream: split port allocation and configuration loops soundwire: stream: split alloc and config in two functions soundwire: stream: add 'slave' prefix for port range checks soundwire: stream: group sdw_port and sdw_master/slave_port functions soundwire: stream: simplify sdw_alloc_master_rt() soundwire: stream: split sdw_alloc_master_rt() in alloc and config soundwire: stream: move sdw_alloc_slave_rt() before 'master' helpers soundwire: stream: split sdw_alloc_slave_rt() in alloc and config soundwire: stream: group sdw_stream_ functions soundwire: stream: rename and move master/slave_rt_free routines soundwire: stream: move list addition to sdw_slave_alloc_rt() soundwire: stream: separate alloc and config within sdw_stream_add_xxx() soundwire: stream: introduce sdw_slave_rt_find() helper soundwire: stream: sdw_stream_add_ functions can be called multiple times soundwire: stream: make enable/disable/deprepare idempotent drivers/soundwire/stream.c | 960 +++++++++++++++++++++---------------- 1 file changed, 547 insertions(+), 413 deletions(-)