lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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


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 <audio_clk_b> to <cs2000> */
> +		/* update <audio_clk_b> to <cs2000>,
> +		 *        <audio_clk_c> to <adv748x> */
> 		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 !!


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

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,

Powered by blists - more mailing lists