Re: [PATCH 0/2] make imx hdmi publicly used by dw hdmi compatible platform
Hi Russell I'm working on Designware hdmi-audio, also add it as a standard ALSA device. Before I saw this email, I also planed to submit my patchs to upsteam. I'm very grateful if you can email those patchs to us. Best Regards. 于 2014年11月04日 22:29, Russell King - ARM Linux 写道: On Tue, Nov 04, 2014 at 09:33:10PM +0800, Andy Yan wrote: From: Andy yan andy@rock-chips.com We found freescale imx6 and rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly difference, such as phy pll configuration, register width(imx hdmi register is one byte, but rk3288 is 4 bytes width and can only access by word), 4K support(imx6 doesn't support 4k, but rk3288 does). To reuse the imx-hdmi driver, we do this patch set: patch (1): split out imx-soc code from imx-hdmi to dw_hdmi-imx.c patch (2): move imx-hdmi to bridge/, and rename to dw-hdmi to make this driver indepent of drm-imx . And we will add rockchip platform specific code dw_hdmi-rockchip.c later, this is depend on drm-rockchip. Great - I fully agree that this needs to be renamed as it is a Designware IP. Should it be moved into bridge/ ? It isn't implemented as a DRM bridge driver at present, so this seems illogical. Is the longer term plan to convert it to be a DRM bridge? Secondly, if you want HDMI audio support, you may find the patches I maintain for the SolidRun devices useful, which add this as a standard ALSA device. I also have CEC support for it as well. If you're interested, I'll email those. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] make imx hdmi publicly used by dw hdmi compatible platform
On Thu, Nov 06, 2014 at 05:35:40PM +0800, Kuankuan.Yang wrote: I'm working on Designware hdmi-audio, also add it as a standard ALSA device. Before I saw this email, I also planed to submit my patchs to upsteam. I'm very grateful if you can email those patchs to us. I've attached the set of patches - they're part of a much bigger patch set for supporting the Cubox-i in mainline, but should apply cleanly. They're against a 3.17 base rather than 3.18-rc, but I do have these rebased as 3.18-rc2 based patches too. I've been waiting for imx-drm to move out of drivers/staging before deciding where they should live - there seems to be no good place in the sound/ subtree to place these (sound/soc is not the right place.) They're being used not only with the SolidRun Cubox-i and Hummingboard, but also the Novena project too. One thing the audio part does not yet support is using SDMA on iMX6 to feed updates to the audio DMA, so this driver should work with other non-iMX6 SDMA. Patches 21 to 23 are various attempts to try and fix a problem I've noticed only on certain iMX6 SoCs (two different revisions of the DW IP are used in iMX6 depending on whether it's the solo/dual-lite parts, or the dual/quad parts.) Inspite of the published errata, I found that the given workarounds had no useful effect on the problem, and like most bought-in IP, it's extremely difficult to resolve these kinds of issues from an open source perspective without having commercial links with manufacturers to gain access to internal documentation and/or support. The CEC bits provide a mostly compatible interface with the current FSL iMX BSP trees, but with a different structure to it, and hopefully less buggily than the FSL driver. There has been an effort to add support for the FSL interface to libcec, but when I've looked at the library, I've never been impressed by the code, nor by the authors handling of anything but a clean transmission (which IMHO makes the whole thing unsafe, especially if you have multiple devices on the CEC bus, you need the logical ID arbitration to work properly.) -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. From: Russell King rmk+ker...@arm.linux.org.uk Subject: [PATCH 018/107] dw-hdmi-audio: add audio driver MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Add ALSA based HDMI audio driver for imx-hdmi. The imx-hdmi is a Synopsis DesignWare module, so let's name it after that. The only buffer format supported is its own special IEC958 based format, which is not compatible with any ALSA format. To avoid doing too much data manipulation within the driver, we support only ALSAs IEC958 LE, and 24-bit PCM formats for 2 to 6 channels. This allows us to modify the buffer in place as each period is passed for DMA without needing a separate buffer. A more desirable solution would be to have this conversion in userspace, but ALSA does not appear to allow such transformations outside of libasound itself. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/staging/imx-drm/Kconfig | 8 + drivers/staging/imx-drm/Makefile| 1 + drivers/staging/imx-drm/dw-hdmi-audio.c | 547 drivers/staging/imx-drm/dw-hdmi-audio.h | 14 + drivers/staging/imx-drm/imx-hdmi.c | 29 ++ 5 files changed, 599 insertions(+) create mode 100644 drivers/staging/imx-drm/dw-hdmi-audio.c create mode 100644 drivers/staging/imx-drm/dw-hdmi-audio.h diff --git a/drivers/staging/imx-drm/Kconfig b/drivers/staging/imx-drm/Kconfig index 82fb758a29bc..008b544b9911 100644 --- a/drivers/staging/imx-drm/Kconfig +++ b/drivers/staging/imx-drm/Kconfig @@ -51,3 +51,11 @@ config DRM_IMX_HDMI depends on DRM_IMX help Choose this if you want to use HDMI on i.MX6. + +config DRM_DW_HDMI_AUDIO + tristate Synopsis Designware Audio interface + depends on DRM_IMX_HDMI != n + help + Support the Audio interface which is part of the Synopsis + Designware HDMI block. This is used in conjunction with + the i.MX HDMI driver. diff --git a/drivers/staging/imx-drm/Makefile b/drivers/staging/imx-drm/Makefile index 582c438d8cbd..07e65a410f8f 100644 --- a/drivers/staging/imx-drm/Makefile +++ b/drivers/staging/imx-drm/Makefile @@ -10,3 +10,4 @@ obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o obj-$(CONFIG_DRM_IMX_IPUV3)+= imx-ipuv3-crtc.o obj-$(CONFIG_DRM_IMX_HDMI) += imx-hdmi.o +obj-$(CONFIG_DRM_DW_HDMI_AUDIO) += dw-hdmi-audio.o diff --git a/drivers/staging/imx-drm/dw-hdmi-audio.c b/drivers/staging/imx-drm/dw-hdmi-audio.c new file mode 100644 index ..4f9790dea6db --- /dev/null +++ b/drivers/staging/imx-drm/dw-hdmi-audio.c @@ -0,0 +1,547 @@ +/* + * DesignWare HDMI audio driver + * + * This program is free software; you can redistribute it and/or modify +
[PATCH 0/2] make imx hdmi publicly used by dw hdmi compatible platform
From: Andy yan andy@rock-chips.com We found freescale imx6 and rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly difference, such as phy pll configuration, register width(imx hdmi register is one byte, but rk3288 is 4 bytes width and can only access by word), 4K support(imx6 doesn't support 4k, but rk3288 does). To reuse the imx-hdmi driver, we do this patch set: patch (1): split out imx-soc code from imx-hdmi to dw_hdmi-imx.c patch (2): move imx-hdmi to bridge/, and rename to dw-hdmi to make this driver indepent of drm-imx . And we will add rockchip platform specific code dw_hdmi-rockchip.c later, this is depend on drm-rockchip. Andy Yan (1): imx-drm: imx-hdmi: split imx soc specific code from imx-hdmi Andy yan (1): move imx-hdmi to bridge/dw-hdmi drivers/gpu/drm/bridge/Kconfig|5 + drivers/gpu/drm/bridge/Makefile |1 + drivers/gpu/drm/bridge/dw_hdmi.c | 1651 ++ drivers/gpu/drm/bridge/dw_hdmi.h | 1032 +++ drivers/staging/imx-drm/Kconfig |1 + drivers/staging/imx-drm/Makefile |2 +- drivers/staging/imx-drm/dw_hdmi-imx.c | 214 drivers/staging/imx-drm/imx-hdmi.c| 1767 - drivers/staging/imx-drm/imx-hdmi.h| 1032 --- include/drm/bridge/dw_hdmi.h | 114 +++ 10 files changed, 3019 insertions(+), 2800 deletions(-) create mode 100644 drivers/gpu/drm/bridge/dw_hdmi.c create mode 100644 drivers/gpu/drm/bridge/dw_hdmi.h create mode 100644 drivers/staging/imx-drm/dw_hdmi-imx.c delete mode 100644 drivers/staging/imx-drm/imx-hdmi.c delete mode 100644 drivers/staging/imx-drm/imx-hdmi.h create mode 100644 include/drm/bridge/dw_hdmi.h -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] make imx hdmi publicly used by dw hdmi compatible platform
On Tue, Nov 04, 2014 at 09:33:10PM +0800, Andy Yan wrote: From: Andy yan andy@rock-chips.com We found freescale imx6 and rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly difference, such as phy pll configuration, register width(imx hdmi register is one byte, but rk3288 is 4 bytes width and can only access by word), 4K support(imx6 doesn't support 4k, but rk3288 does). To reuse the imx-hdmi driver, we do this patch set: patch (1): split out imx-soc code from imx-hdmi to dw_hdmi-imx.c patch (2): move imx-hdmi to bridge/, and rename to dw-hdmi to make this driver indepent of drm-imx . And we will add rockchip platform specific code dw_hdmi-rockchip.c later, this is depend on drm-rockchip. Great - I fully agree that this needs to be renamed as it is a Designware IP. Should it be moved into bridge/ ? It isn't implemented as a DRM bridge driver at present, so this seems illogical. Is the longer term plan to convert it to be a DRM bridge? Secondly, if you want HDMI audio support, you may find the patches I maintain for the SolidRun devices useful, which add this as a standard ALSA device. I also have CEC support for it as well. If you're interested, I'll email those. -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/2] make imx hdmi publicly used by dw hdmi compatible platform
On 2014年11月04日 22:29, Russell King - ARM Linux wrote: On Tue, Nov 04, 2014 at 09:33:10PM +0800, Andy Yan wrote: From: Andy yan andy@rock-chips.com We found freescale imx6 and rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly difference, such as phy pll configuration, register width(imx hdmi register is one byte, but rk3288 is 4 bytes width and can only access by word), 4K support(imx6 doesn't support 4k, but rk3288 does). To reuse the imx-hdmi driver, we do this patch set: patch (1): split out imx-soc code from imx-hdmi to dw_hdmi-imx.c patch (2): move imx-hdmi to bridge/, and rename to dw-hdmi to make this driver indepent of drm-imx . And we will add rockchip platform specific code dw_hdmi-rockchip.c later, this is depend on drm-rockchip. Great - I fully agree that this needs to be renamed as it is a Designware IP. Should it be moved into bridge/ ? It isn't implemented as a DRM bridge driver at present, so this seems illogical. Is the longer term plan to convert it to be a DRM bridge? We have plan to convert it to DRM bridge. Secondly, if you want HDMI audio support, you may find the patches I maintain for the SolidRun devices useful, which add this as a standard ALSA device. I also have CEC support for it as well. If you're interested, I'll email those. It's very great if you email those, we are also working on audio and CEC. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel