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 8413DC4332F for ; Thu, 14 Dec 2023 17:05:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443568AbjLNREw (ORCPT ); Thu, 14 Dec 2023 12:04:52 -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. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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--