Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6131321rdb; Thu, 14 Dec 2023 09:05:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmxcSXT94laFbo1pLd1uBUrq74I3/tZ4oNJ6xam/s5n2pupIMDhA37n3qHXwi54v1bhaiZ X-Received: by 2002:a05:6a20:54a5:b0:18f:97c:9282 with SMTP id i37-20020a056a2054a500b0018f097c9282mr6124389pzk.103.1702573522801; Thu, 14 Dec 2023 09:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702573522; cv=none; d=google.com; s=arc-20160816; b=FRDJDItyU0e8xAQZhT1TxrvHjf+z/EJ0suc3QBtvfa9YCTBGCS27RnBAkP/PY+aS73 QgyJki9LKfaqSYAsV6C+2KztGYcL5SAzV/uXYBLsIH1HWtTQlgfRGlaiA0V0PXEGXqvV FrMfXfpNkm49sxre1DmrUke97YMLGzhOLRXfdYgayCajftJOWhA39+deJZghaQl/mDa6 gJddafEITUrN7qdtxl/Axw1TYiNv6EIvPMBgvHk+9HjjMzRNdH8wuLRG9Z5/jAEuyqUo Viz3J/Cb8B/PyD4CRp8E9y0cESB3IB5aDt3iASfjVdXESO4jqL2ZmFelwRNaM+wc5WAQ kbTw== 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=/an2fCAVI3T4w2qAJHG3HLimV2wNdrYG9LlfzqkbMbw=; fh=c2UonIpSz+RNBs3gYdcXq1IHE0DuAq1U9F+gdIzkFK8=; b=YsvNvc0y0xi/kgQ5BeA157yzesicigyg7qqiyoxTZIpyqW/QVYkF7iMo2NKqRw9Khw faQxlarIRYJG3OvFp2ZPaJjkVWy7B8aMbWaWGqLWJ+LJ42ZGvDbRtn0f5nJwytqLVidw Y7k3xIRSv0WZefqYuvK3n+mYyjd/TBLfwOqERmZ0rMwdGgxeJD1GbgkUzqP+DYfmGM/y a9w3ZGR02Ovtl342IIswh2nqWc6Y/3RhjxWaM0d0j2pTmMv0GCWdnC2As6PLto+hHwC8 sdHtJ2Hc3D/e4VJPmtu3I9jsnorSIOqRzoDzhg7hiK6RkXEiliesYXyOpxMnZl+iqwp2 qI6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YI3IJG6L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id e22-20020a63e016000000b005c278210f82si11328700pgh.544.2023.12.14.09.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 09:05:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YI3IJG6L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 34BA082CB84A; Thu, 14 Dec 2023 09:05:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229532AbjLNREv (ORCPT + 99 others); Thu, 14 Dec 2023 12:04:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjLNREu (ORCPT ); Thu, 14 Dec 2023 12:04:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B3EA0 for ; Thu, 14 Dec 2023 09:04:57 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 339BAC433C7; Thu, 14 Dec 2023 17:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702573497; bh=C97ruMhJD+gwin8Xnu1LxzszeY6cxubadNcfiKJUIwg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YI3IJG6Lrj/HrM1w+0YF6QRLpTy5ywxmGCt1xrbg3M6yQAZkbul9dR7KVAh61p3Vy 6O/cITES1ZMQMJmH/7O1zvs3FaUz1bhz1fIgD4u3zjObCyYA7ilwzbFmUtvNuE0HHG AGZeBj1VZD3AWNK4ZSxz0UwGUoLUdqfqW/Gfp0OHS4xyaGXSJIxZasuQBpziKeN9M2 gquPYYYZgeqkbl2jfiuXPFKMdVgueXfGox1LOBEXfVx7bj/Q/r+9uVaRkL3UXoD2wT PM/uwb4ivacX+FDYVjDe1awrKPWQhzqt0GdzScTAPZvSyxlLAS3tWzOQ4wEIfdrIYc JCKbhjGAeITLA== Date: Thu, 14 Dec 2023 17:04:52 +0000 From: Mark Brown To: Jianhua Lu Cc: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/4] ASoC: qcom: common: Add qcom_snd_tdm_hw_params function Message-ID: References: <20231213123556.20469-1-lujianhua000@gmail.com> <7b13b8b6-9048-48a3-b1a1-e62de88e8171@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JCIFsr6HNtGfUJfo" Content-Disposition: inline In-Reply-To: X-Cookie: Preserve the old, but know the new. X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Dec 2023 09:05:06 -0800 (PST) --JCIFsr6HNtGfUJfo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 15, 2023 at 12:55:08AM +0800, Jianhua Lu wrote: > On Thu, Dec 14, 2023 at 03:56:52PM +0000, Mark Brown wrote: > > On Thu, Dec 14, 2023 at 11:51:50PM +0800, Jianhua Lu wrote: > > > Currently, qcom TDM setup need to read hw_params, if we want to move it > > > to machine driver, we must hardcode some params, but it will reduce reduce > > > readability. > > What makes you say that TDM setup needs to read hw_params? > qcom_snd_tdm_hw_params function read PCM_FORMAT to set slot_width value, read > channels to set rx_mask value. A large part of the purpose of doing TDM configuration is to fix the slot width and assign which slots are in use by this interface - the TDM configuration is a constraint on what hardware paramters can be set and should always be followed regardless of what is being done with the audio stream. If you're just trying to configure the sample size for DSP modes then that shouldn't go through the TDM configuration API, that's just normal hw_params() so should be done directly. Possibly the hardware doesn't support manual TDM configuration? --JCIFsr6HNtGfUJfo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmV7NbMACgkQJNaLcl1U h9CaTAf/QuuvzKht/LhszwAptQsmHYSw9+3gn9Ddg+d9YAEb6/OWNMxB2kDd2hJ+ pfflmY+FKXTgJS6MskMch8Dxuc0QV/eInQwS6waQO4QjCZ/rqAHTutMLj/Hf7GDq 51FCW7bGjJOnnTn353AW3e6LoiwP6CMKhnw0ZVue2advz+frgtPZQF1NfWoVroIf AJn1YspPewXTyysr99iHRJVNAGWevm5yg/fhUDtJA39qa0VM1l4AnYnW6ONoAT+Q lNlFkDH22WUAzLS2lh+vqU+hd6ji18ldAzZ4KaiXFqBFQ2ag7Af7sckObeANsBLZ fq5EK41S13Jqa3AZ5k1Q0CemAw0jZg== =xdNX -----END PGP SIGNATURE----- --JCIFsr6HNtGfUJfo--