Message ID | da7c2a4f469a81d8cdc5c04ab245529a094dbfd3.1552562385.git.jsarha@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/bridge: sii902x: HDMI-audio support and some fixes | expand |
Hi Jyri, Thank you for the patch. On Thu, Mar 14, 2019 at 01:27:51PM +0200, Jyri Sarha wrote: > The sii902x chip family supports also HDMI audio. Add binding for > describing the necessary i2s and mclk wiring for it. > > Signed-off-by: Jyri Sarha <jsarha@ti.com> > --- > .../bindings/display/bridge/sii902x.txt | 33 +++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt > index c4c1855ca654..1a37bbe7c597 100644 > --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt > +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt > @@ -9,6 +9,33 @@ Optional properties: > about hotplug events. > - reset-gpios: OF device-tree gpio specification for RST_N pin. > > + HDMI audio properties: > + - i2s-data-lanes: Array of up to 4 integers with values of 0-3 > + Each integer indicates which i2s pin is connected to which > + audio fifo. The first integer selects i2s audio pin for the > + first audio fifo#0 (HDMI channels 1&2), second for fifo#1 > + (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s > + pins (SD0 - SD3). Any i2s pin can be connected to any fifo, > + but there can be no gaps. E.g. an i2s pin must be mapped to > + fifo#0 and fifo#1 before mapping a channel to fifo#2. > + I2S HDMI audio is configured only if this property is found. This looks good to me, but shouldn't the property be defined somewhere in Documentation/devicetree/bindings/sound/ ? The sound bindings seem to be a bit messy though, with little common or high-level documentation, so I don't want to ask you to fix all that :-) Maybe just adding a common-i2s.txt file there would be enough ? Apart from this the rest looks good to me, but I'd appreciate if it could be reviewed by audio people. > + - clocks: phandle and clock specifier for each clock listed in > + the clock-names property > + - clock-names: "mclk" > + Describes SII902x MCLK input. MCLK is used to produce > + HDMI audio CTS values. This property is required if > + "i2s-data-lanes"-property is present. This property follows > + Documentation/devicetree/bindings/clock/clock-bindings.txt > + consumer binding. > + > + If HDMI audio is configured the sii902x device becomes an ASoC > + codec component, that can be used in configuring full audio > + devices with ASoC simple-card or audio-graph-card. See their > + binding documents on how to describe how the sii902x device is > + connected to the rest of the audio system: > + Documentation/devicetree/bindings/sound/simple-card.txt > + Documentation/devicetree/bindings/sound/audio-graph-card.txt > + > Optional subnodes: > - video input: this subnode can contain a video input port node > to connect the bridge to a display controller output (See this > @@ -21,6 +48,12 @@ Example: > compatible = "sil,sii9022"; > reg = <0x39>; > reset-gpios = <&pioA 1 0>; > + > + #sound-dai-cells = <0>; > + i2s-data-lanes = < 0 1 2 >; > + clocks = <&mclk>; > + clock-names = "mclk"; > + > ports { > #address-cells = <1>; > #size-cells = <0>;
On 17/03/2019 18:16, Laurent Pinchart wrote: > Hi Jyri, > > Thank you for the patch. > > On Thu, Mar 14, 2019 at 01:27:51PM +0200, Jyri Sarha wrote: >> The sii902x chip family supports also HDMI audio. Add binding for >> describing the necessary i2s and mclk wiring for it. >> >> Signed-off-by: Jyri Sarha <jsarha@ti.com> >> --- >> .../bindings/display/bridge/sii902x.txt | 33 +++++++++++++++++++ >> 1 file changed, 33 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt >> index c4c1855ca654..1a37bbe7c597 100644 >> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt >> +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt >> @@ -9,6 +9,33 @@ Optional properties: >> about hotplug events. >> - reset-gpios: OF device-tree gpio specification for RST_N pin. >> >> + HDMI audio properties: >> + - i2s-data-lanes: Array of up to 4 integers with values of 0-3 >> + Each integer indicates which i2s pin is connected to which >> + audio fifo. The first integer selects i2s audio pin for the >> + first audio fifo#0 (HDMI channels 1&2), second for fifo#1 >> + (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s >> + pins (SD0 - SD3). Any i2s pin can be connected to any fifo, >> + but there can be no gaps. E.g. an i2s pin must be mapped to >> + fifo#0 and fifo#1 before mapping a channel to fifo#2. >> + I2S HDMI audio is configured only if this property is found. > This looks good to me, but shouldn't the property be defined somewhere > in Documentation/devicetree/bindings/sound/ ? The sound bindings seem to > be a bit messy though, with little common or high-level documentation, > so I don't want to ask you to fix all that :-) Maybe just adding a > common-i2s.txt file there would be enough ? > > Apart from this the rest looks good to me, but I'd appreciate if it > could be reviewed by audio people. > When I think about this property, it hardly is a generic enough to for all i2s devices or even codecs. That would probably require gaps in the i2s-data-lane order. I would not want to create common-i2s.txt just for this property. The is some many other properties that should be added there first. Maybe this should be made vendor specific property after all. I think I make a resend with alsa-devel included. Best regards, Jyri
On Thu, Mar 14, 2019 at 01:27:51PM +0200, Jyri Sarha wrote: > The sii902x chip family supports also HDMI audio. Add binding for > describing the necessary i2s and mclk wiring for it. > > Signed-off-by: Jyri Sarha <jsarha@ti.com> > --- > .../bindings/display/bridge/sii902x.txt | 33 +++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt > index c4c1855ca654..1a37bbe7c597 100644 > --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt > +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt > @@ -9,6 +9,33 @@ Optional properties: > about hotplug events. > - reset-gpios: OF device-tree gpio specification for RST_N pin. > > + HDMI audio properties: > + - i2s-data-lanes: Array of up to 4 integers with values of 0-3 > + Each integer indicates which i2s pin is connected to which > + audio fifo. The first integer selects i2s audio pin for the > + first audio fifo#0 (HDMI channels 1&2), second for fifo#1 > + (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s > + pins (SD0 - SD3). Any i2s pin can be connected to any fifo, > + but there can be no gaps. E.g. an i2s pin must be mapped to > + fifo#0 and fifo#1 before mapping a channel to fifo#2. > + I2S HDMI audio is configured only if this property is found. Seems like a default should be allowed and you should enable audio based on #sound-dai-cells which you didn't document. > + - clocks: phandle and clock specifier for each clock listed in > + the clock-names property > + - clock-names: "mclk" > + Describes SII902x MCLK input. MCLK is used to produce > + HDMI audio CTS values. This property is required if > + "i2s-data-lanes"-property is present. This property follows > + Documentation/devicetree/bindings/clock/clock-bindings.txt > + consumer binding. > + > + If HDMI audio is configured the sii902x device becomes an ASoC > + codec component, that can be used in configuring full audio > + devices with ASoC simple-card or audio-graph-card. See their With the graph-card, don't you need to define which port is audio? > + binding documents on how to describe how the sii902x device is > + connected to the rest of the audio system: > + Documentation/devicetree/bindings/sound/simple-card.txt > + Documentation/devicetree/bindings/sound/audio-graph-card.txt > + > Optional subnodes: > - video input: this subnode can contain a video input port node > to connect the bridge to a display controller output (See this > @@ -21,6 +48,12 @@ Example: > compatible = "sil,sii9022"; > reg = <0x39>; > reset-gpios = <&pioA 1 0>; > + > + #sound-dai-cells = <0>; > + i2s-data-lanes = < 0 1 2 >; > + clocks = <&mclk>; > + clock-names = "mclk"; > + > ports { > #address-cells = <1>; > #size-cells = <0>; > -- > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki >
Hi Jyri, On Tue, Mar 19, 2019 at 04:38:45PM +0200, Jyri Sarha wrote: > On 17/03/2019 18:16, Laurent Pinchart wrote: > > On Thu, Mar 14, 2019 at 01:27:51PM +0200, Jyri Sarha wrote: > >> The sii902x chip family supports also HDMI audio. Add binding for > >> describing the necessary i2s and mclk wiring for it. > >> > >> Signed-off-by: Jyri Sarha <jsarha@ti.com> > >> --- > >> .../bindings/display/bridge/sii902x.txt | 33 +++++++++++++++++++ > >> 1 file changed, 33 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt > >> index c4c1855ca654..1a37bbe7c597 100644 > >> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt > >> +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt > >> @@ -9,6 +9,33 @@ Optional properties: > >> about hotplug events. > >> - reset-gpios: OF device-tree gpio specification for RST_N pin. > >> > >> + HDMI audio properties: > >> + - i2s-data-lanes: Array of up to 4 integers with values of 0-3 > >> + Each integer indicates which i2s pin is connected to which > >> + audio fifo. The first integer selects i2s audio pin for the > >> + first audio fifo#0 (HDMI channels 1&2), second for fifo#1 > >> + (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s > >> + pins (SD0 - SD3). Any i2s pin can be connected to any fifo, > >> + but there can be no gaps. E.g. an i2s pin must be mapped to > >> + fifo#0 and fifo#1 before mapping a channel to fifo#2. > >> + I2S HDMI audio is configured only if this property is found. > > > > This looks good to me, but shouldn't the property be defined somewhere > > in Documentation/devicetree/bindings/sound/ ? The sound bindings seem to > > be a bit messy though, with little common or high-level documentation, > > so I don't want to ask you to fix all that :-) Maybe just adding a > > common-i2s.txt file there would be enough ? > > > > Apart from this the rest looks good to me, but I'd appreciate if it > > could be reviewed by audio people. > > > When I think about this property, it hardly is a generic enough to for > all i2s devices or even codecs. That would probably require gaps in the > i2s-data-lane order. We can start by documenting it without gaps allowed, and then allow gaps if needed, leaving the support of gaps defined in device bindings. > I would not want to create common-i2s.txt just for this property. The > is some many other properties that should be added there first. Maybe > this should be made vendor specific property after all. You don't need to populate common-i2s.txt with all I2S properties. Creating the file for i2s-data-lanes would be a nice first step, you can then let other audio developers take over :-) > I think I make a resend with alsa-devel included.
diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt index c4c1855ca654..1a37bbe7c597 100644 --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt @@ -9,6 +9,33 @@ Optional properties: about hotplug events. - reset-gpios: OF device-tree gpio specification for RST_N pin. + HDMI audio properties: + - i2s-data-lanes: Array of up to 4 integers with values of 0-3 + Each integer indicates which i2s pin is connected to which + audio fifo. The first integer selects i2s audio pin for the + first audio fifo#0 (HDMI channels 1&2), second for fifo#1 + (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s + pins (SD0 - SD3). Any i2s pin can be connected to any fifo, + but there can be no gaps. E.g. an i2s pin must be mapped to + fifo#0 and fifo#1 before mapping a channel to fifo#2. + I2S HDMI audio is configured only if this property is found. + - clocks: phandle and clock specifier for each clock listed in + the clock-names property + - clock-names: "mclk" + Describes SII902x MCLK input. MCLK is used to produce + HDMI audio CTS values. This property is required if + "i2s-data-lanes"-property is present. This property follows + Documentation/devicetree/bindings/clock/clock-bindings.txt + consumer binding. + + If HDMI audio is configured the sii902x device becomes an ASoC + codec component, that can be used in configuring full audio + devices with ASoC simple-card or audio-graph-card. See their + binding documents on how to describe how the sii902x device is + connected to the rest of the audio system: + Documentation/devicetree/bindings/sound/simple-card.txt + Documentation/devicetree/bindings/sound/audio-graph-card.txt + Optional subnodes: - video input: this subnode can contain a video input port node to connect the bridge to a display controller output (See this @@ -21,6 +48,12 @@ Example: compatible = "sil,sii9022"; reg = <0x39>; reset-gpios = <&pioA 1 0>; + + #sound-dai-cells = <0>; + i2s-data-lanes = < 0 1 2 >; + clocks = <&mclk>; + clock-names = "mclk"; + ports { #address-cells = <1>; #size-cells = <0>;
The sii902x chip family supports also HDMI audio. Add binding for describing the necessary i2s and mclk wiring for it. Signed-off-by: Jyri Sarha <jsarha@ti.com> --- .../bindings/display/bridge/sii902x.txt | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+)