Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3194760pxb; Fri, 5 Nov 2021 11:19:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmJN16Ya+RuxWIktF+U3iVPfC9CVeCoSs3C716Ccgfpx6dLYiJtUPS8TiMs2MA8c1HGRxD X-Received: by 2002:a05:6602:13d5:: with SMTP id o21mr581276iov.191.1636136377209; Fri, 05 Nov 2021 11:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636136377; cv=none; d=google.com; s=arc-20160816; b=A1RECKzRQOCtkjlLgr5AzUlqeX7jVntaVLLU0TTYRmKAhI3FZEQfRID+fBjUl8AcL2 VGT/aTReGZ3pQyWmrH7vFRGN78EbnogC9UrHeXyZuB3gpxGIt2gdvek2RqflGvf519Tt EnbeTrcProE/7l2/6Xks2YqJF7wmhWXVObFT1KysQHl7pNnkkdh8ENmcOMwRgMHbotpR PwJw+dQLsVzgpckj6OyaH6nU5YatLysquk2R2Bi94E2K3LRgHYAkw8mUpWrNHxlQIIuE gnXkYQUIs0u9CqxBWDtb8CEkRvjMCCmkSH5HFf7VR0JVqd5/YmMghyBqRBxRbsE8VygC Ff6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=+dXCXmy0WlJNR+ZsDiEq/wozd+I7PEdn/Gc+Eh7/1VE=; b=t0EV18ArTPd6DZjj+R80SSHzuRWUhJ7h2u665o5cnld0SeO1//jamZneCawlu+LglC gg+4Ose7QvLKht5PNbO/QAx1SNBr2oJS5olK6UKVil07wHhqSJFzKERSMYz58UWIWDGT iTMhRRowu9ITnnv6a/Eellqw7uBVROltOU0mfZYB9u5SOM1U13oxS6iq1iExKDjJ/nuK oQxj0pb5Pb5dE8cBE2D+tf0BJw1/FHugeBB/GsA17EUHhN7dMgbP7MS3t5qFqXU+R9nt CnWWtwmZ5ltIAo11dzyn6hEtNdYsHtpQfphS0isNeBNIUSp5EvMksBVGVkJYr9vMmlVG yD1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si11946052ile.100.2021.11.05.11.19.23; Fri, 05 Nov 2021 11:19:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233062AbhKEQVB (ORCPT + 99 others); Fri, 5 Nov 2021 12:21:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:4900 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhKEQVA (ORCPT ); Fri, 5 Nov 2021 12:21:00 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10159"; a="229396982" X-IronPort-AV: E=Sophos;i="5.87,212,1631602800"; d="scan'208";a="229396982" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2021 09:16:09 -0700 X-IronPort-AV: E=Sophos;i="5.87,212,1631602800"; d="scan'208";a="502004186" Received: from yanbiaoc-mobl.amr.corp.intel.com (HELO [10.209.173.63]) ([10.209.173.63]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2021 09:16:08 -0700 Subject: Re: [PATCH 3/4] ASoC: mediatek: mt8195: separate the common code from machine driver To: Mark Brown , Trevor Wu Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tiwai@suse.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-mediatek@lists.infradead.org, yc.hung@mediatek.com, matthias.bgg@gmail.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org References: <20211103100040.11933-1-trevor.wu@mediatek.com> <20211103100040.11933-4-trevor.wu@mediatek.com> From: Pierre-Louis Bossart Message-ID: Date: Fri, 5 Nov 2021 11:16:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/5/21 10:38 AM, Mark Brown wrote: > On Fri, Nov 05, 2021 at 12:11:55PM +0800, Trevor Wu wrote: >> On Thu, 2021-11-04 at 15:39 +0000, Mark Brown wrote: > >>> I don't follow why the DSP support requires a new driver? Shouldn't >>> all >>> systems with the DSP present be using it? > >> We need to keep the solution without DSP, so we can replace DSP >> solution with non-DSP when it's required. But when we introduce SOF for >> DSP control, there will be more routes in machine driver and device >> tree usage is different from the original. So it's hard to share the >> same driver for these two solutions. > > We shouldn't be requiring people to load completely different drivers > based on software configuration, what if a system wants to bypass the > DSP in some but not all configurations? Can we not just have controls > allowing users to route round the DSP where appropriate? It was my understanding the card relies on separate components - a SOF-based component to provide support for DSP-managed interfaces - a 'non-SOF' component for 'regular' interfaces not handled by the DSP. this was the basis for the changes discussed in https://github.com/thesofproject/linux/pull/3217 and https://github.com/thesofproject/linux/pull/3236 But indeed if the same interface can be managed by the DSP or not, depending on software choices it's a different problem altogether. We've looked into this recently, if the choice to involve the DSP or not is at the interface level, it might be better to have both components expose different DAIs for the same interface, with some sort of run-time mutual exclusion, so that all possible/allowed permutations are allowed.