Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6123925rdb; Thu, 14 Dec 2023 08:55:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6GriYorNDNHf1WUKUBJfei/aX8Uj96+MEh3uoC40T2RLsY69T9MqiWHP3hfQhHxg7JW8p X-Received: by 2002:a05:6a20:158b:b0:187:1015:bf88 with SMTP id h11-20020a056a20158b00b001871015bf88mr6237003pzj.29.1702572959644; Thu, 14 Dec 2023 08:55:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702572959; cv=none; d=google.com; s=arc-20160816; b=Spe9jebcj35ErNNbZC/xtpdqzo0Ymk0ITl+z+cW7FYaV7Eu72i0+bcZtx5NGseaeN7 8UNJY6aOH8wDN7+JWtvrr9cURAL8m06WFR5nKACLCC5wxpDdwOlf8vDa6rzgGeumDzPp cM5cgUp/BUCaaOC5nC1+2LK27ipu4bZB9ScdfENzQNG7JRFipgw6hlxGRo5EKC2kvv3U 8BI53JjwNuQiyiSrWlJ3tAeWR2TplIcCSfWdd+rGo49MAWenbkMOv2//4MmXT8ZZqySy aMh+4Damkbdmglxsm/ivwVqW2pIsO7rgujOUOf3Xcs2f2zVDrWJDYbbr4W2QN7cZ5sMg hDKQ== 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=MAfq8J8C5KAtCB8rcO3YT1HYm/yjjDzGk9Gqq0ijzyA=; fh=e4U9aepcGEf6O6zjLftAYhmaL+GPTAZcCv4H08JRyWA=; b=ACUuN39fMo8oPt1uPDRGc/eQMegQVfNjkrL2K0fFt/PTW1EqA+A4zNvee/wZjCS0yc l4hoBFJTs4cNt2XmzclRVDzLfMr4T9hZRDuEnyR7P4MbRpLoW14OXoeiq/vRPM8itsk6 8KZJFOPUwQsKEL7PZcJZrjqhSayjlLAL+QsacgkFsOJ7i+xtaXb4r6uuj0uVh68E0NFh NS02KNNh1TJwaiDH+gNnYptt1xiDDA4apmRjg9Si+FKzdr5yWVGa+PevRL/jkox7VwRt YxIU2vPH1wFm4chW6AaXK8khN3NU7EvEQCL6weneSr5axKPXy5km4cfaGVNvnr5BDfw4 Ziag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Iokwtgyn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id st15-20020a17090b1fcf00b00283a18d5662si11908669pjb.80.2023.12.14.08.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 08:55:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Iokwtgyn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D7116809AF8D; Thu, 14 Dec 2023 08:55:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229957AbjLNQzT (ORCPT + 99 others); Thu, 14 Dec 2023 11:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbjLNQzR (ORCPT ); Thu, 14 Dec 2023 11:55:17 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6D7C125; Thu, 14 Dec 2023 08:55:23 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-28b0a9876c8so420467a91.3; Thu, 14 Dec 2023 08:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702572923; x=1703177723; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MAfq8J8C5KAtCB8rcO3YT1HYm/yjjDzGk9Gqq0ijzyA=; b=IokwtgynXv0/38qvqdyZ8dyrW+rSwppJt13rCpCRdRp0LkvKV13PocAYsf3DXG0dXm H0rmRNiX73yLijpCBbJVXTPjoWStov+52kVRLvoq31R4Hc75MHREdGVYgkfJcr4D+Tzw wbbwOUA6kU/WZwxtXAUMXlK4rfMV7sQM97mSqmzO8HsPf0vj2Efu1yljw9LsEc4OqqiT TVTzPSibYfAW7rDxdddJMRq2NYosXfvzU7FRSIr+HFqSmZG2e5WnGeEcbzRTvnAPtn5r F+zYnWxugECyggEywauQPpfOn33nRh5E89QcoKhTleC6Z17LqTFW/bz+FFUHf7bCBBv3 vpfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702572923; x=1703177723; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MAfq8J8C5KAtCB8rcO3YT1HYm/yjjDzGk9Gqq0ijzyA=; b=p8yixv5pl7vDL3oEGDrRn14aDC7w0kQyJzop9wZaLjWMLitjKeAAHhDn2qarKzHaGh aQ2mtnMHX/fexh84ZbUC2KZLKMR0Wt4QrAgisXY44NBMutXPoQdamHVQ0/Iq5LAp6lrf XACStiz6FAo/tl01XgTjAxBWw9adWQr8tMkfVd4hfXmC9NUhThI9pcKDHpZ+AGfCqt2k cquzvj0NPbG2hCDU4zhWy9Ia+MQ17jCi5+AofYCMAqqteb4bNhoGqovBn2NeqAoLil+7 4nL9ojkaecA//JTNatzLKZpkAOd5WBXI3OlfATFXjvAj4yIOOsjAw1UVqD7AcHmVu502 KMqg== X-Gm-Message-State: AOJu0YzjW09iJt1yGrwAG5v7XIRHuSYc1MX/9ytfsORbKyiwo7G4CA7u QaaY8zCBG6wXrGrHi7zOQ9HkTPHOKXbJhQ== X-Received: by 2002:a17:90a:5797:b0:286:6cc1:5fde with SMTP id g23-20020a17090a579700b002866cc15fdemr4833396pji.97.1702572923165; Thu, 14 Dec 2023 08:55:23 -0800 (PST) Received: from Gentoo ([117.189.237.103]) by smtp.gmail.com with ESMTPSA id oe16-20020a17090b395000b0028b21d24ba6sm277441pjb.15.2023.12.14.08.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 08:55:22 -0800 (PST) Date: Fri, 15 Dec 2023 00:55:08 +0800 From: Jianhua Lu To: Mark Brown 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 14 Dec 2023 08:55:52 -0800 (PST) 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: > > On Thu, Dec 14, 2023 at 11:11:06AM +0000, Mark Brown wrote: > > > > The expectation is that TDM is set up by the machine driver, not from > > > hw_params - if the TDM setup can be changed from within hw_params then > > > it's hard to see how it's going to interact well with other TDM users on > > > the bus. More usually hw_params() would be influenced by the setup done > > > in set_tdm_slot(). > > > 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.