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 3FEE7C433F5 for ; Thu, 26 May 2022 14:46:06 +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 C0CB116CB; Thu, 26 May 2022 16:45:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C0CB116CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653576364; bh=8XG+0blNgVMb8NruV2TK4QNUsj/L0AlJfFrTQVMub7Q=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EmObecKTVgLDjxueK+KAebkKqVJf7bVw9AOG5a5EIQgGT1or/WwOBOIij6sHJUXWe Vvq8U7H7SSWgDIUwXkD6Puu6bNz8knjimfVUZbgFca9/kQTbEbx7xLqV9GmpGmAg2U pcp1JFwYe2dPqlfabiY9DAgYEIfYDvFHP2LM8lyo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 567FEF80137; Thu, 26 May 2022 16:45:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85AE6F800D0; Thu, 26 May 2022 16:45:13 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (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 0B849F800D0 for ; Thu, 26 May 2022 16:45:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B849F800D0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SRx0HYFV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653576309; x=1685112309; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=8XG+0blNgVMb8NruV2TK4QNUsj/L0AlJfFrTQVMub7Q=; b=SRx0HYFVnKSFpuRHdvPhGYLGKT7gLysioODdoFDRX16tXoQ0MDYBt5Ug yES21kPobPi4XTjLYrNsLiXEi3kbbFXksALZ1YnQ5fOuQE0V0MWeEKFjw ephETKIZHQTgAnNiWVGljGdTXf1DdWbCPNClecRSZ6jtJPeF0A1qjDwHA lActvGsagyWT5vliFaDH7gTMmKFzen+4Jx6kNdA2Ogqjapu83iRimJQPE 9MsNqMRgucMMofIt3ymevK5MH4UUEXUsfpu136OY49HU/y/B79ZdEX3PD j5lt3WwHGEE1WDNl2NFpFMF/jJwxnbrguHncigbMsNS3UzcTEZDiCY+bj Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="334820264" X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="334820264" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 07:45:02 -0700 X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="603122706" Received: from sgourshe-mobl1.amr.corp.intel.com (HELO [10.251.3.95]) ([10.251.3.95]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 07:45:01 -0700 Message-ID: <3861ca9a-6444-6f23-f447-64cd610b4d34@linux.intel.com> Date: Thu, 26 May 2022 09:45:00 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: About Cleanup ASoC Content-Language: en-US To: Cezary Rojewski References: <87fskz5yrr.wl-kuninori.morimoto.gx@renesas.com> <87a6b6cofh.wl-kuninori.morimoto.gx@renesas.com> <349ddb89-6f1e-f087-2399-795cf82b92b3@linux.intel.com> <87ilptqbvx.wl-kuninori.morimoto.gx@renesas.com> <021e4cc3-f67e-865f-0d8b-5b07fce97623@linux.intel.com> <2f60063a-4c99-89f4-4e14-938bb9383844@linux.intel.com> <498833ad-dd6a-8952-d569-d1ed726f4eed@intel.com> From: Pierre-Louis Bossart In-Reply-To: <498833ad-dd6a-8952-d569-d1ed726f4eed@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Linux-ALSA , Mark Brown , Kuninori Morimoto , =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= 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 5/26/22 09:17, Cezary Rojewski wrote: > On 2022-05-26 3:48 PM, Pierre-Louis Bossart wrote: >> On 5/26/22 04:57, Amadeusz Sławiński wrote: >>> Well, this sounds like what we did in avs, namely we split cards >>> separately based on endpoint. Main driver decides what endpoints to >>> expose, based on ACPI detection and ACPI match rules, see [1]. For >>> example in our model it is possible to have 2 separate i2s codecs >>> connected and each having its own card. From avs driver we expose >>> snd_soc_dai_driver with 2 streams (playback and capture), see [2] and >>> then tell machine driver to just connect them to codec [3] - look for >>> "SSP%d Pin", "ssp%d Tx" and "ssp%d Rx". Connections between "ssp%d >>> Tx"/"ssp%d Rx" and userspace FE are handled by topology in our case, but >>> should be easy to expose without it, if you don't use topologies. >> >> It works for ACPI because the platform driver can check if specific >> _HIDs are present or not, and decide to create different platform >> devices for different cards, with resources split in different >> components. In other words, there is no strict boundary between platform >> and machine driver, the platform has all the information needed. >> >> I don't know if it's feasible in a Device Tree environment: the DT blob >> exposes the machine device, which uses *references* to resources exposed >> by platform and codec drivers. If there were multiple machine devices >> for different cards, how would that split of resources between different >> components be done? >> >> The current ACPI approach will also not work if we move to a generic >> machine driver for SoundWire platform, with one or more devices exposed >> in ACPI for the board-level composition. If the machine devices are NOT >> created by the platform driver, I don't see a clear solution to support >> multiple cards. > > > Hmm.. I don't see why SDW is a problem here. Could you elaborate? I > could boost avs-driver to support SDW configurations if we need a POC. > Why would machine devices not be created by the platform (e.g. PCI) driver? Because there will be at some point an ACPI device for the machine driver. I can't give more details on a public mailing list just yet, but the approach based on the PCI driver creating a platform device is NOT future-proof.