Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1385017pxb; Sun, 19 Sep 2021 16:05:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRSVa481XyAI2+1N1zP/4QQXJ6v6MG1ZqYAs1W69fqS2iSJp4oN7ohuTkysHbfH/nDmOr1 X-Received: by 2002:a17:906:9b1:: with SMTP id q17mr25055553eje.546.1632092710432; Sun, 19 Sep 2021 16:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632092710; cv=none; d=google.com; s=arc-20160816; b=az4tM47imegNXAMsMTPTuQEwb1ZNk3J/H+lnR2QF8fpUPQqC1Qxa0AIDJ0I1z56E4d dHQOsLMC23p9Ajb7xfIyNzum8agyaOR2ckW7QQFzAMbZPJvwEsv1QTcFizcf1cnstYCv c7zlg1kdDEwLtuYbE+VCwp2Hw3LDMjoloPPcN4az4UMcD19SxXOs4VsLdyvsGB2ynNXE wq3YSx8hh7FnuovjU8qARID21jzWkYbZtJhwz6wecGM28gg3z1oFkCs01cRU+AIQrY+4 RMgBtkUsdeG9IdZo+/H3ym4uyFc+9uj8TTOr1VeXWXHQLTmZXx37wCqd+/G+yQMFXypC K5Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5M7w7zPy21obTvYguz5Oq3eJq+JEdmpFilnfj/UaVzQ=; b=e++yfYvEhOrrBgUq1vFAR60zGgBuFpQ3DInN8PmAiF4olqC4hT8yfPtnaB42YUDKNu a+4VM2clHrCI/3qUsGtRvUMld5zOqA6vZZjr8Weqdzoe2cKo8MHXWAZiqhzd9ONs4ADC Rz0gvO87rYkR6pfqrWiFBsNhZ1nC4WuW0J80fXBgIhGMCP/ugj6iAh3jzb5Hhkz3kykK Kqs7wYMt1crOAAj+dIL98J4iSGq+t7uYcxkaR8HLoXs6g1UFV8Ajn0emMI1xjxAIGwT+ 4vv4iZ22VWu/3c+qGI4P1rxf39302DvchceOHz7fVLQu9mplvklGtoy9Tulj5VxPamWK zP1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LhN5noFj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s14si12234853edc.372.2021.09.19.16.04.40; Sun, 19 Sep 2021 16:05:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LhN5noFj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230463AbhISRka (ORCPT + 99 others); Sun, 19 Sep 2021 13:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbhISRkZ (ORCPT ); Sun, 19 Sep 2021 13:40:25 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D331C061574; Sun, 19 Sep 2021 10:38:50 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id t6so51432856edi.9; Sun, 19 Sep 2021 10:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5M7w7zPy21obTvYguz5Oq3eJq+JEdmpFilnfj/UaVzQ=; b=LhN5noFjo+451RFhaPdyEiaEskENVgpQpw/AKZYzB8yPg8w21uDQt3oeX0bOsbP3Gr CGbr7gmvPPmOjUdEtYO1vPUHutZjRsb2Qz9ekOMJ9IuCgg1/ArcVxFt7UeAyH1dESchQ TifLDaNGbXnep5im/SQaOK2V8JBxUNsIiwi720vH6zqPKVpELwe09vto+ju7FUNMMn1N gU4slJRLmX75YPFoPC/T02fI96cx4hv6v05GkCo7tUDhkmnQftykur0LfeKdjI1NZIvs Y5++L/weCha9F5RhlJCbiweOVNPBFO5bD4F3ywAQIwH54pEdF7MqpE//ZPSgmjSdnZfZ nUXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5M7w7zPy21obTvYguz5Oq3eJq+JEdmpFilnfj/UaVzQ=; b=svHDiyI+2S58ekWXxPolli2uu6cYk8ZQlJFhYyTqloQtG6P2of8E8ZHVM+T3AVzO30 7TaDSUX4nuMpjsxxUM9WCpET55SjTcKYGRH9tZesa6IHtEbj1rCsAVlKmhMqh1ADV+ip oTCZrg2WCBRZojuKaSncTDlH0LFNJpj/UFOOrrDglQzkAedSPOBEUN4rcO0KN2U4+ptB v3iISRdqZCzc1WWinNr97AFkYS8UJNZVrbLT1osRivKURWDBurufAJT49WF2Iin+UfyE i6ZnK38FjBQqfsOTtF8wHVIieCvkW+GSTTCSWM/44DDynI8jsLlqlhP529nX4mChIxr9 c0Pw== X-Gm-Message-State: AOAM533pSIi8PQqwS54mcdo3W3RrL/pg5e96YTr6JzdGNkv5nJlSYh+P huo/iJVtb75IBBp9Qka53V4= X-Received: by 2002:a05:6402:88e:: with SMTP id e14mr25583141edy.342.1632073128991; Sun, 19 Sep 2021 10:38:48 -0700 (PDT) Received: from archbook.localnet (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id c28sm5214401ejc.102.2021.09.19.10.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 10:38:48 -0700 (PDT) From: Nicolas Frattaroli To: Mark Brown Cc: Liam Girdwood , Rob Herring , Heiko Stuebner , linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/4] dt-bindings: sound: add rockchip i2s-tdm binding Date: Sun, 19 Sep 2021 19:38:47 +0200 Message-ID: <2435067.tOv7cHfTnj@archbook> In-Reply-To: <20210916122549.GF5048@sirena.org.uk> References: <20210903231536.225540-1-frattaroli.nicolas@gmail.com> <42974939.Tn3hggVSkZ@archbook> <20210916122549.GF5048@sirena.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Donnerstag, 16. September 2021 14:25:49 CEST Mark Brown wrote: > On Wed, Sep 15, 2021 at 07:06:14PM +0200, Nicolas Frattaroli wrote: > > On Mittwoch, 15. September 2021 16:10:12 CEST Mark Brown wrote: > > > Why is this not part of the normal bus format configuration? I don't > > > know what this is but it sounds a lot like I2S mode... > > > > This affects all TDM I2S modes, i.e. TDM Normal, TDM Left Justified and > > TDM > > Right Justified. > > > > Without tdm-fsync-half-frame, we purportedly get the following output in > > TDM Normal Mode (I2S Format): > > (ch0l = channel 0 left, ch0r = channel 0 right) > > > > fsync: _____________________________ > > > > \____________________________ > > > > sdi/sdo: ch0l, ch0r, ..., ch3l, ch3r, ch0l, ch0r, ... > > > > With tdm-fsync-half-frame, we purportedly get the following: > > > > fsync: _____________________________ > > > > \____________________________ > > > > sdi/sdo: ch0l, ch1l, ch2l, ch3l, ch0r, ch1r, ch2r, ch3r > > > > At least, according to the TRM. I do not have an oscilloscope to verify > > this myself, and in the following paragraphs, I will elaborate why this > > seems confusing to me. > > fsync-half-frame is just normal TDM for I2S, the default mode is how DSP > mode normally operates. I don't know that there's any pressing need to > support mix'n'match here, you could but it should be through the TDM > configuration API. > > > So to answer the question, it's not part of the bus format because it > > applies to three bus formats, and I'm completely out of my depth here and > > wouldn't define three separate bus formats based on my own speculation of > > how this works. > > It is part of the bus format really. I suspect the hardware is the kind > that only really implements DSP mode and can just fake up a LRCLK for > I2S in order to interoperate. Thank you for your explanation! Going forward, what would be a solution that is acceptable for upstream? As far as I understand, the obvious route here is to drop the rockchip,fsync- half-frame property and just always set this mode when we're using a TDM bus format. Is this correct? According to the TRM, the register bit this sets only affects TDM modes. Though since TDM is not standardised in any way from what I've read online, it is possible that there is hardware out there which expects the non-fsync-half- frame mode, but I am completely fine with only thinking about this hardware when it actually surfaces. Regards, Nicolas Frattaroli