From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0524FC4332F for ; Mon, 7 Nov 2022 14:15:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbiKGOPw (ORCPT ); Mon, 7 Nov 2022 09:15:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbiKGOPt (ORCPT ); Mon, 7 Nov 2022 09:15:49 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A206C19C2A for ; Mon, 7 Nov 2022 06:15:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667830548; x=1699366548; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Zp9d5lmlEwYQNB/2LUwcFa0f7+iSm6v+/s/K1TzfYyg=; b=NpMklCXeviOjTnFPQ5IoCw9wVBORj45ztcNz7LHJv0s/YPDYsRIJg9pZ gYlhOCt/zdFzDJFxiMJ8Dz8yCZ7m401nXMqbdIXEO5UJfeQaEy6hbdFJ1 k683onLBS7UqpYh8CWbAE6jaPEJ9JfPqjUS6osKn5lHg/o4g9e5f8i9d5 8XM0oF4ZNhmIBdvXDvnyCOfsaDxoMlD8vpn8DBiETV7PQwd+pU7cpP4vs iAK8UKErilt7SOS9/1cjQTREQuPAQwlZE1CgLf2xCKqiJPYRNjGnSbK9f DpCaoJCTkVfx+FfO/NMSdwsEfQNukGq504vvno+FvPVpGeATQHsSpTJXi w==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="297911313" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="297911313" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 06:15:48 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="965162794" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="965162794" Received: from seanabue-mobl.amr.corp.intel.com (HELO [10.212.82.80]) ([10.212.82.80]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 06:15:46 -0800 Message-ID: Date: Mon, 7 Nov 2022 08:14:47 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.2.2 Subject: Re: [PATCH] CHROMIUM: ASoC: amd: acp: Add tdm support for codecs in machine driver Content-Language: en-US To: Venkata Prasad Potturu , Mark Brown Cc: alsa-devel@alsa-project.org, Sunil-kumar.Dommati@amd.com, ssabakar@amd.com, Ajit Kumar Pandey , ye xingchen , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , Venkata Prasad Potturu , Vijendar.Mukunda@amd.com, vsujithkumar.reddy@amd.com, Akihiko Odaki , open list References: <20221028103443.30375-1-venkataprasad.potturu@amd.corp-partner.google.com> <7b97682d-5cf1-8be1-9c62-41c9fbd89018@amd.com> From: Pierre-Louis Bossart In-Reply-To: <7b97682d-5cf1-8be1-9c62-41c9fbd89018@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/22 04:34, Venkata Prasad Potturu wrote: > > On 11/2/22 17:02, Mark Brown wrote: >>> On 11/1/22 20:01, Mark Brown wrote: >>>> On Tue, Nov 01, 2022 at 03:15:08PM +0530, Venkata Prasad Potturu wrote: >>>> Right, that's what the code does but why is this something that should >>>> be controlled in this fashion? >>> This machine driver is common for TDM mode and I2S mode, user can >>> select TDM >>> mode or I2S mode. >> Why would the user choose one value or the other, and why would this >> choice be something that only changes at module load time?  If this is >> user controllable I'd really expect it to be runtime controllable. >> You're not explaining why this is a module parameter. > > Different vendors/OEM's use the same hardware as one need I2S mode and > other need TDM mode, using common driver  to support  I2S and TDM mode > with this parameter. > > > static int tdm_mode = 0; > module_param_named(tdm_mode, tdm_mode, int, 0444); > > And this can be runtime controllable by setting permissions as 0644, we > will change and send next version patch. kernel parameters are difficult to manage for distributions using a single-build. Either all platforms use the kernel parameter or none of them do. That would not allow a per-platform choice of parameters. Using DMI quirks or ACPI identifiers would be a lot less problematic, no?