Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2942506rdh; Wed, 27 Sep 2023 19:08:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQ5/od/da2rIw2DvxDUgsOxKo5YNu8ea1mmtojgdUkigNVJcN++5mctgm696HpTrnDQg3X X-Received: by 2002:a05:6a00:2389:b0:68e:236a:93d9 with SMTP id f9-20020a056a00238900b0068e236a93d9mr4777447pfc.17.1695866900318; Wed, 27 Sep 2023 19:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695866900; cv=none; d=google.com; s=arc-20160816; b=mo+Q/xRYFGGvsPRW3o7Qvdhim/wCtNH6gXJt98pNJKWjHg0Wkt8RAd2f0ATsLk7uyf +Y4FN4v5P5Fjcj1xuvUB6OMLoeuGkEjSgk7eqspOXfYPzFq2pCWWztZEm7yMJjzZ8Kd7 9AyX717bSi5ioNHxDzoSdsztUN2PI7gYov16eKTTiZVF1LQ4i2C4ifEfh4cGQgn2qMPy kPiLCLVMw3+Uh2X+zU5IAv5EyeRnxYmY+Jlv72yUnt7UBYZk+1KigYoGFO72guasq0yp /C3TxfAMX77Gp+OiJPZKuC6DEBRmfCUgG0ihGKxK4AkiwLXDrdG7I+/b6H7VfT85w9sd Cqqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=bIHDxd++EtjY2wWnPzyNPRu2eEhKD7DL274D564ab3Q=; fh=gKVu5voRAmEczK7vQUp4XZQw/Lt3CEKxqrgQgQHunfw=; b=iVrQrV9y8WbqaChwVQot4pwS5fj4MEKK9h07Y4CQhvNGEqdQ4By5Avrtg7Y3pHTigU WEY3BTuU8lKA4XLs2wBG9yHf3k89RzNsn6R5dORLlji2HjoMDs78NtDyoDgB7FrYZVsX 0xqCp9vESDCcRnu8MadnsAYdMITLeGdo3kNLc+4pZpmX4NO0nozWrN937748d3CI7brC 8oI6WgyEJARD6AKfH5LIge4+TmsxozR9FxodIO8j3nkEXBTOrjoe1FOyY5/6H1Gh2xbA 9Ubel1dFP597IYgnQzhd2z1HbEFQvupSIxQNkY2BkL4u7SASilyxqAReWKwbdlYrbImM EXMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k2-20020aa788c2000000b0068a65b26fc6si18939555pff.43.2023.09.27.19.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 19:08:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B4CAB837139C; Wed, 27 Sep 2023 19:03:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbjI1CDq (ORCPT + 99 others); Wed, 27 Sep 2023 22:03:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbjI1CDp (ORCPT ); Wed, 27 Sep 2023 22:03:45 -0400 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 11076102 for ; Wed, 27 Sep 2023 19:03:42 -0700 (PDT) X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(1978092:0:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Thu, 28 Sep 2023 10:03:00 +0800 (CST) Received: from ex3.rt.l (192.168.10.46) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Thu, 28 Sep 2023 10:03:00 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex3.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Thu, 28 Sep 2023 10:03:00 +0800 Date: Thu, 28 Sep 2023 10:03:00 +0800 From: ChiYuan Huang To: Mark Brown CC: Jaroslav Kysela , Takashi Iwai , Allen Lin , , Subject: Re: [PATCH] ASoC: codecs: rtq9128: Add TDM data source selection Message-ID: <20230928020300.GA18024@linuxcarl2.richtek.com> References: <1695780376-32301-1-git-send-email-cy_huang@richtek.com> <20230927094637.GA25905@linuxcarl2.richtek.com> <20230927101948.GA27975@linuxcarl2.richtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 27 Sep 2023 19:03:58 -0700 (PDT) On Wed, Sep 27, 2023 at 12:28:29PM +0200, Mark Brown wrote: > On Wed, Sep 27, 2023 at 06:19:48PM +0800, ChiYuan Huang wrote: > > On Wed, Sep 27, 2023 at 11:59:31AM +0200, Mark Brown wrote: > > > > Sure, but is that actually a practical design - or if someone is doing > > > this shouldn't it be joined up with the TDM configuration since with > > > just the control it'd only be possible to switch the pins but not change > > > the TDM layout? I'm not sure that this control works as a standalone > > > thing. > > > I think if two data source input for different scenarios, then the data source > > switch will become practical. For the standalone usage, keep a device property > > to decide this may be enough. But consider the future application, to keep this > > in general mixer control is still usable to meet the complex design. > > My concern is that the control might not actually be usable without also > changing the TDM mode so we might need the machine driver to add a > control which flips the input and also changes the TDM mode - it feels > likley that if there are two inputs they won't have identical formats. Yap, your concern may be correct. This change is really becuase our default register is badly defined. it choose TDM CH12 from 'DATA1' and CH34 from 'DATA2'. If it can choose both default to either one, this doesn't make it confused. Also, there's the another option is 'to tell user if TDM will be used, plase connect 'DATA1' and 'DATA2' together'. But our datasheet did not directly define this. I'll prepare another patch to define a device property, parsing at probe function and configure this input source source directly in 'set_tdm_slot' API when TDM is chosen to use. Thanks for all the comment.