Re: [PATCH v5 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-09-14 Thread Alex Riesen
Hi Kieran, Kieran Bingham, Tue, Aug 25, 2020 16:57:04 +0200: > On 18/06/2020 17:32, Kieran Bingham wrote: > > On 02/04/2020 19:35, Alex Riesen wrote: > >> As all known variants of the Salvator board have the HDMI decoder > >> chip (the ADV7482) connected to the SSI

Re: [PATCH v5 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-06-19 Thread Alex Riesen
Kieran Bingham, Thu, Jun 18, 2020 18:32:55 +0200: > On 02/04/2020 19:35, Alex Riesen wrote: > > --- a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts > > +++ b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts > > @@ -146,7 +146,8 @@ &sata { > > &sound

Re: [PATCH v5 7/9] media: adv748x: only activate DAI if it is described in device tree

2020-06-19 Thread Alex Riesen
Kieran Bingham, Thu, Jun 18, 2020 18:17:04 +0200: > On 02/04/2020 19:34, Alex Riesen wrote: > > To avoid setting it up even if the hardware is not actually connected > > to anything physically. > > > > Besides, the bindings explicitly notes that port definitions are &g

Re: [PATCH v5 6/9] media: adv748x: prepare/enable mclk when the audio is used

2020-06-19 Thread Alex Riesen
Kieran Bingham, Thu, Jun 18, 2020 18:23:14 +0200: > On 02/04/2020 19:34, Alex Riesen wrote: > > --- a/drivers/media/i2c/adv748x/adv748x-dai.c > > +++ b/drivers/media/i2c/adv748x/adv748x-dai.c > > @@ -117,11 +117,22 @@ static int adv748x_dai_set_fmt(struct snd_soc_dai >

Re: [PATCH v5 4/9] media: adv748x: add definitions for audio output related registers

2020-04-07 Thread Alex Riesen
Kieran Bingham, Tue, Apr 07, 2020 20:44:04 +0200: > Hi Alex, > > With all the changes you've described below: > > Reviewed-by: Kieran Bingham > Thanks. Will be in v6 like this below: diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index 0a9d78c2870b..e1

Re: [PATCH v5 4/9] media: adv748x: add definitions for audio output related registers

2020-04-07 Thread Alex Riesen
Hi Kieran, Kieran Bingham, Tue, Apr 07, 2020 18:21:00 +0200: > On 02/04/2020 19:34, Alex Riesen wrote: > > diff --git a/drivers/media/i2c/adv748x/adv748x.h > > b/drivers/media/i2c/adv748x/adv748x.h > > index 0a9d78c2870b..1a1ea70086c6 100644 > > --- a/drivers/

Re: [PATCH v5 2/9] media: adv748x: include everything adv748x.h needs into the file

2020-04-03 Thread Alex Riesen
Hi Kiran, Kieran Bingham, Fri, Apr 03, 2020 12:48:06 +0200: > On 02/04/2020 19:34, Alex Riesen wrote: > > --- a/drivers/media/i2c/adv748x/adv748x-core.c > > +++ b/drivers/media/i2c/adv748x/adv748x-core.c > > @@ -10,6 +10,8 @@ > > * Kieran Bingham > >

Re: [PATCH v5 1/9] media: adv748x: fix end-of-line terminators in diagnostic statements

2020-04-03 Thread Alex Riesen
Kieran Bingham, Fri, Apr 03, 2020 12:43:38 +0200: > Hi Alex, > > On 02/04/2020 19:34, Alex Riesen wrote: > > Signed-off-by: Alexander Riesen > > Reviewed-by: Laurent Pinchart > > I guess we could have also added this directly to the helper macros, but > there is i

[PATCH v5 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-04-02 Thread Alex Riesen
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,

[PATCH v5 8/9] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-04-02 Thread Alex Riesen
As the driver has some support for the audio interface of the device, the bindings file should mention it. Signed-off-by: Alexander Riesen Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart -- v3: remove optionality off MCLK clock cell to ensure the description matches the hardware no

[PATCH v5 7/9] media: adv748x: only activate DAI if it is described in device tree

2020-04-02 Thread Alex Riesen
To avoid setting it up even if the hardware is not actually connected to anything physically. Besides, the bindings explicitly notes that port definitions are "optional if they are not connected to anything at the hardware level". Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/ad

[PATCH v5 6/9] media: adv748x: prepare/enable mclk when the audio is used

2020-04-02 Thread Alex Riesen
As there is nothing else (the consumers are supposed to do that) which enables the clock, do it in the driver. Signed-off-by: Alexander Riesen -- v3: added --- drivers/media/i2c/adv748x/adv748x-dai.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/medi

[PATCH v5 5/9] media: adv748x: add support for HDMI audio

2020-04-02 Thread Alex Riesen
This adds an implemention of SoC DAI driver which provides access to the I2S port of the device. Signed-off-by: Alexander Riesen -- v3: fix clock registration in case of multiple adv748x devices Suggested-by: Geert Uytterhoeven v4: use clk_hw instead of clk Suggested-by: Stephen Boyd

[PATCH v5 4/9] media: adv748x: add definitions for audio output related registers

2020-04-02 Thread Alex Riesen
Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x.h | 32 + 1 file changed, 32 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index 0a9d78c2870b..1a1ea70086c6 100644 --- a/drivers/media/i2c/adv

[PATCH v5 3/9] media: adv748x: reduce amount of code for bitwise modifications of device registers

2020-04-02 Thread Alex Riesen
The regmap provides a convenient utility for this. The hdmi_* and dpll_* register modification macros added for symmetry with the existing operations (io_*, sdp_*). Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart -- v3: remove _update name in favor of existing _clrset --- drivers

[PATCH v5 2/9] media: adv748x: include everything adv748x.h needs into the file

2020-04-02 Thread Alex Riesen
To follow the established practice of not depending on others to pull everything in. While at it, make sure it stays like this. Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-afe.c | 6 ++ drivers/media/i2c/adv748x/adv748x-core.c | 6 ++-

[PATCH v5 1/9] media: adv748x: fix end-of-line terminators in diagnostic statements

2020-04-02 Thread Alex Riesen
Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-core.c | 24 drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b

[PATCH v5 0/9] media: adv748x: add support for HDMI audio

2020-04-02 Thread Alex Riesen
sent as a separate series later. - The whole series has been rebased on top of v5.6-rc6 Alex Riesen (9): media: adv748x: fix end-of-line terminators in diagnostic statements media: adv748x: include everything adv748x.h needs into the file media: adv748x: reduce amount of code for bitwise

Re: [PATCH v4 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-04-02 Thread Alex Riesen
Geert Uytterhoeven, Thu, Apr 02, 2020 17:26:15 +0200: > On Thu, Apr 2, 2020 at 5:03 PM Alex Riesen > wrote: > > Geert Uytterhoeven, Mon, Mar 30, 2020 10:32:47 +0200: > > > On Thu, Mar 26, 2020 at 11:55 AM Alex Riesen > > > wrote: > > > > --- a/arch/a

Re: [PATCH v4 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-04-02 Thread Alex Riesen
Hi Geert, I'm sorry for late reply. Some unrelated happenings here in south Germany. Geert Uytterhoeven, Mon, Mar 30, 2020 10:32:47 +0200: > On Thu, Mar 26, 2020 at 11:55 AM Alex Riesen > wrote: > > --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi > > +++ b/arch

[PATCH v4 5/9] media: adv748x: add support for HDMI audio

2020-03-26 Thread Alex Riesen
This adds an implemention of SoC DAI driver which provides access to the I2S port of the device. Signed-off-by: Alexander Riesen -- v3: fix clock registration in case of multiple adv748x devices Suggested-by: Geert Uytterhoeven v4: use clk_hw instead of clk Suggested-by: Stephen Boyd

[PATCH v4 8/9] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-26 Thread Alex Riesen
As the driver has some support for the audio interface of the device, the bindings file should mention it. Signed-off-by: Alexander Riesen Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart -- v3: remove optionality off MCLK clock cell to ensure the description matches the hardware no

[PATCH v4 7/9] media: adv748x: only activate DAI if it is described in device tree

2020-03-26 Thread Alex Riesen
To avoid setting it up even if the hardware is not actually connected to anything physically. Besides, the bindings explicitly notes that port definitions are "optional if they are not connected to anything at the hardware level". Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/ad

[PATCH v4 9/9] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-26 Thread Alex Riesen
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,

[PATCH v4 6/9] media: adv748x: prepare/enable mclk when the audio is used

2020-03-26 Thread Alex Riesen
As there is nothing else (the consumers are supposed to do that) which enables the clock, do it in the driver. Signed-off-by: Alexander Riesen -- v3: added --- drivers/media/i2c/adv748x/adv748x-dai.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/medi

[PATCH v4 4/9] media: adv748x: add definitions for audio output related registers

2020-03-26 Thread Alex Riesen
Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x.h | 32 + 1 file changed, 32 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index 0a9d78c2870b..1a1ea70086c6 100644 --- a/drivers/media/i2c/adv

[PATCH v4 3/9] media: adv748x: reduce amount of code for bitwise modifications of device registers

2020-03-26 Thread Alex Riesen
The regmap provides a convenient utility for this. The hdmi_* and dpll_* register modification macros added for symmetry with the existing operations (io_*, sdp_*). Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart -- v3: remove _update name in favor of existing _clrset --- drivers

[PATCH v4 2/9] media: adv748x: include everything adv748x.h needs into the file

2020-03-26 Thread Alex Riesen
To follow the established practice of not depending on others to pull everything in. While at it, make sure it stays like this. Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-afe.c | 6 ++ drivers/media/i2c/adv748x/adv748x-core.c | 6 ++-

[PATCH v4 1/9] media: adv748x: fix end-of-line terminators in diagnostic statements

2020-03-26 Thread Alex Riesen
Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-core.c | 24 drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b

[PATCH v4 0/9] media: adv748x: add support for HDMI audio

2020-03-26 Thread Alex Riesen
-arranged, starting with the generic changes and changes not related to audio directly. Those will be probably sent as a separate series later. - The whole series has been rebased on top of v5.6-rc6 Alex Riesen (9): media: adv748x: fix end-of-line terminators in diagnostic statements media

Re: [PATCH v3 09/11] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-23 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Mon, Mar 23, 2020 09:48:00 +0100: > On Mon, Mar 23, 2020 at 9:41 AM Alex Riesen > wrote: > > Geert Uytterhoeven, Mon, Mar 23, 2020 09:34:45 +0100: > > > On Fri, Mar 20, 2020 at 5:43 PM Alex Riesen > > > wrote: > >

Re: [PATCH v3 09/11] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-23 Thread Alex Riesen
Alex Riesen, Mon, Mar 23, 2020 09:40:11 +0100: > Geert Uytterhoeven, Mon, Mar 23, 2020 09:34:45 +0100: > > On Fri, Mar 20, 2020 at 5:43 PM Alex Riesen > > wrote: > > > As all known variants of the Salvator board have the HDMI decoder > > > chip (the ADV7482) c

Re: [PATCH v3 09/11] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-23 Thread Alex Riesen
Geert Uytterhoeven, Mon, Mar 23, 2020 09:34:45 +0100: > On Fri, Mar 20, 2020 at 5:43 PM Alex Riesen > wrote: > > 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 th

Re: [PATCH v3 05/11] media: adv748x: add support for HDMI audio

2020-03-23 Thread Alex Riesen
Stephen Boyd, Sat, Mar 21, 2020 02:09:31 +0100: > Quoting Alex Riesen (2020-03-20 09:12:00) > > diff --git a/drivers/media/i2c/adv748x/adv748x-dai.c > > b/drivers/media/i2c/adv748x/adv748x-dai.c > > new file mode 100644 > > index ..6fce7d000423 > >

Re: [PATCH v2 08/10] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-23 Thread Alex Riesen
Hi Morimoto-san, Kuninori Morimoto, Mon, Mar 23, 2020 01:12:00 +0100: > > 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. >

Re: [PATCH v2 07/10] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-20 Thread Alex Riesen
Hi Laurent, Laurent Pinchart, Fri, Mar 20, 2020 10:59:07 +0100: > On Fri, Mar 20, 2020 at 10:03:39AM +0100, Alex Riesen wrote: > > Geert Uytterhoeven, Fri, Mar 20, 2020 09:48:14 +0100: > > > > > > You'd be surprised how many board designers would consider thi

[PATCH v3 11/11] media: adv748x: allow the HDMI sub-device to accept EDID

2020-03-20 Thread Alex Riesen
This makes it possible to load a EDID reported by the device with v4l2-ctl utility: vdev=/dev/$(grep -l '^adv748x.*hdmi$' /sys/class/video4linux/v4l-subdev*/name |cut -d/ -f5-5) v4l2-ctl -d $vdev --set-edid=pad=0,file=/etc/adv7482.edid Signed-off-by: Alexander Riesen -- I would like to av

[PATCH v3 10/11] media: adv748x: add support for log_status ioctl

2020-03-20 Thread Alex Riesen
The logged information provides insights about cable connection and the state of the HDMI decoder. It is very useful when debugging hardware problems in environments without easy access to the connectors. This change adds a device-specific wrapper for register block read, because some of the devic

[PATCH v3 09/11] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-20 Thread Alex Riesen
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, o

[PATCH v3 08/11] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-20 Thread Alex Riesen
As the driver has some support for the audio interface of the device, the bindings file should mention it. Signed-off-by: Alexander Riesen Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart -- v3: remove optionality off MCLK clock cell to ensure the description matches the hardware no

[PATCH v3 07/11] media: adv748x: only activate DAI if it is described in device tree

2020-03-20 Thread Alex Riesen
To avoid setting it up even if the hardware is not actually connected to anything physically. Besides, the bindings explicitly notes that port definitions are "optional if they are not connected to anything at the hardware level". Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/ad

[PATCH v3 06/11] media: adv748x: prepare/enable mclk when the audio is used

2020-03-20 Thread Alex Riesen
As there is nothing else (the consumers are supposed to do that) which enables the clock, do it in the driver. Signed-off-by: Alexander Riesen -- v3: added --- drivers/media/i2c/adv748x/adv748x-dai.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/medi

[PATCH v3 05/11] media: adv748x: add support for HDMI audio

2020-03-20 Thread Alex Riesen
This adds an implemention of SoC DAI driver which provides access to the I2S port of the device. Signed-off-by: Alexander Riesen -- v3: fix clock registration in case of multiple adv748x devices Suggested-by: Geert Uytterhoeven --- drivers/media/i2c/adv748x/Makefile | 3 +- drivers

[PATCH v3 04/11] media: adv748x: add definitions for audio output related registers

2020-03-20 Thread Alex Riesen
Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x.h | 32 + 1 file changed, 32 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index 0a9d78c2870b..1a1ea70086c6 100644 --- a/drivers/media/i2c/adv

[PATCH v3 03/11] media: adv748x: reduce amount of code for bitwise modifications of device registers

2020-03-20 Thread Alex Riesen
The regmap provides a convenient utility for this. The hdmi_* and dpll_* register modification macros added for symmetry with the existing operations (io_*, sdp_*). Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart -- v3: remove _update name in favor of existing _clrset --- drivers

[PATCH v3 02/11] media: adv748x: include everything adv748x.h needs into the file

2020-03-20 Thread Alex Riesen
To follow the established practice of not depending on others to pull everything in. While at it, make sure it stays like this. Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-afe.c | 6 ++ drivers/media/i2c/adv748x/adv748x-core.c | 6 ++-

[PATCH v3 01/11] media: adv748x: fix end-of-line terminators in diagnostic statements

2020-03-20 Thread Alex Riesen
Signed-off-by: Alexander Riesen Reviewed-by: Laurent Pinchart --- drivers/media/i2c/adv748x/adv748x-core.c | 24 drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b

[PATCH v3 00/11] media: adv748x: add support for HDMI audio

2020-03-20 Thread Alex Riesen
been re-arranged, starting with the generic changes and changes not related to audio directly. Those will be probably sent as a separate series later. - The whole series has been rebased on top of v5.6-rc6 Alex Riesen (11): media: adv748x: fix end-of-line terminators in diagnostic

Re: [PATCH v2 05/10] media: adv748x: add support for HDMI audio

2020-03-20 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Fri, Mar 20, 2020 12:05:20 +0100: > On Fri, Mar 20, 2020 at 11:58 AM Alex Riesen > wrote: > > Geert Uytterhoeven, Fri, Mar 20, 2020 09:43:29 +0100: > > > On Thu, Mar 19, 2020 at 6:42 PM Alex Riesen > > > wrote: > > > > T

Re: [PATCH v2 05/10] media: adv748x: add support for HDMI audio

2020-03-20 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Fri, Mar 20, 2020 09:43:29 +0100: > CC linux-clk for the clock provider. > > On Thu, Mar 19, 2020 at 6:42 PM Alex Riesen > wrote: > > This adds an implemention of SoC DAI driver which provides access to the > > I2S port of the device. I

[PATCH v2 08/10] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-20 Thread Alex Riesen
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, o

Re: [PATCH v2 07/10] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-20 Thread Alex Riesen
Geert Uytterhoeven, Fri, Mar 20, 2020 10:15:17 +0100: > On Fri, Mar 20, 2020 at 10:03 AM Alex Riesen > wrote: > > Geert Uytterhoeven, Fri, Mar 20, 2020 09:48:14 +0100: > > > On Fri, Mar 20, 2020 at 9:44 AM Alex Riesen > > > wrote: > > > > Laurent

Re: [PATCH v2 03/10] media: adv748x: reduce amount of code for bitwise modifications of device registers

2020-03-20 Thread Alex Riesen
Laurent Pinchart, Thu, Mar 19, 2020 19:06:14 +0100: > On Thu, Mar 19, 2020 at 06:41:53PM +0100, Alex Riesen wrote: > > #define io_read(s, r) adv748x_read(s, ADV748X_PAGE_IO, r) > > #define io_write(s, r, v) adv748x_write(s, ADV748X_PAGE_IO, r, v) > > -#define io_clrset(s, r

Re: [PATCH v2 07/10] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-20 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Fri, Mar 20, 2020 09:48:14 +0100: > On Fri, Mar 20, 2020 at 9:44 AM Alex Riesen > wrote: > > Laurent Pinchart, Thu, Mar 19, 2020 19:01:25 +0100: > > > On Thu, Mar 19, 2020 at 06:42:36PM +0100, Alex Riesen wrote: > > > > As the driv

Re: [PATCH v2 05/10] media: adv748x: add support for HDMI audio

2020-03-20 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Fri, Mar 20, 2020 09:43:29 +0100: > CC linux-clk for the clock provider. Thanks! > > +int adv748x_dai_init(struct adv748x_dai *dai) > > +{ > > + int ret; > > + struct adv748x_state *state = adv748x_dai_to_state(dai); > > + > > + dai->mclk = clk_reg

Re: [PATCH v2 07/10] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-20 Thread Alex Riesen
Hi Laurent, Laurent Pinchart, Thu, Mar 19, 2020 19:01:25 +0100: > On Thu, Mar 19, 2020 at 06:42:36PM +0100, Alex Riesen wrote: > > As the driver has some support for the audio interface of the device, > > the bindings file should mention it. > > While at it, how about conve

Re: [PATCH v2 02/10] media: adv748x: include everything adv748x.h needs into the file

2020-03-20 Thread Alex Riesen
Hi Laurent, Laurent Pinchart, Thu, Mar 19, 2020 18:48:02 +0100: > On Thu, Mar 19, 2020 at 06:41:48PM +0100, Alex Riesen wrote: > > To follow the established practice of not depending on others to > > pull everything in. > > Good idea. While at it, could you include "ad

[PATCH v2 09/10] media: adv748x: add support for log_status ioctl

2020-03-19 Thread Alex Riesen
The logged information provides insights about cable connection and the state of the HDMI decoder. It is very useful when debugging hardware problems in environments without easy access to the connectors. This change adds a device-specific wrapper for register block read, because some of the devic

[PATCH v2 10/10] media: adv748x: allow the HDMI sub-device to accept EDID

2020-03-19 Thread Alex Riesen
This makes it possible to load a EDID reported by the device with v4l2-ctl utility: vdev=/dev/$(grep -l '^adv748x.*hdmi$' /sys/class/video4linux/v4l-subdev*/name |cut -d/ -f5-5) v4l2-ctl -d $vdev --set-edid=pad=0,file=/etc/adv7482.edid Signed-off-by: Alexander Riesen --- drivers/media/i2c/

[PATCH v2 07/10] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-03-19 Thread Alex Riesen
As the driver has some support for the audio interface of the device, the bindings file should mention it. Reviewed-by: Rob Herring Signed-off-by: Alexander Riesen --- .../devicetree/bindings/media/i2c/adv748x.txt| 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff -

[PATCH v2 06/10] media: adv748x: only activate DAI if it is described in device tree

2020-03-19 Thread Alex Riesen
To avoid setting it up even if the hardware is not actually connected to anything physically. Besides, the bindings explicitly notes that port definitions are "optional if they are not connected to anything at the hardware level". Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/ad

[PATCH v2 05/10] media: adv748x: add support for HDMI audio

2020-03-19 Thread Alex Riesen
This adds an implemention of SoC DAI driver which provides access to the I2S port of the device. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/Makefile | 3 +- drivers/media/i2c/adv748x/adv748x-core.c | 9 +- drivers/media/i2c/adv748x/adv748x-dai.c | 256 ++

[PATCH v2 04/10] media: adv748x: add definitions for audio output related registers

2020-03-19 Thread Alex Riesen
Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x.h | 32 + 1 file changed, 32 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index c5245464fffc..7bc1bb0b3756 100644 --- a/drivers/media/i2c/adv

[PATCH v2 00/10] media: adv748x: add support for HDMI audio

2020-03-19 Thread Alex Riesen
will be probably sent as a separate series later. - The whole series has been rebased on top of v5.6-rc6 Alex Riesen (10): media: adv748x: fix end-of-line terminators in diagnostic statements media: adv748x: include everything adv748x.h needs into the file media: adv748x: reduce amount

[PATCH v2 01/10] media: adv748x: fix end-of-line terminators in diagnostic statements

2020-03-19 Thread Alex Riesen
Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-core.c | 24 drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv7

[PATCH v2 02/10] media: adv748x: include everything adv748x.h needs into the file

2020-03-19 Thread Alex Riesen
To follow the established practice of not depending on others to pull everything in. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-afe.c | 2 -- drivers/media/i2c/adv748x/adv748x-core.c | 2 -- drivers/media/i2c/adv748x/adv748x-csi2.c | 2 -- drivers/media/i2c/adv748x/ad

[PATCH v2 03/10] media: adv748x: reduce amount of code for bitwise modifications of device registers

2020-03-19 Thread Alex Riesen
The regmap provides a convenient utility for this. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-core.c | 6 ++ drivers/media/i2c/adv748x/adv748x.h | 15 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv748x/ad

Re: [PATCH 2/8] media: adv748x: add audio mute control and output selection ioctls

2020-03-13 Thread Alex Riesen
Hans Verkuil, Fri, Mar 13, 2020 11:52:03 +0100: > On 3/13/20 11:26 AM, Alex Riesen wrote: > > Hans Verkuil, Fri, Mar 13, 2020 09:16:11 +0100: > >> Generally an hdmi driver will configure the i2s audio automatically, which > >> is > >> typically connected t

Re: [PATCH 2/8] media: adv748x: add audio mute control and output selection ioctls

2020-03-13 Thread Alex Riesen
Hi Hans, Hans Verkuil, Fri, Mar 13, 2020 09:16:11 +0100: > On 1/13/20 3:15 PM, Alex Riesen wrote: > > This change implements audio-related V4L2 ioctls for the HDMI subdevice. > > This is really where things go wrong. These V4L2 audio ioctls are meant for > old PCI TV tuner

Re: [PATCH 0/8] media: i2c: adv748x: add support for HDMI audio

2020-03-13 Thread Alex Riesen
Hans Verkuil, Fri, Mar 13, 2020 09:37:18 +0100: > On 3/13/20 9:31 AM, Alex Riesen wrote: > > Shall I submit the log-status separately? > > Yes please. In my experience, log status is a very nice and very useful > feature. > > If you have other sensible cleanups, then f

Re: [PATCH 0/8] media: i2c: adv748x: add support for HDMI audio

2020-03-13 Thread Alex Riesen
user space (I2S vs I2S/TDM) never felt right. Shall I submit the log-status separately? Regards, Alex > On 1/13/20 3:14 PM, Alex Riesen wrote: > > This adds minimal support for controlling the audio output I2S port > > available > > on ADV7481 and ADV7482 HDMI decoder devices by

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-10 Thread Alex Riesen
Hello Morimoto-san, Kuninori Morimoto, Tue, Mar 10, 2020 02:07:23 +0100: > > 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, wh

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-09 Thread Alex Riesen
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 > >

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-06 Thread Alex Riesen
Hi Laurent, Laurent Pinchart, Fri, Mar 06, 2020 14:16:32 +0100: > On Thu, Mar 05, 2020 at 03:36:28PM +0100, Alex Riesen wrote: > > Geert Uytterhoeven, Mon, Mar 02, 2020 17:13:30 +0100: > > > On Mon, Mar 2, 2020 at 5:09 PM Alex Riesen > > > wrote: > > > > G

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-05 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Mon, Mar 02, 2020 17:13:30 +0100: > On Mon, Mar 2, 2020 at 5:09 PM Alex Riesen > wrote: > > Geert Uytterhoeven, Mon, Mar 02, 2020 16:32:32 +0100: > > > > > > The #clock-cells should be in the main video-receiver node. > > >

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-02 Thread Alex Riesen
Hi Geert, Geert Uytterhoeven, Mon, Mar 02, 2020 16:32:32 +0100: > > And this absence of documentation also means that whatever clocks (both > > input > > in "clocks=" and output in "#clock-cells") listed in a specific .dts are > > just > > an integration detail? > > No, the absence probably mea

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-02 Thread Alex Riesen
Geert Uytterhoeven, Mon, Mar 02, 2020 14:47:46 +0100: > On Mon, Mar 2, 2020 at 2:40 PM Alex Riesen > wrote: > > > > --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi > > > > +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi > > > > @@ -322,6

Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-02 Thread Alex Riesen
Geert Uytterhoeven, Mon, Mar 02, 2020 13:28:13 +0100: > Hi Alex, > > Thanks for your patch! > > On Mon, Jan 13, 2020 at 3:24 PM Alex Riesen > wrote: > > Not sure if all variants of the Salvator board have the HDMI decoder > > chip (the ADV7482) connected to the

[PATCH 0/8] media: i2c: adv748x: add support for HDMI audio

2020-01-13 Thread Alex Riesen
This adds minimal support for controlling the audio output I2S port available on ADV7481 and ADV7482 HDMI decoder devices by ADI. The port carries audio signal from the decoded HDMI stream. An ADV7482 on the Renesas Salvator-X ES1.1 was used during development of this code. Alex Riesen (8

[PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-01-13 Thread Alex Riesen
Not sure if all variants of the Salvator board have the HDMI decoder chip (the ADV7482) connected to the SSI4 on R-Car SoC, as it is on Salvator-X ES1, so the the ADV7482 endpoint and connection definitions are placed in the board file. I do assume though that all Salvator variants have the CLK_C

[PATCH 0/8] media: i2c: adv748x: add support for HDMI audio

2020-01-13 Thread Alex Riesen
This adds minimal support for controlling the audio output I2S port available on ADV7481 and ADV7482 HDMI decoder devices by ADI. The port carries audio signal from the decoded HDMI stream. An ADV7482 on the Renesas Salvator-X ES1.1 was used during development of this code. Alex Riesen (8

[PATCH 3/8] media: adv748x: add log_status ioctl

2020-01-13 Thread Alex Riesen
The logged information provides insights about cable connection and the state of the HDMI decoder. It is very useful when debugging hardware problems in environments without easy access to the connectors. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-hdmi.c | 173

[PATCH 1/8] media: adv748x: add a device-specific wrapper for register block read

2020-01-13 Thread Alex Riesen
Some of the devices I2C-accessible registers (for instance, cs_data for stereo channel information or tmds_params for TMDS channel information) located in adjacent cells. According to manufacturers information, these registers can be read using block transactions. Signed-off-by: Alexander Riesen

[PATCH 2/8] media: adv748x: add audio mute control and output selection ioctls

2020-01-13 Thread Alex Riesen
This change implements audio-related V4L2 ioctls for the HDMI subdevice. The master audio clock is configured for 256fs, as supported by the only device available at the moment. For the same reason, the TDM slot is formatted using left justification of its bits. Signed-off-by: Alexander Riesen -

[PATCH 6/8] media: adv748x: reduce amount of code for bitwise modification of device registers

2020-01-13 Thread Alex Riesen
The regmap provides corresponding routine (regmap_update_bits) already wrapped for this device earlier. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers

[PATCH 4/8] media: adv748x: reserve space for the audio (I2S) port in the driver structures

2020-01-13 Thread Alex Riesen
This allows use of the port in the device tree files. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index fdda6982e437..5db06

[PATCH 5/8] media: adv748x: add an ASoC DAI definition to the driver

2020-01-13 Thread Alex Riesen
The definition is used to publish hardware constraints and can be used to implement in-demand device configuration. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-core.c | 33 1 file changed, 33 insertions(+) diff --git a/drivers/media/i2c/adv748x

[PATCH 7/8] dt-bindings: adv748x: add information about serial audio interface (I2S/TDM)

2020-01-13 Thread Alex Riesen
As the driver has some support for the audio interface of the device, the bindings file should mention it. Signed-off-by: Alexander Riesen --- .../devicetree/bindings/media/i2c/adv748x.txt | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devic