arm64: dts: rockchip: add #sound-dai-cells to HDMI of rk3328
Subsystems (2)
PATCH v3 1/2 arm64: dts: rockchip: add #sound-dai-cells to HDMI of rk3328
This patch adds #sound-dai-cells to use HDMI node as audio codec from device tree of rk3328 boards.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +1 -0
@@ -665,6 +665,7 @@ pinctrl-names = "default"; pinctrl-0 = <&hdmi_cec &hdmii2c_xfer &hdmi_hpd>; rockchip,grf = <&grf>; + #sound-dai-cells = <0>; status = "disabled"; ports {
Signature · 1 line
2.20.1
PATCH v3 2/2 arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |
HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
--- .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +20 -1
@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>; };
@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {
@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint { + dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";
Signature · 1 line
2.20.1
Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
Ping...
Quoted 81 lines · Katsuhiro Suzuki
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
Signed-off-by Katsuhiro Suzuki <[email protected]>--- .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +20
-1@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>; };@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint { + dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";
Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
Quoted 37 lines · Katsuhiro Suzuki
Ping...
Quoted 34 lines · Katsuhiro Suzuki
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
Signed-off-by Katsuhiro Suzuki <[email protected]>--- .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 73
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +2
-1@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>;
I am working on multi-channel hdmi audio support for dw-hdmi at [1] and are wondering if having multiple dais on one graph card instead of a separate hdmi sound card will affect the ability to define a proper alsa config for multi channel hdmi sound.
Regards,
Jonas
Quoted 40 lines
Quoted 25 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +11
-0};@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint {arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 280
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +7
-0+ dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";_______________________________________________
Linux-rockchip mailing list
[email protected]
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.infradead.org%2Fmailman%2Flistinfo%2Flinux-rockchip&data=02%7C01%7C%7Cfcb0d6c43ded4d5e7d4c08d69f1a226d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636871331922090426&sdata=ABb%2Fo%2FMAGvFBH%2B37uQr6rzn%2B%2FXBAXyiGfv2%2BMO0RQoQ%3D&reserved=0
Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
Hello Jonas,
Thanks for your comments.
Quoted 54 lines · Jonas Karlman
Quoted 37 lines · Katsuhiro Suzuki
Ping...
Quoted 34 lines · Katsuhiro Suzuki
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
Signed-off-by Katsuhiro Suzuki <[email protected]>--- .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 73
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +2
-1@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>;I am working on multi-channel hdmi audio support for dw-hdmi at [1] and are wondering if having multiple dais on one graph card instead of a separate hdmi sound card will affect the ability to define a proper alsa config for multi channel hdmi sound.
Quoted 2 lines
It seems a part of multi channel (5.1 ch) has already been supported by rockchip-i2s and dw-hdmi. So I applied this patch and tried below command.
speaker-test -D hw:0,0 -f 48000 -c 6
It does not return errors.
Would you tell me more details you worried about if something wrong?
FYI: Rock64 PCM devices are as follows after applied this patch.
~~~~~
$ cat /proc/asound/pcm 00-00: ff000000.i2s-i2s-hifi i2s-hifi-0 : : playback 1 00-01: ff010000.i2s-rk3328-hifi ff410000.codec-1 : : playback 1 : capture 1 00-02: ff030000.spdif-dit-hifi dit-hifi-2 : : playback 1 ~~~~~
Best Regards,
Katsuhiro Suzuki
Quoted 46 lines
Regards,
JonasQuoted 40 lines
Quoted 25 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +11
-0};@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint {arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 280
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +7
-0+ dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";_______________________________________________
Linux-rockchip mailing list
[email protected]
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.infradead.org%2Fmailman%2Flistinfo%2Flinux-rockchip&data=02%7C01%7C%7Cfcb0d6c43ded4d5e7d4c08d69f1a226d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636871331922090426&sdata=ABb%2Fo%2FMAGvFBH%2B37uQr6rzn%2B%2FXBAXyiGfv2%2BMO0RQoQ%3D&reserved=0
Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
Hello Jonas,
How about this topic?
I think this patch does not have bad effect for multi channel sound of HDMI. If you don't think so, please tell me. I wait your sound patch and after re-check this patch.
Best Regards,
Katsuhiro Suzuki
Quoted 75 lines · Katsuhiro Suzuki
Hello Jonas,
Thanks for your comments.
Quoted 55 lines · Jonas Karlman
Quoted 38 lines · Katsuhiro Suzuki
Ping...
Quoted 35 lines · Katsuhiro Suzuki
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
Signed-off-by Katsuhiro Suzuki <[email protected]>---
.../arm64/boot/dts/rockchip/rk3328-rock64.dts| 21
++++++++++++++++++-1 file changed, 20 insertions(+), 1 deletion(-)Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 73
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +2
-1@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>;I am working on multi-channel hdmi audio support for dw-hdmi at [1] and are wondering if having multiple dais on one graph card instead of a separate hdmi sound card will affect the ability to define a proper alsa config for multi channel hdmi sound.
Quoted 3 lines
It seems a part of multi channel (5.1 ch) has already been supported by rockchip-i2s and dw-hdmi. So I applied this patch and tried below command.
speaker-test -D hw:0,0 -f 48000 -c 6
It does not return errors.Would you tell me more details you worried about if something wrong?
FYI: Rock64 PCM devices are as follows after applied this patch.
~~~~~
Quoted 54 lines
$ cat /proc/asound/pcm 00-00: ff000000.i2s-i2s-hifi i2s-hifi-0 : : playback 1 00-01: ff010000.i2s-rk3328-hifi ff410000.codec-1 : : playback 1 : capture 1 00-02: ff030000.spdif-dit-hifi dit-hifi-2 : : playback 1 ~~~~~Best Regards,
Katsuhiro SuzukiQuoted 42 lines
Regards,
JonasQuoted 36 lines
Quoted 20 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +11
-0};@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint {arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 279
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +7
-0+ dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";_______________________________________________
Linux-rockchip mailing list
[email protected]
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.infradead.org%2Fmailman%2Flistinfo%2Flinux-rockchip&data=02%7C01%7C%7Cfcb0d6c43ded4d5e7d4c08d69f1a226d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636871331922090426&sdata=ABb%2Fo%2FMAGvFBH%2B37uQr6rzn%2B%2FXBAXyiGfv2%2BMO0RQoQ%3D&reserved=0
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
Hello Katsuhiro,
Sorry for the delay, I have not been able to fully test this yet but will do more testing later tonight.
My concern are regarding how to configure a single graph card node to add a hdmi: (and iec958: for spdif) variants using an alsa config file. In LibreELEC I expose HDMI and SPDIF as two different card nodes to simplify applying alsa config files, see [1] and [2] for the alsa config files I use. Do you know how I can configure the hdmi: and iec958: cards and add a "IEC958 Playback" ctl with the combined graph card node?
I am also working on NL-PCM/HBR-audio support for dw-hdmi-i2s and it will require "IEC958 Playback" ctl and players such as kodi and mpv only sets AES0-3 for hdmi: and iec958: cards.
[1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/HDMI.conf
[2] https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/SPDIF.conf
Regards,
Jonas
Quoted 4 lines · Katsuhiro Suzuki
Hello Jonas,
How about this topic?
Quoted 137 lines
I think this patch does not have bad effect for multi channel sound of HDMI. If you don't think so, please tell me. I wait your sound patch and after re-check this patch.
Best Regards,
Katsuhiro SuzukiQuoted 129 lines · Katsuhiro Suzuki
Hello Jonas,
Thanks for your comments.
Quoted 57 lines · Jonas Karlman
Quoted 38 lines · Katsuhiro Suzuki
Ping...
Quoted 35 lines · Katsuhiro Suzuki
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
Signed-off-by Katsuhiro Suzuki <[email protected]>---
.../arm64/boot/dts/rockchip/rk3328-rock64.dts| 21
++++++++++++++++++-1 file changed, 20 insertions(+), 1 deletion(-)Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 73
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +2
-1@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>;I am working on multi-channel hdmi audio support for dw-hdmi at [1] and are wondering if having multiple dais on one graph card instead of a separate hdmi sound card will affect the ability to define a proper alsa config for multi channel hdmi sound.
Quoted 4 lines
It seems a part of multi channel (5.1 ch) has already been supported by rockchip-i2s and dw-hdmi. So I applied this patch and tried below command.
speaker-test -D hw:0,0 -f 48000 -c 6
It does not return errors.Would you tell me more details you worried about if something wrong?
FYI: Rock64 PCM devices are as follows after applied this patch.
~~~~~$ cat /proc/asound/pcm 00-00: ff000000.i2s-i2s-hifi i2s-hifi-0 : : playback 1 00-01: ff010000.i2s-rk3328-hifi ff410000.codec-1 : : playback 1 : capture 1 00-02: ff030000.spdif-dit-hifi dit-hifi-2 : : playback 1 ~~~~~Best Regards,
Katsuhiro SuzukiQuoted 40 lines
Regards,
JonasQuoted 35 lines
Quoted 20 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +11
-0};@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint {arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 279
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +7
-0+ dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64
Hello Jonas,
Thank you for reply.
Quoted 8 lines · Jonas Karlman
Hello Katsuhiro,
Sorry for the delay, I have not been able to fully test this yet but will do more testing later tonight.
My concern are regarding how to configure a single graph card node to add a hdmi: (and iec958: for spdif) variants using an alsa config file. In LibreELEC I expose HDMI and SPDIF as two different card nodes to simplify applying alsa config files, see [1] and [2] for the alsa config files I use. Do you know how I can configure the hdmi: and iec958: cards and add a "IEC958 Playback" ctl with the combined graph card node?
Currently I don't know how to and I don't have test environment for IEC958 sound. Sorry...
Quoted 5 lines
I am also working on NL-PCM/HBR-audio support for dw-hdmi-i2s and it will require "IEC958 Playback" ctl and players such as kodi and mpv only sets AES0-3 for hdmi: and iec958: cards.
[1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/HDMI.conf
[2] https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/SPDIF.conf
Ah, I don't consider about Non-LPCM sound. I understand your concern.
My patch should be keeping until this problem is solved.
I'm going to find test environment and try KODI or mpv. Thank you for great information!
Best Regards,
Katsuhiro Suzuki
Quoted 148 lines
Regards,
JonasQuoted 141 lines · Katsuhiro Suzuki
Hello Jonas,
How about this topic?
I think this patch does not have bad effect for multi channel sound of HDMI. If you don't think so, please tell me. I wait your sound patch and after re-check this patch.
Best Regards,
Katsuhiro SuzukiQuoted 129 lines · Katsuhiro Suzuki
Hello Jonas,
Thanks for your comments.
Quoted 57 lines · Jonas Karlman
Quoted 38 lines · Katsuhiro Suzuki
Ping...
Quoted 35 lines · Katsuhiro Suzuki
This patch adds HDMI sound (I2S0) node for rock64.
After apply this patch, UART2 will fail to allocate DMA resources but UART driver can work fine without DMA.
This error is related to the DMAC of rk3328 (pl330 or compatible). DMAC connected to 16 DMA sources. Each sources have ID number that is called 'Req number' in rk3328 TRM. Currently total 7 sources has been activated as follows:
| Req number | Source | Required | | | | channels | |------------+--------+-----------| | 14, 15 | I2S1 | 2ch | | 6, 7 | UART2 | 2ch | | 10 | SPDIF | 1ch | | 8, 9 | SPI0 | 2ch | |------------+--------+-----------| | | Total | 7ch |HDMI audio needs to activate new source I2S0 (Req number 11 and 12). I2S0 can work concurrently with other sources, but rk3328 DMAC can use max 8 channels at same time. If I2S0 is simply activated by this patch, required DMAC channels will be 9. So last one (UART2) cannot allocate the DMA resources.
Virt-dma mechanism for pl0330 DMAC driver is needed to fix this problem.
Signed-off-by Katsuhiro Suzuki <[email protected]>--- .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 73
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +2
-1@@ -68,7 +68,8 @@ sound { compatible = "audio-graph-card"; label = "rockchip,rk3328"; - dais = <&i2s1_p0 + dais = <&i2s0_p0 + &i2s1_p0 &spdif_p0>;I am working on multi-channel hdmi audio support for dw-hdmi at [1] and are wondering if having multiple dais on one graph card instead of a separate hdmi sound card will affect the ability to define a proper alsa config for multi channel hdmi sound.
Quoted 4 lines
It seems a part of multi channel (5.1 ch) has already been supported by rockchip-i2s and dw-hdmi. So I applied this patch and tried below command.
speaker-test -D hw:0,0 -f 48000 -c 6
It does not return errors.Would you tell me more details you worried about if something wrong?
FYI: Rock64 PCM devices are as follows after applied this patch.
~~~~~$ cat /proc/asound/pcm 00-00: ff000000.i2s-i2s-hifi i2s-hifi-0 : : playback 1 00-01: ff010000.i2s-rk3328-hifi ff410000.codec-1 : : playback 1 : capture 1 00-02: ff030000.spdif-dit-hifi dit-hifi-2 : : playback 1 ~~~~~Best Regards,
Katsuhiro SuzukiQuoted 40 lines
Regards,
JonasQuoted 35 lines
Quoted 20 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +11
-0};@@ -141,6 +142,12 @@ &hdmi { status = "okay"; + + port@0 { + hdmi_p0_0: endpoint { + remote-endpoint = <&i2s0_p0_0>; + }; + }; }; &hdmiphy {@@ -256,6 +263,18 @@ }; }; +&i2s0 { + status = "okay"; + + i2s0_p0: port { + i2s0_p0_0: endpoint {arch/arm64/boot/dts/rockchip/rk3328-rock64.dts line 279
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +7
-0+ dai-format = "i2s"; + mclk-fs = <256>; + remote-endpoint = <&hdmi_p0_0>; + }; + }; +}; + &i2s1 { status = "okay";_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Heiko Stuebner
maintainerAm Sonntag, 17. Februar 2019, 18:34:06 CET schrieb Katsuhiro Suzuki:
Quoted 4 lines
This patch adds #sound-dai-cells to use HDMI node as audio codec from device tree of rk3328 boards.
Signed-off-by Katsuhiro Suzuki <[email protected]>
applied for 5.2 .
I'm holding off of patch2 for a bit until you and Jonas can clarify that all is right as it is :-)
Heiko
Hello Heiko,
Quoted 10 lines · Heiko Stuebner
Am Sonntag, 17. Februar 2019, 18:34:06 CET schrieb Katsuhiro Suzuki:
Quoted 4 lines
This patch adds #sound-dai-cells to use HDMI node as audio codec from device tree of rk3328 boards.
Signed-off-by Katsuhiro Suzuki <[email protected]>applied for 5.2 .
I'm holding off of patch2 for a bit until you and Jonas can clarify that all is right as it is :-)
Thanks and I understand about patch 2.
Best Regards,
Katsuhiro Suzuki
Quoted 6 lines
Heiko