Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9177215rwd; Wed, 21 Jun 2023 04:13:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5x/KtOPLH4gnRk+kcO/igJMYE1CrQbYFVDVOL32/H02uf3C7dzsFTBjNbK48css4YQDoTd X-Received: by 2002:a05:6a20:7f81:b0:10a:a0e1:96fa with SMTP id d1-20020a056a207f8100b0010aa0e196famr12497292pzj.22.1687345988048; Wed, 21 Jun 2023 04:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687345988; cv=none; d=google.com; s=arc-20160816; b=ikEorj8xAB+MJ73HaExxKxhpr5adlpTMxgicwjVcl/OWna0XYv3EEqR92hLt4hFr5i 7nMCMQqDkc+s2yJvVFjcs0cOVhyyEGlaGkkBeT+j9W+oOA8dUJX3WZn2DaQfy8IW4XPI ojmU/rqyFQRBy0jrA3IOZ6ZtmNRDyDWIZdINjbFbhkeov50Zr+0mzZV3Q2p0ouqUO+s8 547rExldXuKfDqGdp2IqzJ9/ra3DQ+KSexj31bHX2zuzniMlqjS3VzQRvCWpMfVVUudL khgGnLD7RGLsozVa7GmdCLeUg0aZAdKLe2IwRMyOUG4MCSfR6A3oqywfDHzNg7JhupsO VeHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xfP4a5azjEJSXfE3dYXpGTwoQB18j1hZ6G8uHOaAb8M=; b=NCAYXrkZSKrXx4Mdx2TMv43ji8qIB6LgKwAvyRGoFQizT6IcU0LBldvpPDvIqMzEpK ZzV1REzrcdEj2U8uYF/VIcT2aPd2tmz2n6pIA3FUiesPBvEZHYq04qYFiGE28nF7amNU nhC7xgH+39NpALu4B7BGa0EhcBBNEx+B1bBSodwd7kmE/Uc382r34Y2fxyAW0RcZq5Uh 9V6H/uwfFvHyyVKFztDfI4CvkpaqrlnliQ2TpOztTsBN317G5MYP2BcETh2e5Y3AMh25 lWPXPJLMs0RkU3Q6H76B3zLi1cA+Jv/sPsFU0Cgtb7QcwJVlJYaJVJ2VLUva6RpKDb09 aVWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ezCkDl0d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a170902e5c200b001b243a20f0fsi659502plf.504.2023.06.21.04.12.44; Wed, 21 Jun 2023 04:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ezCkDl0d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231630AbjFULAY (ORCPT + 99 others); Wed, 21 Jun 2023 07:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbjFULAW (ORCPT ); Wed, 21 Jun 2023 07:00:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0274B6 for ; Wed, 21 Jun 2023 04:00:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5C379614D8 for ; Wed, 21 Jun 2023 11:00:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32E96C433C0; Wed, 21 Jun 2023 11:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687345220; bh=lXzszQD+zptu3Dhn+zgRvR6h6mdmH5naNO55GH7WfQE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ezCkDl0dShEAojqKiOZZfJIfIyZOWQ4bsdnFsAMM5buRpqn30urYYfa7ZZ81l8woq /X8xYwAtPkZv+W4eJOQA4XUplnt3BPQFC+BYkTPLxDnf7VdtJGSikuEIwgHA7PBPUV FRgKH8Oam///jNZmSJx6sdOasO7dlTnSnG8rX+3ek6z6VZXNJCb9nCegCHQfNErx2r mEqs1E6CYixsXgnXFSr/VDxY3pdvg75IGMzqztq2EYRKzSt9sGIimbK8DEn1/ZiLPY 4eOgmJcwjhXqjGojAbqRy4Y0j8376fnrMKTpwSUVnUZoZxXitZM2vA27mx5SdKLuF+ f0jTzRcdOYqmw== Date: Wed, 21 Jun 2023 16:30:16 +0530 From: Vinod Koul To: Pierre-Louis Bossart Cc: Bard Liao , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, bard.liao@intel.com Subject: Re: [PATCH 2/4] soundwire: introduce SDW_DEV_NUM_ALLOC_IDA_WAKE_ONLY Message-ID: References: <20230531033736.792464-1-yung-chuan.liao@linux.intel.com> <20230531033736.792464-3-yung-chuan.liao@linux.intel.com> <6c75e986-29a4-d97c-3862-d20397f8b8b4@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c75e986-29a4-d97c-3862-d20397f8b8b4@linux.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-06-23, 10:09, Pierre-Louis Bossart wrote: > > > On 6/8/23 02:06, Vinod Koul wrote: > > On 31-05-23, 11:37, Bard Liao wrote: > >> From: Pierre-Louis Bossart > >> > >> This patch adds a new Device Number allocation strategy, with the IDA > >> used only for devices that are wake-capable. > >> > >> "regular" devices such as amplifiers will use Device Numbers > >> [1..min_ida-1]. > >> > >> "wake-capable" devices such as jack or microphone codecs will use > >> Device Numbers [min_ida..11]. > >> > >> This hybrid strategy extends the number of supported devices in a > >> system by only constraining the allocation if required, e.g. in the > >> case of Intel LunarLake platforms the wake-capable devices are > >> required to have a unique address to use the HDaudio SDI and HDAudio > >> WAKEEN/WAKESTS registers. > > > > This seems to be a consequence of Intel hardware decisions, so I guess > > best suited place for this is Intel controller, do we really want to > > have this in core logic? > > It's a valid objection. > > The reason why I added the alternate strategies in the core logic is > that the IDA and hybrid approach are just software-based with no > specific hardware dependencies. If QCOM or AMD wanted to use the > strategies contributed and tested by Intel, it'd be a two-line change on > their side. > > That said, it's likely that at some point *someone* will want to > constrain the device number allocation further, be it with ACPI/DT > properties or reading hardware registers. The device number is a > de-facto priority given the way we scan the PING frames, so some systems > may want to give a higher priority to a specific peripherals. > > This would push us to add a master ops callback to control the device > number allocation. It's a bit invasive but that would give the ultimate > flexibility. Reuse between vendors could be possible if 'generic' > callbacks were part of a library to pick from. > > I don't really have any objections if this vendor-specific callback was > preferred, it may be a bit early to add this but long-term it's probably > what makes more sense. > > I'll go with the flow on suggested recommendations. Thanks, if it all one of the other two controller start using this, it would make sense to move it to core then, for now would be better to have this in specific driver -- ~Vinod