Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC
Hi > > > 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 !! Best regards --- Kuninori Morimoto ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC
Hi Alex > 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/...? Setting Sound Clock for all cases/patterns are very complex and difficult actually. (ADV7482 configuration) x (ADG divider / selector) x etc, etc... Thus, Current R-Car sound is assuming that audio_clk_a/b/c/i are providing route clock (= no configuration, fixed clock), and ADG divides it, and provide best clock to each SSIx. Current Salvator/ULCB already have 44.1/48kHz route clock (= CS2000 and Audio_CLK_A), and we can reuse it for all SSIx. Thus, ADV7482 clock is not necessary, I guess ? Or providing specific clock for some case is enough (ADG will automatically select it if necessary). If ADV7482 needs more detail clock settings combination, then, there is no method to adjust to it. We need to consider such system somehow. Thank you for your help !! Best regards --- Kuninori Morimoto ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 08/10] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC
Hi Alex Thank you for your pa > As all known variants of the Salvator board have the HDMI decoder > chip (the ADV7482) connected to the SSI4 on R-Car SoC, the ADV7482 > endpoint and the connection definitions are placed in the common board > file. > For the same reason, the CLK_C clock line and I2C configuration (similar > to the ak4613, on the same interface) are added into the common file. > > Signed-off-by: Alexander Riesen > Reviewed-by: Geert Uytterhoeven (snip) > @@ -758,8 +769,19 @@ &rcar_sound { ><&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, ><&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, ><&audio_clk_a>, <&cs2000>, > - <&audio_clk_c>, > + <&adv7482_hdmi_in>, ><&cpg CPG_CORE CPG_AUDIO_CLK_I>; > + clock-names = "ssi-all", > + "ssi.9", "ssi.8", "ssi.7", "ssi.6", > + "ssi.5", "ssi.4", "ssi.3", "ssi.2", > + "ssi.1", "ssi.0", > + "src.9", "src.8", "src.7", "src.6", > + "src.5", "src.4", "src.3", "src.2", > + "src.1", "src.0", > + "mix.1", "mix.0", > + "ctu.1", "ctu.0", > + "dvc.0", "dvc.1", > + "clk_a", "clk_b", "clk_c", "clk_i"; I think you don't need to overwrite clock-names here in this case ? Thank you for your help !! Best regards --- Kuninori Morimoto ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel