From patchwork Thu Dec 12 01:44:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11286719 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A91413B6 for ; Thu, 12 Dec 2019 01:46:16 +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 34A6922B48 for ; Thu, 12 Dec 2019 01:46:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="ChqCSIaF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34A6922B48 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 092961672; Thu, 12 Dec 2019 02:45:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 092961672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1576115173; bh=eyLXQVS0COhV1++1ePCiEeZvp6axOMETAesevV0h2zM=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=ChqCSIaFrFRjknGFN8r63WpO1y8YC9f1zznBdlsjP7Uhs66VIjWOCTqY8wFRE3jVh NxtFTgSoC9F4sSl+M3HRJgdFiEYL2DmQ5OWdqAJGeZnDQInehTeibfmUEoUbLaIE2T dLva8zDQXPsHUaSWL8wAYubpjxJfM+bmfbX3pkGQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 69000F8011E; Thu, 12 Dec 2019 02:45:22 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id D9EB2F80234; Thu, 12 Dec 2019 02:45:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.0 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 2B7AFF800F3 for ; Thu, 12 Dec 2019 02:45:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B7AFF800F3 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 17:45:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,303,1571727600"; d="scan'208";a="296446033" Received: from gjang-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.252.207.37]) by orsmga001.jf.intel.com with ESMTP; 11 Dec 2019 17:45:11 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Date: Wed, 11 Dec 2019 19:44:56 -0600 Message-Id: <20191212014507.28050-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Pierre-Louis Bossart , tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Ranjani Sridharan , vkoul@kernel.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, slawomir.blauciak@intel.com, Bard liao , Rander Wang Subject: [alsa-devel] [PATCH v5 00/11] soundwire: update ASoC interfaces 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" We need new fields in existing structures to a) deal with race conditions on codec probe/enumeration b) allow for multi-step ACPI scan/probe/startup on Intel plaforms c) deal with MSI issues using a single handler/threads for all audio interrupts d) deal with access to registers shared across multiple links on Intel platforms These structures for a) will be used by the SOF driver as well as codec drivers. The b) c) and d) cases are only for the Intel-specific implementation. To avoid conflicts between ASoC and Soundwire trees, these 11 patches are provided out-of-order, before the functionality enabled in these header files is added in follow-up patch series which can be applied separately in the ASoC and Soundwire trees. As discussed earlier, Vinod would need to provide an immutable tag for Mark Brown, and the integration on the ASoC side of SOF changes and new codecs drivers can proceed in parallel with SoundWire core changes. I had multiple offline discussions with Vinod/Mark/Takashi on how to proceed withe volume of SoundWire changes. Now that v5.5-rc1 is out we should go ahead with these interface changes. The next patchset "[PATCH v3 00/15] soundwire: intel: implement new ASoC interfaces​" can still be reviewed but will not apply as is due to a one-line conflict. An update will be provided when Vinod applies this series to avoid noise on mailing lists. An update for the series "[PATCH v3 00/22] soundwire: code hardening and suspend-resume support" is ready but will be provided when both the interfaces changes and the implementation changes are merged. Comments and feedback welcome ~Pierre Changes since v4: One line change to remove EXPORT_SYMBOL(sdw_intel_init) Fix build issue with randconfig reported by kbuild (missing include of linux/irqreturn.h) Changes since v3: Reordered code and added kernel doc comments Added prototypes and fields needed to deal with SoundWire interrupts in a single handler/thread, following what is already done on the DSP side. Added mutex to control access to registers shared across links Added initial definitions for clock stop support on Intel platforms. Depending on power and latency requirements, different "quirks" can be supported. Changes since v2: Added new field to deal with a race condition leading to a timeout when the codec goes through a pm_runtime suspend/resume transition while the Master remains active. Clarified commit messages with detailed explanations what those race conditions are and why the changes were introduced. Reordered fields for Intel routines Added kernel-doc definitions for structures Modified the patch subjects to make the mapping between interface definition and implementation straightforward. Changes since v1 (no feedback received since October 23) additional initialization_complete utility to help codec drivers with their resume operation, waiting for the enumeration to complete is not always enough. Changes since v3: Reordered code and added kernel doc comments Added prototypes and fields needed to deal with SoundWire interrupts in a single handler/thread, following what is already done on the DSP side. Added mutex to control access to registers shared across links Added initial definitions for clock stop support on Intel platforms. Depending on power and latency requirements, different "quirks" can be supported. Changes since v2: Added new field to deal with a race condition leading to a timeout when the codec goes through a pm_runtime suspend/resume transition while the Master remains active. Clarified commit messages with detailed explanations what those race conditions are and why the changes were introduced. Reordered fields for Intel routines Added kernel-doc definitions for structures Modified the patch subjects to make the mapping between interface definition and implementation straightforward. Changes since v1 (no feedback received since October 23) additional initialization_complete utility to help codec drivers with their resume operation, waiting for the enumeration to complete is not always enough. Bard Liao (2): soundwire: intel: update headers for interrupts soundwire: intel: add link_list to handle interrupts with a single thread Pierre-Louis Bossart (7): soundwire: sdw_slave: add probe_complete structure and new fields soundwire: sdw_slave: add enumeration_complete structure soundwire: sdw_slave: add initialization_complete definition soundwire: sdw_slave: track unattach_request to handle all init sequences soundwire: intel: update interfaces between ASoC and SoundWire soundwire: intel: add mutex for shared SHIM register access soundwire: intel: add clock stop quirks Rander Wang (2): soundwire: intel: update stream callbacks for hwparams/free stream operations soundwire: intel: add prototype for WAKEEN interrupt processing drivers/soundwire/intel.c | 20 ++-- drivers/soundwire/intel.h | 13 ++- drivers/soundwire/intel_init.c | 32 ++---- include/linux/soundwire/sdw.h | 19 ++++ include/linux/soundwire/sdw_intel.h | 156 ++++++++++++++++++++++++++-- 5 files changed, 196 insertions(+), 44 deletions(-)