Re: [linux-sunxi] [PATCH v5 0/7] ARM: ASoC: drm: sun8i: Add DE2 HDMI audio and video
Hi Ondřej, I don't use the sunxi-ng driver which is too complicated and asks for a complete rewrite for the A83T (you may find my own driver in my site - bug fixes to come). Especially, in my ccu clk driver, the resets and bus gates functions are included in the main clocks and I forgot to add the gates in the sun8i-h3.dtsi. About audio, there are some problems: - I discovered a bug with set_rate_parent in the clock driver: it does not work when the parent clock has a rate close enough to the wanted rate, It did work for me with the H3 but not with the A83T. I fixed it in my ccu clk, but this bug also exists in sunxi-ng. - the burst width is 4 for the H3 and this value is refused by the DMA driver. I will submit a new patch soon. Otherwise, I am using the legacy u-boot which sets most clocks. With the official u-boot, setting some clocks by the kernel may be wrong, as you point to by adding more set_rate_parent. I will fix this in my ccu driver, thanks. On Sunday, October 23, 2016 at 11:57:03 AM UTC+2, Ondřej Jirman wrote: > > Dne 22.10.2016 v 15:28 Jean-Francois Moine napsal(a): > > This patchset series adds HDMI audio and video support to the Allwinner > > sun8i SoCs which include the display engine 2 (DE2). > > Hi, > > I've tested your patches on top of my 4.9-rc1 changes on Orange Pi PC, > and HDMI display output works well -- with some changes to sunxi-ng H3 > clock driver. I've put those changes here: > > https://github.com/megous/linux/commits/orange-pi-4.9-hdmi > > When I run firefox, it feels faster and less laggy than armbian 3.4 > desktop. Very nice! > > The only issue that I've found, is that clk setup for ASoC driver fails > with EINVAL. > > When I run pulseaudio, dmesg is filled with this: > > [ 29.951468] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw > params: -22 > [ 29.969184] Setting sysclk rate failed -22 > [ 29.982440] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw > params: -22 > [ 30.000148] Setting sysclk rate failed -22 > [ 30.013398] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw > params: -22 > [ 30.032790] Setting sysclk rate failed -22 > [ 30.044411] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw > params: -22 > [ 30.062252] Setting sysclk rate failed -22 > > What do you base your patches on? Do you have some patches for the > sunxi-ng H3 clock driver that are required for this to work? > > thank you and regards, > o. > > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] [PATCH v5 0/7] ARM: ASoC: drm: sun8i: Add DE2 HDMI audio and video
Dne 22.10.2016 v 15:28 Jean-Francois Moine napsal(a): > This patchset series adds HDMI audio and video support to the Allwinner > sun8i SoCs which include the display engine 2 (DE2). Hi, I've tested your patches on top of my 4.9-rc1 changes on Orange Pi PC, and HDMI display output works well -- with some changes to sunxi-ng H3 clock driver. I've put those changes here: https://github.com/megous/linux/commits/orange-pi-4.9-hdmi When I run firefox, it feels faster and less laggy than armbian 3.4 desktop. Very nice! The only issue that I've found, is that clk setup for ASoC driver fails with EINVAL. When I run pulseaudio, dmesg is filled with this: [ 29.951468] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw params: -22 [ 29.969184] Setting sysclk rate failed -22 [ 29.982440] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw params: -22 [ 30.000148] Setting sysclk rate failed -22 [ 30.013398] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw params: -22 [ 30.032790] Setting sysclk rate failed -22 [ 30.044411] sun8i-audio 1c22800.i2s: ASoC: can't set 1c22800.i2s hw params: -22 [ 30.062252] Setting sysclk rate failed -22 What do you base your patches on? Do you have some patches for the sunxi-ng H3 clock driver that are required for this to work? thank you and regards, o. > A first submission in January for video on the H3 could not enter into > the mainline kernel due to the lack of license headers in Allwinner's > sources. > > Recently, an announce about Tina OS for the R series > https://www.youtube.com/watch?v=h7KD-6HblAU > was followed by the upload of a new linux-3.4 source tree > https://github.com/tinalinux/linux-3.4 > with files containing GPL headers. > > Well, I don't know if these sources are really from Allwinner, but > anyway, this is the opportunity to propose a new version of my DRM > HDMI driver. > > v5: > - add overlay plane > - add audio support > - add support for the A83T > - add back the HDMI driver > - many bug fixes > v4: > - drivers/clk/sunxi/Makefile was missing (Emil Velikov) > v3: > - add the hardware cursor > - simplify and fix the DE2 init sequences > - generation for all SUNXI SoCs (Andre Przywara) > v2: > - remove the HDMI driver > - remarks from Chen-Yu Tsai and Russell King > - DT documentation added > > Jean-Francois Moine (7): > drm: sunxi: Add a basic DRM driver for Allwinner DE2 > ASoC: sunxi: Add a simple HDMI CODEC > drm: sunxi: add DE2 HDMI support > ASoC: sunxi: Add sun8i I2S driver > ARM: dts: sun8i-h3: add HDMI audio and video nodes > ARM: dts: sun8i-h3: Add HDMI audio and video to the Banana Pi M2+ > ARM: dts: sun8i-h3: Add HDMI audio and video to the Orange PI 2 > > .../devicetree/bindings/display/sunxi/hdmi.txt | 52 ++ > .../bindings/display/sunxi/sunxi-de2.txt | 83 ++ > .../devicetree/bindings/sound/sun4i-i2s.txt| 38 +- > arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts| 17 + > arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 17 + > arch/arm/boot/dts/sun8i-h3.dtsi| 67 ++ > drivers/gpu/drm/Kconfig| 2 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/sunxi/Kconfig | 29 + > drivers/gpu/drm/sunxi/Makefile | 9 + > drivers/gpu/drm/sunxi/de2_crtc.c | 475 +++ > drivers/gpu/drm/sunxi/de2_crtc.h | 63 ++ > drivers/gpu/drm/sunxi/de2_de.c | 591 + > drivers/gpu/drm/sunxi/de2_drm.h| 47 ++ > drivers/gpu/drm/sunxi/de2_drv.c| 378 + > drivers/gpu/drm/sunxi/de2_hdmi.c | 396 + > drivers/gpu/drm/sunxi/de2_hdmi.h | 40 + > drivers/gpu/drm/sunxi/de2_hdmi_io.c| 927 > + > drivers/gpu/drm/sunxi/de2_hdmi_io.h| 25 + > drivers/gpu/drm/sunxi/de2_plane.c | 119 +++ > include/sound/sunxi_hdmi.h | 23 + > sound/soc/codecs/Kconfig | 9 + > sound/soc/codecs/Makefile | 2 + > sound/soc/codecs/sunxi-hdmi.c | 106 +++ > sound/soc/sunxi/Kconfig| 8 + > sound/soc/sunxi/Makefile | 3 + > sound/soc/sunxi/sun8i-i2s.c| 700 > 27 files changed, 4222 insertions(+), 5 deletions(-) > create mode 100644 Documentation/devicetree/bindings/display/sunxi/hdmi.txt > create mode 100644 > Documentation/devicetree/bindings/display/sunxi/sunxi-de2.txt > create mode 100644 drivers/gpu/drm/sunxi/Kconfig > create mode 100644 drivers/gpu/drm/sunxi/Makefile > create mode 100644 drivers/gpu/drm/sunxi/de2_crtc.c > create mode 100644
Re: [linux-sunxi] [PATCH v5 0/7] ARM: ASoC: drm: sun8i: Add DE2 HDMI audio and video
On Sun, 23 Oct 2016 09:38:04 +0800 Chen-Yu Tsaiwrote: > > Recently, an announce about Tina OS for the R series > > https://www.youtube.com/watch?v=h7KD-6HblAU > > was followed by the upload of a new linux-3.4 source tree > > https://github.com/tinalinux/linux-3.4 > > with files containing GPL headers. > > > > Well, I don't know if these sources are really from Allwinner, but > > anyway, this is the opportunity to propose a new version of my DRM > > HDMI driver. > > Could you clarify about this bit? Did you just clean up Allwinner's > existing drivers? Or just use them as reference? Either way I think > this deserves some mention in all your copyright headers. > > Otherwise what difference does the new release make? - Allwinner's video driver is not DRM. - their driver has no hardware cursor nor video overlay. - I wrote the video DRM driver from the document Allwinner_H3_Datasheet_V1.2.pdf and the structures defined in linux-3.4/drivers/video/sunxi/disp2/disp/de/lowlevel_sun8iw7/de_rtmx.h Reading Allwinner's code helped me to understand how the DE2 is working. - my lowlevel HDMI is just a cleanup of theirs with explanations about the registers. Magic constants remain due to the lack of knowledge about the PHYs. - the mention of Allwinner in the copyright headers is needed to indicate the source of the structures (DE2) and code (HDMI). The main difference is the DRM interface and the use of the EDID, permitting dynamic video resolution change with xrandr. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] [PATCH v5 0/7] ARM: ASoC: drm: sun8i: Add DE2 HDMI audio and video
On Sat, Oct 22, 2016 at 9:28 PM, Jean-Francois Moinewrote: > This patchset series adds HDMI audio and video support to the Allwinner > sun8i SoCs which include the display engine 2 (DE2). > > A first submission in January for video on the H3 could not enter into > the mainline kernel due to the lack of license headers in Allwinner's > sources. > > Recently, an announce about Tina OS for the R series > https://www.youtube.com/watch?v=h7KD-6HblAU > was followed by the upload of a new linux-3.4 source tree > https://github.com/tinalinux/linux-3.4 > with files containing GPL headers. > > Well, I don't know if these sources are really from Allwinner, but > anyway, this is the opportunity to propose a new version of my DRM > HDMI driver. Could you clarify about this bit? Did you just clean up Allwinner's existing drivers? Or just use them as reference? Either way I think this deserves some mention in all your copyright headers. Otherwise what difference does the new release make? Regards ChenYu > > v5: > - add overlay plane > - add audio support > - add support for the A83T > - add back the HDMI driver > - many bug fixes > v4: > - drivers/clk/sunxi/Makefile was missing (Emil Velikov) > v3: > - add the hardware cursor > - simplify and fix the DE2 init sequences > - generation for all SUNXI SoCs (Andre Przywara) > v2: > - remove the HDMI driver > - remarks from Chen-Yu Tsai and Russell King > - DT documentation added > > Jean-Francois Moine (7): > drm: sunxi: Add a basic DRM driver for Allwinner DE2 > ASoC: sunxi: Add a simple HDMI CODEC > drm: sunxi: add DE2 HDMI support > ASoC: sunxi: Add sun8i I2S driver > ARM: dts: sun8i-h3: add HDMI audio and video nodes > ARM: dts: sun8i-h3: Add HDMI audio and video to the Banana Pi M2+ > ARM: dts: sun8i-h3: Add HDMI audio and video to the Orange PI 2 > > .../devicetree/bindings/display/sunxi/hdmi.txt | 52 ++ > .../bindings/display/sunxi/sunxi-de2.txt | 83 ++ > .../devicetree/bindings/sound/sun4i-i2s.txt| 38 +- > arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts| 17 + > arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 17 + > arch/arm/boot/dts/sun8i-h3.dtsi| 67 ++ > drivers/gpu/drm/Kconfig| 2 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/sunxi/Kconfig | 29 + > drivers/gpu/drm/sunxi/Makefile | 9 + > drivers/gpu/drm/sunxi/de2_crtc.c | 475 +++ > drivers/gpu/drm/sunxi/de2_crtc.h | 63 ++ > drivers/gpu/drm/sunxi/de2_de.c | 591 + > drivers/gpu/drm/sunxi/de2_drm.h| 47 ++ > drivers/gpu/drm/sunxi/de2_drv.c| 378 + > drivers/gpu/drm/sunxi/de2_hdmi.c | 396 + > drivers/gpu/drm/sunxi/de2_hdmi.h | 40 + > drivers/gpu/drm/sunxi/de2_hdmi_io.c| 927 > + > drivers/gpu/drm/sunxi/de2_hdmi_io.h| 25 + > drivers/gpu/drm/sunxi/de2_plane.c | 119 +++ > include/sound/sunxi_hdmi.h | 23 + > sound/soc/codecs/Kconfig | 9 + > sound/soc/codecs/Makefile | 2 + > sound/soc/codecs/sunxi-hdmi.c | 106 +++ > sound/soc/sunxi/Kconfig| 8 + > sound/soc/sunxi/Makefile | 3 + > sound/soc/sunxi/sun8i-i2s.c| 700 > 27 files changed, 4222 insertions(+), 5 deletions(-) > create mode 100644 Documentation/devicetree/bindings/display/sunxi/hdmi.txt > create mode 100644 > Documentation/devicetree/bindings/display/sunxi/sunxi-de2.txt > create mode 100644 drivers/gpu/drm/sunxi/Kconfig > create mode 100644 drivers/gpu/drm/sunxi/Makefile > create mode 100644 drivers/gpu/drm/sunxi/de2_crtc.c > create mode 100644 drivers/gpu/drm/sunxi/de2_crtc.h > create mode 100644 drivers/gpu/drm/sunxi/de2_de.c > create mode 100644 drivers/gpu/drm/sunxi/de2_drm.h > create mode 100644 drivers/gpu/drm/sunxi/de2_drv.c > create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi.c > create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi.h > create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi_io.c > create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi_io.h > create mode 100644 drivers/gpu/drm/sunxi/de2_plane.c > create mode 100644 include/sound/sunxi_hdmi.h > create mode 100644 sound/soc/codecs/sunxi-hdmi.c > create mode 100644 sound/soc/sunxi/sun8i-i2s.c > > -- > 2.10.1 > > -- > You received this message because you are subscribed to the Google Groups > "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to
[linux-sunxi] [PATCH v5 0/7] ARM: ASoC: drm: sun8i: Add DE2 HDMI audio and video
This patchset series adds HDMI audio and video support to the Allwinner sun8i SoCs which include the display engine 2 (DE2). A first submission in January for video on the H3 could not enter into the mainline kernel due to the lack of license headers in Allwinner's sources. Recently, an announce about Tina OS for the R series https://www.youtube.com/watch?v=h7KD-6HblAU was followed by the upload of a new linux-3.4 source tree https://github.com/tinalinux/linux-3.4 with files containing GPL headers. Well, I don't know if these sources are really from Allwinner, but anyway, this is the opportunity to propose a new version of my DRM HDMI driver. v5: - add overlay plane - add audio support - add support for the A83T - add back the HDMI driver - many bug fixes v4: - drivers/clk/sunxi/Makefile was missing (Emil Velikov) v3: - add the hardware cursor - simplify and fix the DE2 init sequences - generation for all SUNXI SoCs (Andre Przywara) v2: - remove the HDMI driver - remarks from Chen-Yu Tsai and Russell King - DT documentation added Jean-Francois Moine (7): drm: sunxi: Add a basic DRM driver for Allwinner DE2 ASoC: sunxi: Add a simple HDMI CODEC drm: sunxi: add DE2 HDMI support ASoC: sunxi: Add sun8i I2S driver ARM: dts: sun8i-h3: add HDMI audio and video nodes ARM: dts: sun8i-h3: Add HDMI audio and video to the Banana Pi M2+ ARM: dts: sun8i-h3: Add HDMI audio and video to the Orange PI 2 .../devicetree/bindings/display/sunxi/hdmi.txt | 52 ++ .../bindings/display/sunxi/sunxi-de2.txt | 83 ++ .../devicetree/bindings/sound/sun4i-i2s.txt| 38 +- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts| 17 + arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 17 + arch/arm/boot/dts/sun8i-h3.dtsi| 67 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/sunxi/Kconfig | 29 + drivers/gpu/drm/sunxi/Makefile | 9 + drivers/gpu/drm/sunxi/de2_crtc.c | 475 +++ drivers/gpu/drm/sunxi/de2_crtc.h | 63 ++ drivers/gpu/drm/sunxi/de2_de.c | 591 + drivers/gpu/drm/sunxi/de2_drm.h| 47 ++ drivers/gpu/drm/sunxi/de2_drv.c| 378 + drivers/gpu/drm/sunxi/de2_hdmi.c | 396 + drivers/gpu/drm/sunxi/de2_hdmi.h | 40 + drivers/gpu/drm/sunxi/de2_hdmi_io.c| 927 + drivers/gpu/drm/sunxi/de2_hdmi_io.h| 25 + drivers/gpu/drm/sunxi/de2_plane.c | 119 +++ include/sound/sunxi_hdmi.h | 23 + sound/soc/codecs/Kconfig | 9 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/sunxi-hdmi.c | 106 +++ sound/soc/sunxi/Kconfig| 8 + sound/soc/sunxi/Makefile | 3 + sound/soc/sunxi/sun8i-i2s.c| 700 27 files changed, 4222 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/sunxi/hdmi.txt create mode 100644 Documentation/devicetree/bindings/display/sunxi/sunxi-de2.txt create mode 100644 drivers/gpu/drm/sunxi/Kconfig create mode 100644 drivers/gpu/drm/sunxi/Makefile create mode 100644 drivers/gpu/drm/sunxi/de2_crtc.c create mode 100644 drivers/gpu/drm/sunxi/de2_crtc.h create mode 100644 drivers/gpu/drm/sunxi/de2_de.c create mode 100644 drivers/gpu/drm/sunxi/de2_drm.h create mode 100644 drivers/gpu/drm/sunxi/de2_drv.c create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi.c create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi.h create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi_io.c create mode 100644 drivers/gpu/drm/sunxi/de2_hdmi_io.h create mode 100644 drivers/gpu/drm/sunxi/de2_plane.c create mode 100644 include/sound/sunxi_hdmi.h create mode 100644 sound/soc/codecs/sunxi-hdmi.c create mode 100644 sound/soc/sunxi/sun8i-i2s.c -- 2.10.1 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.