Add I2S/ADV7511 audio support for ARC AXS10x boards
Subsystems (7)
cover Add I2S/ADV7511 audio support for ARC AXS10x boards
ARC AXS10x platforms consist of a mainboard with several peripherals. One of those peripherals is an HDMI output port controlled by ADV7511 transmitter.
This patch set adds audio for the ADV7511 transmitter and I2S audio for the AXS10x platform.
Jose Abreu (4):
drm/i2c/adv7511: Add audio support
ARC: axs10x: Update defconfigs so that audio is enabled
ASoC: dwc: Add I2S HDMI audio support using custom platform driver
ARC: axs10x: Update defconfigs so that I2S is enabled
arch/arc/boot/dts/axs10x_mb.dtsi | 20 +- arch/arc/configs/axs101_defconfig | 4 + arch/arc/configs/axs103_defconfig | 6 + arch/arc/configs/axs103_smp_defconfig | 6 + drivers/gpu/drm/i2c/Kconfig | 8 + drivers/gpu/drm/i2c/Makefile | 2 + drivers/gpu/drm/i2c/adv7511.c | 1024 --------------------------------- drivers/gpu/drm/i2c/adv7511.h | 41 ++ drivers/gpu/drm/i2c/adv7511_audio.c | 310 ++++++++++ drivers/gpu/drm/i2c/adv7511_core.c | 1005 ++++++++++++++++++++++++++++++++ include/sound/soc-dai.h | 1 + sound/soc/dwc/Kconfig | 1 + sound/soc/dwc/designware_i2s.c | 384 ++++++++++++- 13 files changed, 1771 insertions(+), 1041 deletions(-) delete mode 100644 drivers/gpu/drm/i2c/adv7511.c create mode 100644 drivers/gpu/drm/i2c/adv7511_audio.c create mode 100644 drivers/gpu/drm/i2c/adv7511_core.c
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): cover.1458839710.git.joabreu-HKixBCOQz3hWk0Htik3J/[email protected]
PATCH 1/4 drm/i2c/adv7511: Add audio support
This patch adds audio support for the ADV7511 HDMI transmitter using ALSA SOC.
The code was ported from Analog Devices linux tree from commit 1770c4a1e32b ("Merge remote-tracking branch 'xilinx/master' into xcomm_zynq"), which is available at:
- https://github.com/analogdevicesinc/linux/
The main core file was renamed from adv7511.c to adv7511_core.c so that audio and video compile into a single adv7511.ko module and to keep up with Analog Devices kernel tree.
The audio can be disabled using menu-config so it is possible to use only video mode.
The HDMI mode is automatically started at boot and the audio (when enabled) registers as a codec into ALSA.
SPDIF DAI format was also added to ASoC as it is required by adv7511 audio.
--- drivers/gpu/drm/i2c/Kconfig | 8 + drivers/gpu/drm/i2c/Makefile | 2 + drivers/gpu/drm/i2c/adv7511.c | 1024 ----------------------------------- drivers/gpu/drm/i2c/adv7511.h | 41 ++ drivers/gpu/drm/i2c/adv7511_audio.c | 310 +++++++++++ drivers/gpu/drm/i2c/adv7511_core.c | 1005 ++++++++++++++++++++++++++++++++++ include/sound/soc-dai.h | 1 + 7 files changed, 1367 insertions(+), 1024 deletions(-) delete mode 100644 drivers/gpu/drm/i2c/adv7511.c create mode 100644 drivers/gpu/drm/i2c/adv7511_audio.c create mode 100644 drivers/gpu/drm/i2c/adv7511_core.c
drivers/gpu/drm/i2c/Kconfig +8 -0
@@ -7,6 +7,14 @@ config DRM_I2C_ADV7511 help Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. +config DRM_I2C_ADV7511_AUDIO + bool "ADV7511 audio" + depends on DRM_I2C_ADV7511 && SND_SOC + default y + help + This adds support for audio on the ADV7511(W) and ADV7513 HDMI + encoders. + config DRM_I2C_CH7006 tristate "Chrontel ch7006 TV encoder" default m if DRM_NOUVEAU
drivers/gpu/drm/i2c/Makefile +2 -0
@@ -1,6 +1,8 @@ ccflags-y := -Iinclude/drm obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511.o +adv7511-y := adv7511_core.o +adv7511-$(CONFIG_DRM_I2C_ADV7511_AUDIO) += adv7511_audio.o ch7006-y := ch7006_drv.o ch7006_mode.o obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o
drivers/gpu/drm/i2c/adv7511.c deleted +0 -1024
1,024 lines not on this page · raw message
drivers/gpu/drm/i2c/adv7511.h +41 -0
51 lines not on this page · raw message
drivers/gpu/drm/i2c/adv7511_audio.c new file +310 -0
310 lines not on this page · raw message
drivers/gpu/drm/i2c/adv7511_core.c new file +1005 -0
1,005 lines not on this page · raw message
include/sound/soc-dai.h +1 -0
@@ -33,6 +33,7 @@ struct snd_compr_stream;#define SND_SOC_DAIFMT_DSP_B 5/* L data MSB during FRM LRC */ #define SND_SOC_DAIFMT_AC97 6/* AC97 */ #define SND_SOC_DAIFMT_PDM 7/* Pulse density modulation */ +#define SND_SOC_DAIFMT_SPDIF 8/* SPDIF */ /* left and right justified also known as MSB and LSB respectively */ #define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/4 ARC: axs10x: Update defconfigs so that audio is enabled
In reply to a message not in the archiveThe defconfigs for the AXS boards were updated so that ALSA SoC is enabled and also the audio for the ADV7511 HDMI transmitter.
--- arch/arc/configs/axs101_defconfig | 3 +++ arch/arc/configs/axs103_defconfig | 5 +++++ arch/arc/configs/axs103_smp_defconfig | 5 +++++ 3 files changed, 13 insertions(+)
arch/arc/configs/axs101_defconfig +3 -0
@@ -113,3 +113,6 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y
arch/arc/configs/axs103_defconfig +5 -0
@@ -76,12 +76,14 @@ CONFIG_SERIAL_OF_PLATFORM=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_DRM=y # CONFIG_HWMON is not set CONFIG_FB=y # CONFIG_VGA_CONSOLE is not set CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_LOGO=y +CONFIG_DRM_I2C_ADV7511=y # CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_VGA16 is not set # CONFIG_LOGO_LINUX_CLUT224 is not set
@@ -114,3 +116,6 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y
arch/arc/configs/axs103_smp_defconfig +5 -0
@@ -77,12 +77,14 @@ CONFIG_SERIAL_OF_PLATFORM=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_DRM=y # CONFIG_HWMON is not set CONFIG_FB=y # CONFIG_VGA_CONSOLE is not set CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_LOGO=y +CONFIG_DRM_I2C_ADV7511=y # CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_VGA16 is not set # CONFIG_LOGO_LINUX_CLUT224 is not set
@@ -115,3 +117,6 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 88015401488eed4f253f49d5831be13e0007339f.1458839710.git.joabreu-HKixBCOQz3hWk0Htik3J/[email protected]
Re: [PATCH 2/4] ARC: axs10x: Update defconfigs so that audio is enabled
Hi Jose,
Quoted 10 lines · Jose Abreu
The defconfigs for the AXS boards were updated so that ALSA SoC is enabled and also the audio for the ADV7511 HDMI transmitter.
Signed-off-by Jose Abreu <[email protected]>---
arch/arc/configs/axs101_defconfig | 3 +-+-+- arch/arc/configs/axs103_defconfig | 5 +-+-+-+-+-arch/arc/configs/axs103_smp_defconfig| 5 +-+-+-+-+-3 files changed, 13 insertions(+-)
As Vineet suggested here http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000595.html
let's not pollute axs10x_defconfigs with new stuff but instead add all new
options to new configs that will cover everything available on ARC SDP boards.
Since those defconfigs for full SDP doesn't exist as of today please drop that change as well as "[PATCH 4/4] ARC: axs10x: Update defconfigs so that I2S is enabled" from that series.
I'll try to come up with mentioed new configs ASAP and then if your series is already in upstream I'll add bits for audio through HDMI otherwise you'll add it in some follow-up series.
-Alexey--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/4 ASoC: dwc: Add I2S HDMI audio support using custom platform driver
In reply to a message not in the archiveHDMI audio support was added to the AXS board using an I2S cpu driver and a custom platform driver.
The platform driver supports two channels @ 16 bits with rates 32k, 44.1k and 48k. ALSA Simple audio card is used to glue the cpu, platform and codec driver (adv7511).
--- arch/arc/boot/dts/axs10x_mb.dtsi | 20 +- sound/soc/dwc/Kconfig | 1 + sound/soc/dwc/designware_i2s.c | 384 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 388 insertions(+), 17 deletions(-)
arch/arc/boot/dts/axs10x_mb.dtsi +16 -4
@@ -130,12 +130,23 @@ interrupts = <14>; }; - i2c@0x1e000 { - compatible = "snps,designware-i2c"; + i2s: i2s@0x1e000 { + compatible = "snps,designware-i2s"; reg = <0x1e000 0x100>; - clock-frequency = <400000>; - clocks = <&i2cclk>; interrupts = <15>; + #sound-dai-cells = <0>; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "AXS10X HDMI Audio"; + simple-audio-card,format = "i2s"; + simple-audio-card,cpu { + sound-dai = <&i2s>; + }; + simple-audio-card,codec { + sound-dai = <&adv7511>; + }; }; i2c@0x1f000 {
@@ -155,6 +166,7 @@ adi,input-colorspace = "rgb"; adi,input-clock = "1x"; adi,clock-delay = <0x03>; + #sound-dai-cells = <0>; ports { #address-cells = <1>;
sound/soc/dwc/Kconfig +1 -0
@@ -2,6 +2,7 @@ config SND_DESIGNWARE_I2S tristate "Synopsys I2S Device Driver" depends on CLKDEV_LOOKUP select SND_SOC_GENERIC_DMAENGINE_PCM + select SND_SIMPLE_CARD help Say Y or M if you want to add support for I2S driver for Synopsys desigwnware I2S device. The device supports upto
sound/soc/dwc/designware_i2s.c +371 -13
516 lines not on this page · raw message
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 7aaad0b57652fc724be7b447790c194645321173.1458839710.git.joabreu-HKixBCOQz3hWk0Htik3J/[email protected]
Re: [PATCH 3/4] ASoC: dwc: Add I2S HDMI audio support using custom platform driver
Hi Jose,
Quoted 10 lines · Jose Abreu
HDMI audio support was added to the AXS board using an I2S cpu driver and a custom platform driver.
The platform driver supports two channels @ 16 bits with rates 32k, 44.1k and 48k. ALSA Simple audio card is used to glue the cpu, platform and codec driver (adv7511).
Signed-off-by Jose Abreu <[email protected]>---
arch/arc/boot/dts/axs10x_mb.dtsi | 20 +--
You should not mix DT bindings for a particular board with generic driver fixes or improvements.
I think it makes sense to split this patch in 2:
1) Driver improvements
2) .dts update for boards that use this driver
Quoted 3 lines
sound/soc/dwc/Kconfig | 1 +-
sound/soc/dwc/designware_i2s.c | 384 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---3 files changed, 388 insertions(+-), 17 deletions(-)
-Alexey--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/4 ARC: axs10x: Update defconfigs so that I2S is enabled
In reply to a message not in the archiveThe defconfigs for the AXS boards were updated to
enable Designware I2S driver.
--- arch/arc/configs/axs101_defconfig | 1 + arch/arc/configs/axs103_defconfig | 1 + arch/arc/configs/axs103_smp_defconfig | 1 + 3 files changed, 3 insertions(+)
arch/arc/configs/axs101_defconfig +1 -0
@@ -116,3 +116,4 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y +CONFIG_SND_DESIGNWARE_I2S=y
arch/arc/configs/axs103_defconfig +1 -0
@@ -119,3 +119,4 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y +CONFIG_SND_DESIGNWARE_I2S=y
arch/arc/configs/axs103_smp_defconfig +1 -0
@@ -120,3 +120,4 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y +CONFIG_SND_DESIGNWARE_I2S=y
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html