Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2348051ybh; Mon, 9 Mar 2020 04:11:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtY7MgZDfCACc3J8mnT3FQ/K4UL405mFnQqzrZQaNBTk0cjmZeUspZYl2x7d5JJ3XdEdq2E X-Received: by 2002:a05:6830:1e85:: with SMTP id n5mr12164037otr.113.1583752286172; Mon, 09 Mar 2020 04:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583752286; cv=none; d=google.com; s=arc-20160816; b=PgZbZuplj1ikK1R3TqDGQY+OeSF/34jDYEq4I+yXXwIqaUn/NXXzMPo1ZtmwVDK8LY 0o3SeF7vpsHe3VWH6WfmxNA7raxx0138v2cQFefG7G1M3I5ZvgF8sC/CUb8wGOYQSsLE LTtpGKX0yWGi2XtCvrMCjltQUlm+bKnMyxzXPba+dsK3/aXzzZgtb9ENRXxMr466uppc 5M00cfQnE4R300lZNIbNinpGJIYxq09cHgqTRa2lenEbQKPjfrLLlDZ2CY8JB0Mho3Vu H2CPU2tcyut3zOPR8V6kZf8wUkN789y2veE7hizrhWqoXxjPp9Mp/F8j0E4MtctXydku ontg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=xq4uEwe79KRdQkqkeWwWZbI7AggYkN1rdfbIJdOW0t4=; b=UKCQ0bhUjLmQNuDDrOy2mNuObdp5qIyiHBwQ5g/23iUckh0fRrj1kS7rj4/7nTW88P GkcSUZDLoLp8omX78KQgLpx9gmkMNjA11hmtsdiV1YiXhE6arK2Al5ca9yogcd2l4m7i tzBUnA08GNO+a1+yzfX+1flLjYcOb42kEPN/O3pbHYJunchU6CdjBTK4ndZXrX8WHoJZ DmcdHPHJEUcSrgLz4cv2lNT8kgjo3kRapH7+sF0uVRJG9ZWLfGvyJ7aJIswwsAEhNqvk gowQGjml6c8JEABblLkUv/giIAHFbBQnhFAS5NIIJjBTDpRxEF4mkayOBSAFzKslJtzJ sYGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c22si3100623oic.108.2020.03.09.04.11.15; Mon, 09 Mar 2020 04:11:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726769AbgCILJu (ORCPT + 99 others); Mon, 9 Mar 2020 07:09:50 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:49957 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbgCILJt (ORCPT ); Mon, 9 Mar 2020 07:09:49 -0400 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MNss4-1j0MB33BHc-00OKYg; Mon, 09 Mar 2020 12:09:33 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id AEACE650061; Mon, 9 Mar 2020 11:09:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EF_gs1Tv7aJJ; Mon, 9 Mar 2020 12:09:32 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 4495A64FD05; Mon, 9 Mar 2020 12:09:32 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.10.2.141) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 9 Mar 2020 12:09:32 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id E1BA1804F8; Mon, 9 Mar 2020 12:09:31 +0100 (CET) Date: Mon, 9 Mar 2020 12:09:31 +0100 From: Alex Riesen To: Kuninori Morimoto CC: Laurent Pinchart , Geert Uytterhoeven , Kieran Bingham , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Mark Rutland , Driver Development , Linux Media , Linux Kernel , Device Tree , Renesas SoC Subject: Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC Message-ID: <20200309110931.GB3593@pflmari> Mail-Followup-To: Alex Riesen , Kuninori Morimoto , Laurent Pinchart , Geert Uytterhoeven , Kieran Bingham , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Mark Rutland , Driver Development , Linux Media , Linux Kernel , Device Tree , Renesas SoC References: <20200302150706.GB3717@pflmari> <20200302160906.GC3717@pflmari> <20200305143628.GB25741@pflmari> <20200306131632.GA4878@pendragon.ideasonboard.com> <20200306134154.GD27714@pflmari> <20200306134546.GE4878@pendragon.ideasonboard.com> <87r1y2wbze.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <87r1y2wbze.wl-kuninori.morimoto.gx@renesas.com> X-Originating-IP: [10.10.2.141] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A29536F936F637D63 X-Provags-ID: V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ESjtaCr1YiTgaaQ/uL73fsR6f5DtBYYzZ/IhI0 rymrCcY3m1GBu0hpUne15zhelObdrhOC+u5oCsc21Vn87GFy0Wody6vBthbrHoWPTpXLz52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Kuninori Morimoto, Mon, Mar 09, 2020 02:31:01 +0100: > > > > Those clocks are part of the CSI-2 protocol and also don't need to be > > > > explicitly controlled. As far as I can tell from a quick check of the > > > > ADV7482 documentation, only the I2S MCLK is a general-purpose clock that > > > > needs to be exposed. > (snip) > > > Do you know, by chance, which of the snd_soc* callbacks should be used to > > > implement setting of the MCLK? The one in snd_soc_component_driver or > > > snd_soc_dai_driver->ops (snd_soc_dai_ops)? > > > > > > Or how the userspace interface looks like? Or, if there is no userspace > > > interface for this, how the MCLK is supposed to be set? Through mclk-fs? > > > > I'm afraid my knowledge of the sound subsystem is limited. Morimoto-san > > is the main developer and maintainer of Renesas sound drivers. > > Morimoto-sensei, would you have an answer to that question ? :-) > > In my quick check, it goes to AUDIO_CLKC. > If so, you can update rcar_sound::clocks. > > &rcar_sound { > ... > - /* update to */ > + /* update to , > + * to */ > clocks = <&cpg CPG_MOD 1005>, > ... > <&audio_clk_a>, <&cs2000>, > - <&audio_clk_c>, > + <&adv748x>, > <&cpg CPG_CORE CPG_AUDIO_CLK_I>; > > Thank you for your help !! Thanks. Should the adv748x driver also implement anything to configure the frequency of MCLK clock? I mean something like .set_sysclk and .set_fmt callbacks of snd_soc_dai_ops? Or is the driver implementation, which depends on mclk-fs to be 256, the audio stream format to be 8x S24_LE, and requires strictly 48kHz sampling rate on the HDMI input, a totally acceptable first attempt at writing a DAI driver? I'm a bit bothered by that, as the hardware is also capable of decoding stereo, sampling rate 32-192kHz, a variety of PCM and compressed/encrypted formats, 128-768fs MCLK multipliers, and a row of I2S options. I just find it confusing to place the configuration interfaces. For instance, the patches use the media ioctl for audio output selection to select I2S protocol. While works, it does not feel right (shouldn't it be in the device tree?) Maybe you can point me at a driver doing something similar? I'm studying media drivers now, but not many of them use ASoC interfaces for devices providing a clock. Or maybe I should better look at sound/soc/...? Thanks in advance, Alex