Rework OMAP4+ HDMI audio support
Subsystems (7)
cover Rework OMAP4+ HDMI audio support
Since RFC version of the patch set:
- Split callbacks removal patch away from "Integrated ASoC DAI component driver implementation" patches for easier reading
This set of patches fixes OMAP4+ HDMI audio. The structure of the implementatin looks a bit different than before. Instead of creating a driver specific API for a separate ASoC component driver to connect to, this implementation integrates an the component driver into the HDMI driver.
The idea is to use an existing ASoC component driver API instead of creating a new custom API for each HDMI IP and to avoid splitting the driver to half for separate video and audio parts connected with the API.
The new implementation also uses simple-audio-card for a machine driver instead of having its own HW specific machine driver.
The patches are based on 3.15-rc2 merged withgit://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next andgit://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-omap5
Everything is pushed here here:git://git.ti.com/~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git omap-hdmi-audio
Best regards,
Jyri
Jyri Sarha (19):
ASoC: omap-pcm: Move omap-pcm under include/sound
OMAPDSS: hdmi-common: Add hdmi_dss_audio_from_hw_params()
OMAPDSS: hdmi4: Remove callbacks for an external ASoC DAI driver
OMAPDSS: hdmi4: Integrated ASoC DAI component driver implementation
OMAPDSS: Kconfig: Add depencies and help section to
OMAP4_DSS_HDMI_AUDIO
OMAPDSS: hdmi.h: Add HDMI_AUDIO_LAYOUT_6CH enum value
OMAPDSS: hdmi5_core: Fix compilation with OMAP5_DSS_HDMI_AUDIO
OMAPDSS: hdmi5: Remove callbacks for an external ASoC DAI driver
OMAPDSS: hdmi5: Integrated ASoC DAI component driver implementation
OMAPDSS: Kconfig: Add depencies and help section to
OMAP5_DSS_HDMI_AUDIO
ASoC: omap: Remove obsolete HDMI audio code and Kconfig options
OMAPDSS: Remove obsolete audio code
ARM: omap4.dtsi: Add audio related parametes to hdmi node
ARM: omap4-panda-common.dtsi: Add HDMI audio nodes
ARM: omap5.dtsi: Add audio related parameters to hdmi node
ARM: omap5-uevm.dts: Add hdmi audio related nodes
ARM: omap2plus_defconfig: Build DSS HDMI support for OMAP4 in kernel
ARM: omap2plus_defconfig: Enable OMAP5 HDMI support
ARM: omap2plus_defconfig: Enable OMAP4+ HDMI audio support
.../devicetree/bindings/video/ti,omap4-dss.txt | 4 + .../devicetree/bindings/video/ti,omap5-dss.txt | 4 + arch/arm/boot/dts/omap4-panda-common.dtsi | 21 +- arch/arm/boot/dts/omap4.dtsi | 2 + arch/arm/boot/dts/omap5-uevm.dts | 19 + arch/arm/boot/dts/omap5.dtsi | 2 + arch/arm/configs/omap2plus_defconfig | 20 +- .../fbdev/omap2/displays-new/connector-hdmi.c | 99 ------ .../fbdev/omap2/displays-new/encoder-tpd12s015.c | 56 --- drivers/video/fbdev/omap2/dss/Kconfig | 19 +- drivers/video/fbdev/omap2/dss/hdmi.h | 8 +- drivers/video/fbdev/omap2/dss/hdmi4.c | 216 ++++++++---- drivers/video/fbdev/omap2/dss/hdmi5.c | 216 ++++++++---- drivers/video/fbdev/omap2/dss/hdmi5_core.c | 2 +- drivers/video/fbdev/omap2/dss/hdmi_common.c | 117 ++++++- include/sound/omap-pcm.h | 30 ++ include/video/omapdss.h | 31 -- sound/soc/davinci/davinci-mcasp.c | 2 +- sound/soc/omap/Kconfig | 13 - sound/soc/omap/Makefile | 4 - sound/soc/omap/omap-dmic.c | 2 +- sound/soc/omap/omap-hdmi-card.c | 87 ----- sound/soc/omap/omap-hdmi.c | 364 -------------------- sound/soc/omap/omap-hdmi.h | 38 -- sound/soc/omap/omap-mcbsp.c | 2 +- sound/soc/omap/omap-mcpdm.c | 2 +- sound/soc/omap/omap-pcm.h | 30 -- 27 files changed, 540 insertions(+), 870 deletions(-) create mode 100644 include/sound/omap-pcm.h delete mode 100644 sound/soc/omap/omap-hdmi-card.c delete mode 100644 sound/soc/omap/omap-hdmi.c delete mode 100644 sound/soc/omap/omap-hdmi.h delete mode 100644 sound/soc/omap/omap-pcm.h
Signature · 1 line
1.7.9.5
PATCH 1/19 ASoC: omap-pcm: Move omap-pcm under include/sound
Make including the omap-pcm.h outside sound/soc/omap more convenient.
--- include/sound/omap-pcm.h | 30 ++++++++++++++++++++++++++++++ sound/soc/davinci/davinci-mcasp.c | 2 +- sound/soc/omap/omap-dmic.c | 2 +- sound/soc/omap/omap-hdmi.c | 2 +- sound/soc/omap/omap-mcbsp.c | 2 +- sound/soc/omap/omap-mcpdm.c | 2 +- sound/soc/omap/omap-pcm.h | 30 ------------------------------ 7 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 include/sound/omap-pcm.h delete mode 100644 sound/soc/omap/omap-pcm.h
include/sound/omap-pcm.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* omap-pcm.h - OMAP PCM driver +* +* Copyright (C) 2014 Texas Instruments, Inc. +* +* Author: Peter Ujfalusi <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +*/ + +#ifndef __OMAP_PCM_H__ +#define __OMAP_PCM_H__ + +#if IS_ENABLED (CONFIG_SND_OMAP_SOC ) +int omap_pcm_platform_register (struct device *dev); +#else +static inline int omap_pcm_platform_register (struct device *dev) +{ +return 0 ; +} +#endif /* CONFIG_SND_OMAP_SOC */ + +#endif /* __OMAP_PCM_H__ */
sound/soc/davinci/davinci-mcasp.c +1 -1
@@ -33,10 +33,10 @@#include <sound/initval.h> #include <sound/soc.h> #include <sound/dmaengine_pcm.h> +#include <sound/omap-pcm.h> #include "davinci-pcm.h" #include "davinci-mcasp.h" -#include "../omap/omap-pcm.h" #define MCASP_MAX_AFIFO_DEPTH 64
sound/soc/omap/omap-dmic.c +1 -1
@@ -40,9 +40,9 @@#include <sound/initval.h> #include <sound/soc.h> #include <sound/dmaengine_pcm.h> +#include <sound/omap-pcm.h> #include "omap-dmic.h" -#include "omap-pcm.h" struct omap_dmic {struct device *dev;
sound/soc/omap/omap-hdmi.c +1 -1
@@ -34,9 +34,9 @@#include <sound/asoundef.h> #include <sound/dmaengine_pcm.h> #include <video/omapdss.h> +#include <sound/omap-pcm.h> #include "omap-hdmi.h" -#include "omap-pcm.h" #define DRV_NAME "omap-hdmi-audio-dai"
sound/soc/omap/omap-mcbsp.c +1 -1
@@ -34,11 +34,11 @@#include <sound/initval.h> #include <sound/soc.h> #include <sound/dmaengine_pcm.h> +#include <sound/omap-pcm.h> #include <linux/platform_data/asoc-ti-mcbsp.h> #include "mcbsp.h" #include "omap-mcbsp.h" -#include "omap-pcm.h" #define OMAP_MCBSP_RATES (SNDRV_PCM_RATE_8000_96000)
sound/soc/omap/omap-mcpdm.c +1 -1
@@ -40,9 +40,9 @@#include <sound/pcm_params.h> #include <sound/soc.h> #include <sound/dmaengine_pcm.h> +#include <sound/omap-pcm.h> #include "omap-mcpdm.h" -#include "omap-pcm.h" struct mcpdm_link_config {u32 link_mask;/* channel mask for the direction */
sound/soc/omap/omap-pcm.h deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* omap-pcm.h - OMAP PCM driver -* -* Copyright (C) 2014 Texas Instruments, Inc. -* -* Author: Peter Ujfalusi <[email protected]> -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* version 2 as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -*/ - -#ifndef __OMAP_PCM_H__ -#define __OMAP_PCM_H__ - -#if IS_ENABLED (CONFIG_SND_OMAP_SOC ) -int omap_pcm_platform_register (struct device *dev); -#else -static inline int omap_pcm_platform_register (struct device *dev) -{ -return 0 ; -} -#endif /* CONFIG_SND_OMAP_SOC */ - -#endif /* __OMAP_PCM_H__ */
Signature · 1 line
1.7.9.5
PATCH 2/19 OMAPDSS: hdmi-common: Add hdmi_dss_audio_from_hw_params()
In reply to Jyri SarhaAdd common function for struct omap_dss_audio initialization from struct snd_pcm_hw_params.
--- drivers/video/fbdev/omap2/dss/hdmi.h | 5 ++ drivers/video/fbdev/omap2/dss/hdmi_common.c | 117 ++++++++++++++++++++++++++- 2 files changed, 121 insertions(+), 1 deletion(-)
drivers/video/fbdev/omap2/dss/hdmi.h +5 -0
@@ -433,6 +433,11 @@ int hdmi_parse_lanes_of(struct platform_device *pdev, struct device_node *ep,#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO ) || defined(CONFIG_OMAP5_DSS_HDMI_AUDIO )int hdmi_compute_acr (u32 pclk,u32 sample_freq,u32 *n,u32 *cts); +struct snd_pcm_hw_params ; +struct snd_soc_dai ; +int hdmi_dss_audio_from_hw_params (struct snd_pcm_hw_params *params, +struct omap_dss_audio *dss_audio, +struct snd_soc_dai *dai);int hdmi_wp_audio_enable (struct hdmi_wp_data *wp,bool enable);int hdmi_wp_audio_core_req_enable (struct hdmi_wp_data *wp,bool enable); void hdmi_wp_audio_config_format(struct hdmi_wp_data *wp,
drivers/video/fbdev/omap2/dss/hdmi_common.c +116 -1
133 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 3/19 OMAPDSS: hdmi4: Remove callbacks for an external ASoC DAI driver
In reply to Jyri SarhaRemoves the OMAP4 HDMI audio callbacks for an external audio driver and the old external DAI driver does not work anymore after this patch.
--- drivers/video/fbdev/omap2/dss/hdmi4.c | 113 --------------------------------- 1 file changed, 113 deletions(-)
drivers/video/fbdev/omap2/dss/hdmi4.c +0 -113
@@ -509,112 +509,6 @@ static int hdmi_read_edid(struct omap_dss_device *dssdev,return r; } -#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO ) -static int hdmi_audio_enable (struct omap_dss_device *dssdev) -{ -int r; - -mutex_lock (&hdmi.lock); - -if (!hdmi_mode_has_audio (hdmi.cfg.cm.mode)) { - r = -EPERM ; - goto err; - } - - r =hdmi_wp_audio_enable (&hdmi.wp, true); -if (r) - goto err; - -mutex_unlock (&hdmi.lock); -return 0 ; - -err: -mutex_unlock (&hdmi.lock); -return r; -} - -static void hdmi_audio_disable (struct omap_dss_device *dssdev) -{ -hdmi_wp_audio_enable (&hdmi.wp, false); -} - -static int hdmi_audio_start (struct omap_dss_device *dssdev) -{ -return hdmi4_audio_start (&hdmi.core, &hdmi.wp); -} - -static void hdmi_audio_stop (struct omap_dss_device *dssdev) -{ -hdmi4_audio_stop (&hdmi.core, &hdmi.wp); -} - -static bool hdmi_audio_supported (struct omap_dss_device *dssdev) -{ -bool r; - -mutex_lock (&hdmi.lock); - - r =hdmi_mode_has_audio (hdmi.cfg.cm.mode); - -mutex_unlock (&hdmi.lock); -return r; -} - -static int hdmi_audio_config (struct omap_dss_device *dssdev, -struct omap_dss_audio *audio) -{ -int r; -u32 pclk = hdmi.cfg.timings.pixelclock; - -mutex_lock (&hdmi.lock); - -if (!hdmi_mode_has_audio (hdmi.cfg.cm.mode)) { - r = -EPERM ; - goto err; - } - - r =hdmi4_audio_config (&hdmi.core, &hdmi.wp, audio, pclk); -if (r) - goto err; - -mutex_unlock (&hdmi.lock); -return 0 ; - -err: -mutex_unlock (&hdmi.lock); -return r; -} -#else -static int hdmi_audio_enable (struct omap_dss_device *dssdev) -{ -return -EPERM ; -} - -static void hdmi_audio_disable (struct omap_dss_device *dssdev) -{ -} - -static int hdmi_audio_start (struct omap_dss_device *dssdev) -{ -return -EPERM ; -} - -static void hdmi_audio_stop (struct omap_dss_device *dssdev) -{ -} - -static bool hdmi_audio_supported (struct omap_dss_device *dssdev) -{ -return false; -} - -static int hdmi_audio_config (struct omap_dss_device *dssdev, -struct omap_dss_audio *audio) -{ -return -EPERM ; -} -#endif -static const struct omapdss_hdmi_ops hdmi_ops = { .connect = hdmi_connect, .disconnect = hdmi_disconnect,
@@ -627,13 +521,6 @@ static const struct omapdss_hdmi_ops hdmi_ops = { .get_timings = hdmi_display_get_timings, .read_edid = hdmi_read_edid, - - .audio_enable = hdmi_audio_enable, - .audio_disable = hdmi_audio_disable, - .audio_start = hdmi_audio_start, - .audio_stop = hdmi_audio_stop, - .audio_supported = hdmi_audio_supported, - .audio_config = hdmi_audio_config, };static void hdmi_init_output (struct platform_device *pdev)
Signature · 1 line
1.7.9.5
PATCH 4/19 OMAPDSS: hdmi4: Integrated ASoC DAI component driver implementation
In reply to Jyri SarhaIntegrate ASoC DAI component driver in to the OMAP4 hdmi driver. The patch also updates the relevant entry in ti,omap4-dss DT binding document.
--- .../devicetree/bindings/video/ti,omap4-dss.txt | 4 + drivers/video/fbdev/omap2/dss/hdmi4.c | 199 ++++++++++++++++++++ 2 files changed, 203 insertions(+)
Documentation/devicetree/bindings/video/ti,omap4-dss.txt +4 -0
@@ -107,6 +107,10 @@ Required properties: - clocks: handles to fclk and pll clock - clock-names: "fck", "sys_clk" +Required properties if hdmi audio support is enabled: +- dmas: DMA controller phandle for HDMI audio output +- dma-names: "audio_tx" + Optional nodes: - Video port for HDMI output
drivers/video/fbdev/omap2/dss/hdmi4.c +199 -0
229 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 5/19 OMAPDSS: Kconfig: Add depencies and help section to OMAP4_DSS_HDMI_AUDIO
In reply to a message not in the archive--- drivers/video/fbdev/omap2/dss/Kconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/video/fbdev/omap2/dss/Kconfig +9 -1
@@ -70,7 +70,15 @@ config OMAP4_DSS_HDMI HDMI support for OMAP4 based SoCs. config OMAP4_DSS_HDMI_AUDIO - bool + bool "HDMI audio support for OMAP4" + depends on OMAP4_DSS_HDMI + depends on SND_OMAP_SOC=y || OMAP2_DSS = SND_OMAP_SOC + default y + help + HDMI audio support for OMAP4 based SoCs. Adds integrated + ASoC Digital Audio Interface component driver into OMAPDSS + module. Select SND_SOC_HDMI_CODEC and SND_SIMPLE_CARD with + devicetree description for full HDMI audio support. config OMAP5_DSS_HDMI bool "HDMI support for OMAP5"
Signature · 6 lines
1.7.9.5 -- 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 6/19 OMAPDSS: hdmi.h: Add HDMI_AUDIO_LAYOUT_6CH enum value
In reply to Jyri SarhaThe OMAP5 HDMI audio implementation needs HDMI_AUDIO_LAYOUT_6CH in hdmi_core_audio_layout enum. I found the correct value from ti-linux 3.8 tree.
--- drivers/video/fbdev/omap2/dss/hdmi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/video/fbdev/omap2/dss/hdmi.h +2 -1
@@ -159,7 +159,8 @@ enum hdmi_audio_blk_strt_end_sig {enum hdmi_core_audio_layout {HDMI_AUDIO_LAYOUT_2CH =0 , -HDMI_AUDIO_LAYOUT_8CH =1 +HDMI_AUDIO_LAYOUT_8CH =1 , +HDMI_AUDIO_LAYOUT_6CH =2 };enum hdmi_core_cts_mode {
Signature · 1 line
1.7.9.5
PATCH 7/19 OMAPDSS: hdmi5_core: Fix compilation with OMAP5_DSS_HDMI_AUDIO
In reply to a message not in the archiveUse correct variable name for base address.
--- drivers/video/fbdev/omap2/dss/hdmi5_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/omap2/dss/hdmi5_core.c +1 -1
@@ -786,7 +786,7 @@ static void hdmi5_core_audio_config(struct hdmi_core_data *core,REG_FLD_MOD (base,HDMI_CORE_AUD_GP_POL ,1 ,0 ,0 );/* unmute audio */ -REG_FLD_MOD (core_sys_base,HDMI_CORE_FC_AUDSCONF ,0 ,7 ,4 ); +REG_FLD_MOD (base,HDMI_CORE_FC_AUDSCONF ,0 ,7 ,4 ); } static void hdmi5_core_audio_infoframe_cfg(struct hdmi_core_data *core,
Signature · 6 lines
1.7.9.5 -- 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 8/19 OMAPDSS: hdmi5: Remove callbacks for an external ASoC DAI driver
In reply to Jyri SarhaRemoves the OMAP5 HDMI audio callbacks for an external audio driver and the old external DAI driver does not work anymore after this patch.
--- drivers/video/fbdev/omap2/dss/hdmi5.c | 113 --------------------------------- 1 file changed, 113 deletions(-)
drivers/video/fbdev/omap2/dss/hdmi5.c +0 -113
@@ -534,112 +534,6 @@ static int hdmi_read_edid(struct omap_dss_device *dssdev,return r; } -#if defined(CONFIG_OMAP5_DSS_HDMI_AUDIO ) -static int hdmi_audio_enable (struct omap_dss_device *dssdev) -{ -int r; - -mutex_lock (&hdmi.lock); - -if (!hdmi_mode_has_audio (hdmi.cfg.cm.mode)) { - r = -EPERM ; - goto err; - } - - r =hdmi_wp_audio_enable (&hdmi.wp, true); -if (r) - goto err; - -mutex_unlock (&hdmi.lock); -return 0 ; - -err: -mutex_unlock (&hdmi.lock); -return r; -} - -static void hdmi_audio_disable (struct omap_dss_device *dssdev) -{ -hdmi_wp_audio_enable (&hdmi.wp, false); -} - -static int hdmi_audio_start (struct omap_dss_device *dssdev) -{ -return hdmi_wp_audio_core_req_enable (&hdmi.wp, true); -} - -static void hdmi_audio_stop (struct omap_dss_device *dssdev) -{ -hdmi_wp_audio_core_req_enable (&hdmi.wp, false); -} - -static bool hdmi_audio_supported (struct omap_dss_device *dssdev) -{ -bool r; - -mutex_lock (&hdmi.lock); - - r =hdmi_mode_has_audio (hdmi.cfg.cm.mode); - -mutex_unlock (&hdmi.lock); -return r; -} - -static int hdmi_audio_config (struct omap_dss_device *dssdev, -struct omap_dss_audio *audio) -{ -int r; -u32 pclk = hdmi.cfg.timings.pixelclock; - -mutex_lock (&hdmi.lock); - -if (!hdmi_mode_has_audio (hdmi.cfg.cm.mode)) { - r = -EPERM ; - goto err; - } - - r =hdmi5_audio_config (&hdmi.core, &hdmi.wp, audio, pclk); -if (r) - goto err; - -mutex_unlock (&hdmi.lock); -return 0 ; - -err: -mutex_unlock (&hdmi.lock); -return r; -} -#else -static int hdmi_audio_enable (struct omap_dss_device *dssdev) -{ -return -EPERM ; -} - -static void hdmi_audio_disable (struct omap_dss_device *dssdev) -{ -} - -static int hdmi_audio_start (struct omap_dss_device *dssdev) -{ -return -EPERM ; -} - -static void hdmi_audio_stop (struct omap_dss_device *dssdev) -{ -} - -static bool hdmi_audio_supported (struct omap_dss_device *dssdev) -{ -return false; -} - -static int hdmi_audio_config (struct omap_dss_device *dssdev, -struct omap_dss_audio *audio) -{ -return -EPERM ; -} -#endif -static const struct omapdss_hdmi_ops hdmi_ops = { .connect = hdmi_connect, .disconnect = hdmi_disconnect,
@@ -652,13 +546,6 @@ static const struct omapdss_hdmi_ops hdmi_ops = { .get_timings = hdmi_display_get_timings, .read_edid = hdmi_read_edid, - - .audio_enable = hdmi_audio_enable, - .audio_disable = hdmi_audio_disable, - .audio_start = hdmi_audio_start, - .audio_stop = hdmi_audio_stop, - .audio_supported = hdmi_audio_supported, - .audio_config = hdmi_audio_config, };static void hdmi_init_output (struct platform_device *pdev)
Signature · 1 line
1.7.9.5
PATCH 9/19 OMAPDSS: hdmi5: Integrated ASoC DAI component driver implementation
In reply to Jyri SarhaIntegrate ASoC DAI component driver in to the OMAP5 hdmi driver. The patch also updates the relevant entry in ti,omap5-dss DT binding document.
--- .../devicetree/bindings/video/ti,omap5-dss.txt | 4 + drivers/video/fbdev/omap2/dss/hdmi5.c | 199 ++++++++++++++++++++ 2 files changed, 203 insertions(+)
Documentation/devicetree/bindings/video/ti,omap5-dss.txt +4 -0
@@ -88,6 +88,10 @@ Required properties: - clocks: handles to fclk and pll clock - clock-names: "fck", "sys_clk" +Required properties if hdmi audio support is enabled: +- dmas: DMA controller phandle for HDMI audio output +- dma-names: "audio_tx" + Optional nodes: - Video port for HDMI output
drivers/video/fbdev/omap2/dss/hdmi5.c +199 -0
229 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 10/19 OMAPDSS: Kconfig: Add depencies and help section to OMAP5_DSS_HDMI_AUDIO
In reply to Jyri Sarha--- drivers/video/fbdev/omap2/dss/Kconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/video/fbdev/omap2/dss/Kconfig +8 -1
@@ -90,8 +90,15 @@ config OMAP5_DSS_HDMI specification. config OMAP5_DSS_HDMI_AUDIO + bool "HDMI audio support for OMAP5" depends on OMAP5_DSS_HDMI - bool + depends on SND_OMAP_SOC=y || OMAP2_DSS = SND_OMAP_SOC + default y + help + HDMI audio support for OMAP5 based SoCs. Adds integrated + ASoC Digital Audio Interface component driver into OMAPDSS + module. Select SND_SOC_HDMI_CODEC and SND_SIMPLE_CARD with + devicetree description for full HDMI audio support. config OMAP2_DSS_SDI bool "SDI support"
Signature · 1 line
1.7.9.5
PATCH 11/19 ASoC: omap: Remove obsolete HDMI audio code and Kconfig options
In reply to Jyri SarhaRemoves omap-hdmi DAI driver, omap-hdmi-card driver, the related Kconfig options, and Makefile entries. The HDMI DAI drivers has been integrated directly to OMAP4+ HDMI drivers and simple-card driver is used instead of omap-hdmi-card driver.
--- sound/soc/omap/Kconfig | 13 -- sound/soc/omap/Makefile | 4 - sound/soc/omap/omap-hdmi-card.c | 87 ---------- sound/soc/omap/omap-hdmi.c | 364 --------------------------------------- sound/soc/omap/omap-hdmi.h | 38 ---- 5 files changed, 506 deletions(-) delete mode 100644 sound/soc/omap/omap-hdmi-card.c delete mode 100644 sound/soc/omap/omap-hdmi.c delete mode 100644 sound/soc/omap/omap-hdmi.h
sound/soc/omap/Kconfig +0 -13
@@ -12,9 +12,6 @@ config SND_OMAP_SOC_MCBSP config SND_OMAP_SOC_MCPDM tristate -config SND_OMAP_SOC_HDMI - tristate - config SND_OMAP_SOC_N810 tristate "SoC Audio support for Nokia N810" depends on SND_OMAP_SOC && MACH_NOKIA_N810 && I2C
@@ -100,16 +97,6 @@ config SND_OMAP_SOC_OMAP_ABE_TWL6040 - PandaBoard (4430) - PandaBoardES (4460) -config SND_OMAP_SOC_OMAP_HDMI - tristate "SoC Audio support for Texas Instruments OMAP HDMI" - depends on SND_OMAP_SOC && OMAP4_DSS_HDMI && OMAP2_DSS - select SND_OMAP_SOC_HDMI - select SND_SOC_HDMI_CODEC - select OMAP4_DSS_HDMI_AUDIO - help - Say Y if you want to add support for SoC HDMI audio on Texas Instruments - OMAP4 chips - config SND_OMAP_SOC_OMAP3_PANDORA tristate "SoC Audio support for OMAP3 Pandora" depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_PANDORA
sound/soc/omap/Makefile +0 -4
@@ -3,13 +3,11 @@ snd-soc-omap-objs := omap-pcm.o snd-soc-omap-dmic-objs := omap-dmic.o snd-soc-omap-mcbsp-objs := omap-mcbsp.o mcbsp.o snd-soc-omap-mcpdm-objs := omap-mcpdm.o -snd-soc-omap-hdmi-objs := omap-hdmi.o obj-$(CONFIG_SND_OMAP_SOC) += snd-soc-omap.o obj-$(CONFIG_SND_OMAP_SOC_DMIC) += snd-soc-omap-dmic.o obj-$(CONFIG_SND_OMAP_SOC_MCBSP) += snd-soc-omap-mcbsp.o obj-$(CONFIG_SND_OMAP_SOC_MCPDM) += snd-soc-omap-mcpdm.o -obj-$(CONFIG_SND_OMAP_SOC_HDMI) += snd-soc-omap-hdmi.o # OMAP Machine Support snd-soc-n810-objs := n810.o
@@ -20,7 +18,6 @@ snd-soc-am3517evm-objs := am3517evm.o snd-soc-omap-abe-twl6040-objs := omap-abe-twl6040.o snd-soc-omap-twl4030-objs := omap-twl4030.o snd-soc-omap3pandora-objs := omap3pandora.o -snd-soc-omap-hdmi-card-objs := omap-hdmi-card.o obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o obj-$(CONFIG_SND_OMAP_SOC_RX51) += snd-soc-rx51.o
@@ -30,4 +27,3 @@ obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o obj-$(CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040) += snd-soc-omap-abe-twl6040.o obj-$(CONFIG_SND_OMAP_SOC_OMAP_TWL4030) += snd-soc-omap-twl4030.o obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o -obj-$(CONFIG_SND_OMAP_SOC_OMAP_HDMI) += snd-soc-omap-hdmi-card.o
sound/soc/omap/omap-hdmi-card.c deleted +0 -87
87 lines not on this page · raw message
sound/soc/omap/omap-hdmi.c deleted +0 -364
364 lines not on this page · raw message
sound/soc/omap/omap-hdmi.h deleted +0 -38
@@ -1,38 +0,0 @@ -/* -* omap-hdmi.h -* -* Definitions for OMAP ALSA SoC DAI driver for HDMI audio on OMAP4 processors. -* Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ -* Authors: Jorge Candelaria <[email protected]> -* Ricardo Neri <[email protected]> -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* version 2 as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA -* -*/ - -#ifndef __OMAP_HDMI_H__ -#define __OMAP_HDMI_H__ - -#define OMAP_HDMI_AUDIO_DMA_PORT 0x8c - -#define OMAP_HDMI_RATES (SNDRV_PCM_RATE_32000 | \ - SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | \ - SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \ - SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000) - -#define OMAP_HDMI_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ - SNDRV_PCM_FMTBIT_S24_LE) - -#endif
Signature · 1 line
1.7.9.5
PATCH 12/19 OMAPDSS: Remove obsolete audio code
In reply to Jyri SarhaRemoves all code related to external audio driver callbacks. There is no need for those now that sound/soc/omap/omap-hdmi.c is removed.
--- .../fbdev/omap2/displays-new/connector-hdmi.c | 99 -------------------- .../fbdev/omap2/displays-new/encoder-tpd12s015.c | 56 ----------- include/video/omapdss.h | 31 ------ 3 files changed, 186 deletions(-)
drivers/video/fbdev/omap2/displays-new/connector-hdmi.c +0 -99
@@ -170,98 +170,6 @@ static bool hdmic_detect(struct omap_dss_device *dssdev)return in->ops.hdmi->detect (in); } -static int hdmic_audio_enable (struct omap_dss_device *dssdev) -{ -struct panel_drv_data *ddata =to_panel_data (dssdev); -struct omap_dss_device *in = ddata->in; -int r; - -/* enable audio only if the display is active */ -if (!omapdss_device_is_enabled (dssdev)) -return -EPERM ; - - r = in->ops.hdmi->audio_enable (in); -if (r) -return r; - - dssdev->audio_state =OMAP_DSS_AUDIO_ENABLED ; - -return 0 ; -} - -static void hdmic_audio_disable (struct omap_dss_device *dssdev) -{ -struct panel_drv_data *ddata =to_panel_data (dssdev); -struct omap_dss_device *in = ddata->in; - - in->ops.hdmi->audio_disable (in); - - dssdev->audio_state =OMAP_DSS_AUDIO_DISABLED ; -} - -static int hdmic_audio_start (struct omap_dss_device *dssdev) -{ -struct panel_drv_data *ddata =to_panel_data (dssdev); -struct omap_dss_device *in = ddata->in; -int r; - -/* -* No need to check the panel state. It was checked when trasitioning -* to AUDIO_ENABLED. -*/ -if (dssdev->audio_state !=OMAP_DSS_AUDIO_ENABLED ) -return -EPERM ; - - r = in->ops.hdmi->audio_start (in); -if (r) -return r; - - dssdev->audio_state =OMAP_DSS_AUDIO_PLAYING ; - -return 0 ; -} - -static void hdmic_audio_stop (struct omap_dss_device *dssdev) -{ -struct panel_drv_data *ddata =to_panel_data (dssdev); -struct omap_dss_device *in = ddata->in; - - in->ops.hdmi->audio_stop (in); - - dssdev->audio_state =OMAP_DSS_AUDIO_ENABLED ; -} - -static bool hdmic_audio_supported (struct omap_dss_device *dssdev) -{ -struct panel_drv_data *ddata =to_panel_data (dssdev); -struct omap_dss_device *in = ddata->in; - -if (!omapdss_device_is_enabled (dssdev)) -return false; - -return in->ops.hdmi->audio_supported (in); -} - -static int hdmic_audio_config (struct omap_dss_device *dssdev, -struct omap_dss_audio *audio) -{ -struct panel_drv_data *ddata =to_panel_data (dssdev); -struct omap_dss_device *in = ddata->in; -int r; - -/* config audio only if the display is active */ -if (!omapdss_device_is_enabled (dssdev)) -return -EPERM ; - - r = in->ops.hdmi->audio_config (in, audio); -if (r) -return r; - - dssdev->audio_state =OMAP_DSS_AUDIO_CONFIGURED ; - -return 0 ; -} -static struct omap_dss_driver hdmic_driver = { .connect = hdmic_connect, .disconnect = hdmic_disconnect,
@@ -277,13 +185,6 @@ static struct omap_dss_driver hdmic_driver = { .read_edid = hdmic_read_edid, .detect = hdmic_detect, - - .audio_enable = hdmic_audio_enable, - .audio_disable = hdmic_audio_disable, - .audio_start = hdmic_audio_start, - .audio_stop = hdmic_audio_stop, - .audio_supported = hdmic_audio_supported, - .audio_config = hdmic_audio_config, };static int hdmic_probe_pdata (struct platform_device *pdev)
drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c +0 -56
68 lines not on this page · raw message
include/video/omapdss.h +0 -31
@@ -629,19 +629,6 @@ struct omapdss_hdmi_ops {int (*read_edid)(struct omap_dss_device *dssdev,u8 *buf,int len);bool (*detect)(struct omap_dss_device *dssdev); - -/* -* Note: These functions might sleep. Do not call while -* holding a spinlock/readlock. -*/ -int (*audio_enable)(struct omap_dss_device *dssdev); -void (*audio_disable)(struct omap_dss_device *dssdev); -bool (*audio_supported)(struct omap_dss_device *dssdev); -int (*audio_config)(struct omap_dss_device *dssdev, -struct omap_dss_audio *audio); -/* Note: These functions may not sleep */ -int (*audio_start)(struct omap_dss_device *dssdev); -void (*audio_stop)(struct omap_dss_device *dssdev); };struct omapdss_dsi_ops {
@@ -848,24 +835,6 @@ struct omap_dss_driver {int (*read_edid)(struct omap_dss_device *dssdev,u8 *buf,int len);bool (*detect)(struct omap_dss_device *dssdev); - -/* -* For display drivers that support audio. This encompasses -* HDMI and DisplayPort at the moment. -*/ -/* -* Note: These functions might sleep. Do not call while -* holding a spinlock/readlock. -*/ -int (*audio_enable)(struct omap_dss_device *dssdev); -void (*audio_disable)(struct omap_dss_device *dssdev); -bool (*audio_supported)(struct omap_dss_device *dssdev); -int (*audio_config)(struct omap_dss_device *dssdev, -struct omap_dss_audio *audio); -/* Note: These functions may not sleep */ -int (*audio_start)(struct omap_dss_device *dssdev); -void (*audio_stop)(struct omap_dss_device *dssdev); - };enum omapdss_version omapdss_get_version (void );
Signature · 1 line
1.7.9.5
PATCH 13/19 ARM: omap4.dtsi: Add audio related parametes to hdmi node
In reply to a message not in the archiveAdds HDMI audio sDMA properties.
--- arch/arm/boot/dts/omap4.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/omap4.dtsi +2 -0
@@ -919,6 +919,8 @@ ti,hwmods = "dss_hdmi"; clocks = <&dss_48mhz_clk>, <&dss_sys_clk>; clock-names = "fck", "sys_clk"; + dmas = <&sdma 76>; + dma-names = "audio_tx"; }; }; };
Signature · 6 lines
1.7.9.5 -- 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 14/19 ARM: omap4-panda-common.dtsi: Add HDMI audio nodes
In reply to Jyri SarhaAdds a simple-card sound node for HDMI audio, the associated hdmi-codec node, and sound-dai-cells propeties to the DAI nodes.
--- arch/arm/boot/dts/omap4-panda-common.dtsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap4-panda-common.dtsi +20 -1
@@ -41,7 +41,7 @@ }; }; - sound: sound { + sound: sound@0 { compatible = "ti,abe-twl6040"; ti,model = "PandaBoard";
@@ -65,6 +65,24 @@ "AFMR", "Line In"; }; + sound@1 { + compatible = "simple-audio-card"; + + simple-audio-card,cpu { + sound-dai = <&hdmi>; + }; + + simple-audio-card,codec { + sound-dai = <&hdmi_audio>; + }; + }; + + hdmi_audio: hdmi_audio@0 { + #sound-dai-cells = <0>; + compatible = "linux,hdmi-audio"; + status = "okay"; + }; + /* HS USB Port 1 Power */ hsusb1_power: hsusb1_power_reg { compatible = "regulator-fixed";
@@ -512,6 +530,7 @@ }; &hdmi { + #sound-dai-cells = <0>; status = "ok"; vdda-supply = <&vdac>;
Signature · 1 line
1.7.9.5
PATCH 15/19 ARM: omap5.dtsi: Add audio related parameters to hdmi node
In reply to Jyri SarhaAdds HDMI audio sDMA properties.
--- arch/arm/boot/dts/omap5.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/omap5.dtsi +2 -0
@@ -931,6 +931,8 @@ ti,hwmods = "dss_hdmi"; clocks = <&dss_48mhz_clk>, <&dss_sys_clk>; clock-names = "fck", "sys_clk"; + dmas = <&sdma 76>; + dma-names = "audio_tx"; }; }; };
Signature · 1 line
1.7.9.5
PATCH 16/19 ARM: omap5-uevm.dts: Add hdmi audio related nodes
In reply to Jyri SarhaAdds a simple-card sound node for HDMI audio, the associated hdmi-codec node, and sound-dai-cells propeties to the DAI nodes.
--- arch/arm/boot/dts/omap5-uevm.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/boot/dts/omap5-uevm.dts +19 -0
@@ -561,6 +561,24 @@ }; }; }; + + sound@0 { + compatible = "simple-audio-card"; + + simple-audio-card,cpu { + sound-dai = <&hdmi>; + }; + + simple-audio-card,codec { + sound-dai = <&hdmi_audio>; + }; + }; + + hdmi_audio: hdmi_audio@0 { + #sound-dai-cells = <0>; + compatible = "linux,hdmi-audio"; + status = "okay"; + }; }; &dss {
@@ -568,6 +586,7 @@ }; &hdmi { + #sound-dai-cells = <0>; status = "ok"; vdda-supply = <&ldo4_reg>;
Signature · 1 line
1.7.9.5
PATCH 17/19 ARM: omap2plus_defconfig: Build DSS HDMI support for OMAP4 in kernel
In reply to Jyri SarhaThis patch is here only as an example on how to enable HDMI video for Panda board. In addition to this patch omapdss.def_disp=hdmi parameter should be added to kernel command line in order to enable HDMI video.
--- arch/arm/configs/omap2plus_defconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/configs/omap2plus_defconfig +4 -4
@@ -187,14 +187,14 @@ CONFIG_FB=y CONFIG_FIRMWARE_EDID=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y -CONFIG_OMAP2_DSS=m +CONFIG_OMAP2_DSS=y CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_DSI=y -CONFIG_FB_OMAP2=m +CONFIG_FB_OMAP2=y CONFIG_DISPLAY_ENCODER_TFP410=m CONFIG_DISPLAY_ENCODER_TPD12S015=m -CONFIG_DISPLAY_CONNECTOR_DVI=m -CONFIG_DISPLAY_CONNECTOR_HDMI=m +CONFIG_DISPLAY_CONNECTOR_DVI=y +CONFIG_DISPLAY_CONNECTOR_HDMI=y CONFIG_DISPLAY_PANEL_DPI=m CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y
Signature · 1 line
1.7.9.5
PATCH 18/19 ARM: omap2plus_defconfig: Enable OMAP5 HDMI support
In reply to Jyri SarhaThis patch is here only as an example on how to enable HDMI video for OMAP5 uEVM. Adds CONFIG_GPIO_PCA953X=y and CONFIG_OMAP5_DSS_HDMI=y.
--- arch/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
@@ -157,6 +157,7 @@ CONFIG_PINCTRL_SINGLE=y CONFIG_DEBUG_GPIO=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_TWL4030=y +CONFIG_GPIO_PCA953X=y CONFIG_W1=y CONFIG_POWER_SUPPLY=y CONFIG_SENSORS_LM75=m
@@ -190,6 +191,7 @@ CONFIG_FB_TILEBLITTING=y CONFIG_OMAP2_DSS=y CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_DSI=y +CONFIG_OMAP5_DSS_HDMI=y CONFIG_FB_OMAP2=y CONFIG_DISPLAY_ENCODER_TFP410=m CONFIG_DISPLAY_ENCODER_TPD12S015=m
Signature · 1 line
1.7.9.5
PATCH 19/19 ARM: omap2plus_defconfig: Enable OMAP4+ HDMI audio support
In reply to Jyri SarhaThis patch is here only as an example on how to enable HDMI audio for OMAP4+ HW. Adds CONFIG_SND_SIMPLE_CARD=m and CONFIG_SND_SOC_HDMI_CODEC=m. Also builds SND_OMAP_SOC in kernel to support in kernel built OMAPDSS with integrated HDMI DAI driver.
--- arch/arm/configs/omap2plus_defconfig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
arch/arm/configs/omap2plus_defconfig +6 -4
@@ -204,20 +204,22 @@ CONFIG_LCD_PLATFORM=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_LOGO=y -CONFIG_SOUND=m -CONFIG_SND=m +CONFIG_SOUND=y +CONFIG_SND=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=m -CONFIG_SND_OMAP_SOC=m +CONFIG_SND_SOC=y +CONFIG_SND_OMAP_SOC=y CONFIG_SND_AM33XX_SOC_EVM=m CONFIG_SND_DAVINCI_SOC=m CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_SND_SOC_HDMI_CODEC=m CONFIG_USB=y CONFIG_USB_DEBUG=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerQuoted 10 lines · Jyri Sarha
Since RFC version of the patch set:
- Split callbacks removal patch away from "Integrated ASoC DAI component driver implementation" patches for easier readingThis set of patches fixes OMAP4+ HDMI audio. The structure of the implementatin looks a bit different than before. Instead of creating a driver specific API for a separate ASoC component driver to connect to, this implementation integrates an the component driver into the HDMI driver.
Quoted 7 lines
The idea is to use an existing ASoC component driver API instead of creating a new custom API for each HDMI IP and to avoid splitting the driver to half for separate video and audio parts connected with the API.
The new implementation also uses simple-audio-card for a machine driver instead of having its own HW specific machine driver.
Can you guys please post this split into the following separate parts for the maintainers to merge:
- ASoC changes
- DSS changes
- DTS changes
And once those are all in, please post the defconfig changes.
Regards,
Tony
Re: [PATCH 11/19] ASoC: omap: Remove obsolete HDMI audio code and Kconfig options
In reply to Jyri SarhaQuoted 4 lines · Jyri Sarha
Removes omap-hdmi DAI driver, omap-hdmi-card driver, the related
Kconfigoptions, andMakefileentries. The HDMI DAI drivers has been integrated directly to OMAP4+ HDMI drivers and simple-card driver is used instead of omap-hdmi-card driver.
Quoted 18 lines · Jyri Sarha
Since RFC version of the patch set:
- Split callbacks removal patch away from "Integrated ASoC DAI component driver implementation" patches for easier readingThis set of patches fixes OMAP4+ HDMI audio. The structure of the implementatin looks a bit different than before. Instead of creating a driver specific API for a separate ASoC component driver to connect to, this implementation integrates an the component driver into the HDMI driver.
The idea is to use an existing ASoC component driver API instead of creating a new custom API for each HDMI IP and to avoid splitting the driver to half for separate video and audio parts connected with the API.
The new implementation also uses simple-audio-card for a machine driver instead of having its own HW specific machine driver.
Quoted 7 lines
The patches are based on 3.15-rc2 merged with
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.gitfor-next andgit://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.gitwork/dss-dt-omap5Everything is pushed here here:
git://git.ti.com/~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.gitomap-hdmi-audio
hey, this worked straight away :)
But there seems to be something wrong with the channel mapping.
For stereo (speaker-test -c 2) the mapping is correct.
But for -c 4 and -c 8 it gets weird:
speaker-test -c 4 -s X # where X is 1-4
1: Front Left is Rear Left
2: Front Right is Rear Right
3: Rear Right is Front Right
4: Rear Left is Front Left
speaker-test -c 8 -s X # where X is 1-8
1: Front Left is Rear Left
2: Center is Rear Left
3: Front Right is Rear Right
4: Side Right is Front Right
5: Rear Right is silent
6: Rear Left is Center
7: Side Left is Front Left
8: LFE - Rear Right
I think you need to check what channel order ALSA expects. I believe speaker-test does the right thing on my HTPC normally connected to my receiver.
Note: I am not 100% sure about the -c 8 results. I might have to do the test again.
Tested on VAR-DVK-OM44 (OMAP4460) with Yamaha RX-A1030 Surround receiver.
regards
Joachim Eastwood
Quoted 1 line · Joachim Eastwood
On 12 May 2014 11:12, Jyri Sarha <[email protected]> wrote:
...
Quoted 24 lines
hey, this worked straight away :)
But there seems to be something wrong with the channel mapping.
For stereo (speaker-test -c 2) the mapping is correct.
But for -c 4 and -c 8 it gets weird:
speaker-test -c 4 -s X # where X is 1-4
1: Front Left is Rear Left
2: Front Right is Rear Right
3: Rear Right is Front Right
4: Rear Left is Front Leftspeaker-test -c 8 -s X # where X is 1-8
1: Front Left is Rear Left
2: Center is Rear Left
3: Front Right is Rear Right
4: Side Right is Front Right
5: Rear Right is silent
6: Rear Left is Center
7: Side Left is Front Left
8: LFE - Rear Right
Quoted 4 lines
I think you need to check what channel order ALSA expects. I believe speaker-test does the right thing on my HTPC normally connected to my receiver.
I checked the implementation and there was indeed something weird there, but the implementation can not explain the FL and FR channels jumping around. FL and FL should always be the first two channels in all configurations and the implementation does not touch them.
The implementation uses 8ch HDMI setup for anything above 2ch with "Audio InfoFrame Data Byte 4" set to 0x13. According to CEA-861 specs this means following channel order: FL, FR, LFE, FC, RL, RR, RLC, RRC
This is a closest match to ALSA 8ch mapping (according to sound/core/pcm_lib.c) which is: FL, FR, FC, LFE, RL, RR, SL, SR
Current implementation has FLE and FC channels correctly swapped, but it shifts them to last two channels and RL, RR, SL, SR are shifted down to fill the place. This is all wrong and I'll try to come up with a fix for that. Unfortunately I can not test anything beyond 2 ch myself so I would need someone to volunteer to test my patch.
Best regards,
Jyri
Quoted 40 lines · Jyri Sarha
Quoted 2 lines · Joachim Eastwood
On 12 May 2014 11:12, Jyri Sarha <[email protected]> wrote:
...
Quoted 24 lines
hey, this worked straight away :)
But there seems to be something wrong with the channel mapping.
For stereo (speaker-test -c 2) the mapping is correct.
But for -c 4 and -c 8 it gets weird:
speaker-test -c 4 -s X # where X is 1-4
1: Front Left is Rear Left
2: Front Right is Rear Right
3: Rear Right is Front Right
4: Rear Left is Front Leftspeaker-test -c 8 -s X # where X is 1-8
1: Front Left is Rear Left
2: Center is Rear Left
3: Front Right is Rear Right
4: Side Right is Front Right
5: Rear Right is silent
6: Rear Left is Center
7: Side Left is Front Left
8: LFE - Rear RightQuoted 4 lines
I think you need to check what channel order ALSA expects. I believe speaker-test does the right thing on my HTPC normally connected to my receiver.
I checked the implementation and there was indeed something weird there, but the implementation can not explain the FL and FR channels jumping around. FL and FL should always be the first two channels in all configurations and the implementation does not touch them.
Quoted 6 lines
The implementation uses 8ch HDMI setup for anything above 2ch with "Audio InfoFrame Data Byte 4" set to
0x13. According to CEA-861 specs this means following channel order: FL, FR, LFE, FC, RL, RR, RLC, RRCThis is a closest match to ALSA 8ch mapping (according to
sound/core/pcm_lib.c) which is: FL, FR, FC, LFE, RL, RR, SL, SR
hm, okey. I haven't look at the code but it do seem strange. But with speaker-test -c 4 the front and back are surely swapped here.
I'll do some more testing and also check with my HTPC. btw, I only have a 5.1 setup over here so I can't test all the discrete channels.
Quoted 5 lines
Current implementation has FLE and FC channels correctly swapped, but it shifts them to last two channels and RL, RR, SL, SR are shifted down to fill the place. This is all wrong and I'll try to come up with a fix for that. Unfortunately I can not test anything beyond 2 ch myself so I would need someone to volunteer to test my patch.
I have the dev kit setup up over here so I can test your patches.
regards
Joachim Eastwood
Re: [PATCH 07/19] OMAPDSS: hdmi5_core: Fix compilation with OMAP5_DSS_HDMI_AUDIO
In reply to Jyri SarhaHi,
Quoted 12 lines · Jyri Sarha
Use correct variable name for base address.
Signed-off-by Jyri Sarha <[email protected]>--- drivers/video/fbdev/omap2/dss/hdmi5_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/omap2/dss/hdmi5_core.c +0
-0
drivers/video/fbdev/omap2/dss/hdmi5_core.c static void hdmi5_core_audio_config(struct hdmi_core_data *core, · line 792
Quoted 8 lines
drivers/video/fbdev/omap2/dss/hdmi5_core.c +1
-1@@ -786,7 +786,7 @@ static void hdmi5_core_audio_config(struct hdmi_core_data *core,REG_FLD_MOD (base,HDMI_CORE_AUD_GP_POL ,1 ,0 ,0 );/* unmute audio */ -REG_FLD_MOD (core_sys_base,HDMI_CORE_FC_AUDSCONF ,0 ,7 ,4 ); +REG_FLD_MOD (base,HDMI_CORE_FC_AUDSCONF ,0 ,7 ,4 ); } static void hdmi5_core_audio_infoframe_cfg(struct hdmi_core_data *core,
This fix is independent of the rest of the series, so I'll already pick this one to my 3.16 omapdss branch.
Tomi
Re: [PATCH 05/19] OMAPDSS: Kconfig: Add depencies and help section to OMAP4_DSS_HDMI_AUDIO
In reply to Jyri SarhaHi,
Quoted 13 lines · Jyri Sarha
Signed-off-by Jyri Sarha <[email protected]>--- drivers/video/fbdev/omap2/dss/Kconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/video/fbdev/omap2/dss/Kconfig +0
-0@@ -70,7 +70,15 @@ config OMAP4_DSS_HDMI HDMI support for OMAP4 based SoCs. config OMAP4_DSS_HDMI_AUDIO
drivers/video/fbdev/omap2/dss/Kconfig config OMAP4_DSS_HDMI · line 81
Quoted 10 lines
drivers/video/fbdev/omap2/dss/Kconfig +9
-1- bool + bool "HDMI audio support for OMAP4" + depends on OMAP4_DSS_HDMI + depends on SND_OMAP_SOC=y || OMAP2_DSS = SND_OMAP_SOC + default y + help + HDMI audio support for OMAP4 based SoCs. Adds integrated + ASoC Digital Audio Interface component driver into OMAPDSS + module. Select SND_SOC_HDMI_CODEC and SND_SIMPLE_CARD with + devicetree description for full HDMI audio support.
What does "for full HDMI audio support" mean? What's the partial support? =)
Tomi
Re: [PATCH 14/19] ARM: omap4-panda-common.dtsi: Add HDMI audio nodes
In reply to Jyri SarhaQuoted 47 lines · Jyri Sarha
Adds a simple-card sound node for HDMI audio, the associated hdmi-codec node, and sound-dai-cells propeties to the DAI nodes.
Signed-off-by Jyri Sarha <[email protected]>--- arch/arm/boot/dts/omap4-panda-common.dtsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)arch/arm/boot/dts/omap4-panda-common.dtsi +19
-1@@ -41,7 +41,7 @@ }; }; - sound: sound { + sound: sound@0 { compatible = "ti,abe-twl6040"; ti,model = "PandaBoard";@@ -65,6 +65,24 @@ "AFMR", "Line In"; }; + sound@1 { + compatible = "simple-audio-card"; + + simple-audio-card,cpu { + sound-dai = <&hdmi>; + }; + + simple-audio-card,codec { + sound-dai = <&hdmi_audio>; + }; + }; + + hdmi_audio: hdmi_audio@0 { + #sound-dai-cells = <0>; + compatible = "linux,hdmi-audio"; + status = "okay"; + }; + /* HS USB Port 1 Power */ hsusb1_power: hsusb1_power_reg { compatible = "regulator-fixed";
arch/arm/boot/dts/omap4-panda-common.dtsi line 535
Quoted 6 lines
arch/arm/boot/dts/omap4-panda-common.dtsi +1
-0@@ -512,6 +530,7 @@ }; &hdmi { + #sound-dai-cells = <0>; status = "ok"; vdda-supply = <&vdac>;
Maybe this is how this has to be done, but I'll still ask:
Considering that the HDMI audio is basically inseparable part of the OMAP HDMI video, and if a board has HDMI video connector connected to the SoC's HDMI, then it has HDMI audio.
So all of the above .dts changes are already implied when we have HDMI video on the board. Is there no way to prevent every board needing to add those exact same nodes to get HDMI audio?
Tomi
Mark Brown
maintainerRe: [PATCH 14/19] ARM: omap4-panda-common.dtsi: Add HDMI audio nodes
Quoted 3 lines · Tomi Valkeinen
So all of the above .dts changes are already implied when we have HDMI video on the board. Is there no way to prevent every board needing to add those exact same nodes to get HDMI audio?
You can always instantiate devices directly from the HDMI controller code, there's no need to put things in DT at all.
Re: [PATCH 05/19] OMAPDSS: Kconfig: Add depencies and help section to OMAP4_DSS_HDMI_AUDIO
In reply to Tomi ValkeinenQuoted 15 lines · Tomi Valkeinen
Hi,
Quoted 12 lines · Jyri Sarha
Signed-off-by Jyri Sarha <[email protected]>--- drivers/video/fbdev/omap2/dss/Kconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/video/fbdev/omap2/dss/Kconfig +0
-0@@ -70,7 +70,15 @@ config OMAP4_DSS_HDMI HDMI support for OMAP4 based SoCs.
Quoted 14 lines
drivers/video/fbdev/omap2/dss/Kconfig config OMAP4_DSS_HDMI · line 81
Quoted 11 lines
drivers/video/fbdev/omap2/dss/Kconfig +9
-1config OMAP4_DSS_HDMI_AUDIO - bool + bool "HDMI audio support for OMAP4" + depends on OMAP4_DSS_HDMI + depends on SND_OMAP_SOC=y || OMAP2_DSS = SND_OMAP_SOC + default y + help + HDMI audio support for OMAP4 based SoCs. Adds integrated + ASoC Digital Audio Interface component driver into OMAPDSS + module. Select SND_SOC_HDMI_CODEC and SND_SIMPLE_CARD with + devicetree description for full HDMI audio support.What does "for full HDMI audio support" mean? What's the partial support? =)
The hdmi driver provides a digital audio interface (DAI) which can be used to transmit audio over the HDMI cable. The ASoC DAI component driver provides just that functionality. A machine, platform, and (in this case a dummy) codec component driver is also needed for a complete ALSA device functionality.
Anyway, I look into Mark's suggestion of instantiating all the necessary component drivers from the HDMI driver.
Best regards,
Jyri
Quoted 54 lines · Joachim Eastwood
Quoted 40 lines · Jyri Sarha
Quoted 2 lines · Joachim Eastwood
On 12 May 2014 11:12, Jyri Sarha <[email protected]> wrote:
...
Quoted 24 lines
hey, this worked straight away :)
But there seems to be something wrong with the channel mapping.
For stereo (speaker-test -c 2) the mapping is correct.
But for -c 4 and -c 8 it gets weird:
speaker-test -c 4 -s X # where X is 1-4
1: Front Left is Rear Left
2: Front Right is Rear Right
3: Rear Right is Front Right
4: Rear Left is Front Leftspeaker-test -c 8 -s X # where X is 1-8
1: Front Left is Rear Left
2: Center is Rear Left
3: Front Right is Rear Right
4: Side Right is Front Right
5: Rear Right is silent
6: Rear Left is Center
7: Side Left is Front Left
8: LFE - Rear RightQuoted 4 lines
I think you need to check what channel order ALSA expects. I believe speaker-test does the right thing on my HTPC normally connected to my receiver.
I checked the implementation and there was indeed something weird there, but the implementation can not explain the FL and FR channels jumping around. FL and FL should always be the first two channels in all configurations and the implementation does not touch them.
Quoted 6 lines
The implementation uses 8ch HDMI setup for anything above 2ch with "Audio InfoFrame Data Byte 4" set to
0x13. According to CEA-861 specs this means following channel order: FL, FR, LFE, FC, RL, RR, RLC, RRCThis is a closest match to ALSA 8ch mapping (according to
sound/core/pcm_lib.c) which is: FL, FR, FC, LFE, RL, RR, SL, SRhm, okey. I haven't look at the code but it do seem strange. But with speaker-test -c 4 the front and back are surely swapped here.
I'll do some more testing and also check with my HTPC. btw, I only have a 5.1 setup over here so I can't test all the discrete channels.
Quoted 7 lines
Quoted 5 lines
Current implementation has FLE and FC channels correctly swapped, but it shifts them to last two channels and RL, RR, SL, SR are shifted down to fill the place. This is all wrong and I'll try to come up with a fix for that. Unfortunately I can not test anything beyond 2 ch myself so I would need someone to volunteer to test my patch.
I have the dev kit setup up over here so I can test your patches.
I did some more testing over here.
My HTPC (nVidia ION2 based) works good with speaker-test and all channels are where they are suppose to be.
On the OMAP4 board I tried doing: "while true; do speaker-test -c 4 -s 1; done" and this had an interesting effect.
Most of the time FL (Front Left) is swapped with BL (Back Left) but about every 10th time the sound comes out in the FL speaker... So there something weird going on here. Same story for the right channel.
I also noticed that HDMI doesn't always work on boot up, it sometimes fail with:
[ 193.985565] omapdss_hdmi 58006000.encoder: audio not supported [ 193.985565] omapdss_hdmi 58006000.encoder: ASoC: can't open
interface 58006000.encoder: -19
But after replugging the HDMI connector a couple of times it starts to work.
I'll see if I can try with an old TI OMAP4 kernel (3.4) and see how that works.
regards
Joachim Eastwood
Quoted 74 lines · Joachim Eastwood
Quoted 54 lines · Joachim Eastwood
Quoted 40 lines · Jyri Sarha
Quoted 2 lines · Joachim Eastwood
On 12 May 2014 11:12, Jyri Sarha <[email protected]> wrote:
...
Quoted 24 lines
hey, this worked straight away :)
But there seems to be something wrong with the channel mapping.
For stereo (speaker-test -c 2) the mapping is correct.
But for -c 4 and -c 8 it gets weird:
speaker-test -c 4 -s X # where X is 1-4
1: Front Left is Rear Left
2: Front Right is Rear Right
3: Rear Right is Front Right
4: Rear Left is Front Leftspeaker-test -c 8 -s X # where X is 1-8
1: Front Left is Rear Left
2: Center is Rear Left
3: Front Right is Rear Right
4: Side Right is Front Right
5: Rear Right is silent
6: Rear Left is Center
7: Side Left is Front Left
8: LFE - Rear RightQuoted 4 lines
I think you need to check what channel order ALSA expects. I believe speaker-test does the right thing on my HTPC normally connected to my receiver.
I checked the implementation and there was indeed something weird there, but the implementation can not explain the FL and FR channels jumping around. FL and FL should always be the first two channels in all configurations and the implementation does not touch them.
Quoted 6 lines
The implementation uses 8ch HDMI setup for anything above 2ch with "Audio InfoFrame Data Byte 4" set to
0x13. According to CEA-861 specs this means following channel order: FL, FR, LFE, FC, RL, RR, RLC, RRCThis is a closest match to ALSA 8ch mapping (according to
sound/core/pcm_lib.c) which is: FL, FR, FC, LFE, RL, RR, SL, SRhm, okey. I haven't look at the code but it do seem strange. But with speaker-test -c 4 the front and back are surely swapped here.
I'll do some more testing and also check with my HTPC. btw, I only have a 5.1 setup over here so I can't test all the discrete channels.
Quoted 7 lines
Quoted 5 lines
Current implementation has FLE and FC channels correctly swapped, but it shifts them to last two channels and RL, RR, SL, SR are shifted down to fill the place. This is all wrong and I'll try to come up with a fix for that. Unfortunately I can not test anything beyond 2 ch myself so I would need someone to volunteer to test my patch.
I have the dev kit setup up over here so I can test your patches.
I did some more testing over here.
My HTPC (nVidia ION2 based) works good with speaker-test and all channels are where they are suppose to be.
On the OMAP4 board I tried doing: "while true; do speaker-test -c 4 -s 1; done" and this had an interesting effect.
Most of the time FL (Front Left) is swapped with BL (Back Left) but about every 10th time the sound comes out in the FL speaker... So there something weird going on here. Same story for the right channel.
Quoted 8 lines
I also noticed that HDMI doesn't always work on boot up, it sometimes fail with:
[ 193.985565] omapdss_hdmi 58006000.encoder: audio not supported [ 193.985565] omapdss_hdmi 58006000.encoder: ASoC: can't openinterface 58006000.encoder: -19
But after replugging the HDMI connector a couple of times it starts to work.
I'll see if I can try with an old TI OMAP4 kernel (3.4) and see how that works.
On the 3.4 Variscite kernel:
Linux version 3.4.0-1489-omap4 (uri@pluto) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #27 SMP PREEMPT Sun Apr 7 13:27:10 IDT 2013git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git + Variscite vendor patches
Both speaker-test -c 4 and -c 8 works. All channels are where they are suppose to be.
Hot plugging is broken, though. So the HDMI must be connected on boot, but that might be the Variscite board setup.
regards
Joachim Eastwood
Quoted 2 lines · Joachim Eastwood
Quoted 1 line · Joachim Eastwood
On 14 May 2014 18:25, Joachim Eastwood <[email protected]> wrote:
...
Quoted 12 lines
Quoted 12 lines
I did some more testing over here.
My HTPC (nVidia ION2 based) works good with speaker-test and all channels are where they are suppose to be.
On the OMAP4 board I tried doing: "while true; do speaker-test -c 4 -s 1; done" and this had an interesting effect.
Most of the time FL (Front Left) is swapped with BL (Back Left) but about every 10th time the sound comes out in the FL speaker... So there something weird going on here. Same story for the right channel.
Quoted 7 lines
Quoted 7 lines
I also noticed that HDMI doesn't always work on boot up, it sometimes fail with:
[ 193.985565] omapdss_hdmi 58006000.encoder: audio not supported [ 193.985565] omapdss_hdmi 58006000.encoder: ASoC: can't openinterface 58006000.encoder: -19
But after replugging the HDMI connector a couple of times it starts to work.
That is weird I can not reproduce this problem. I rebooted my panda several times and the audio device was always there. Could it be that the connector is in DVI mode or something?
Quoted 9 lines
Quoted 1 line
I'll see if I can try with an old TI OMAP4 kernel (3.4) and see how that works.
On the 3.4 Variscite kernel:
Linux version 3.4.0-1489-omap4 (uri@pluto) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #27 SMP PREEMPT Sun Apr 7 13:27:10 IDT 2013git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git+ Variscite vendor patches
Quoted 6 lines
Both speaker-test -c 4 and -c 8 works. All channels are where they are suppose to be.
Hot plugging is broken, though. So the HDMI must be connected on boot, but that might be the Variscite board setup.
I checked the ubuntu branch implementation and found that it is quite different in many places, but the one place that affects the i2s channel mapping to HDMI looks exactly the same. So there must be a bug some where else and there is no point trying to fix it by changing the mapping (it would be impossible anyway). I'll compare the implementations further when I have time.
Thanks for your testing. Now I at least now where the bug is not.
Best regards,
Jyri
Quoted 19 lines · Tony Lindgren
Quoted 10 lines · Jyri Sarha
Since RFC version of the patch set:
- Split callbacks removal patch away from "Integrated ASoC DAI component driver implementation" patches for easier readingThis set of patches fixes OMAP4+ HDMI audio. The structure of the implementatin looks a bit different than before. Instead of creating a driver specific API for a separate ASoC component driver to connect to, this implementation integrates an the component driver into the HDMI driver.
Quoted 7 lines
The idea is to use an existing ASoC component driver API instead of creating a new custom API for each HDMI IP and to avoid splitting the driver to half for separate video and audio parts connected with the API.
The new implementation also uses simple-audio-card for a machine driver instead of having its own HW specific machine driver.
Quoted 8 lines
Can you guys please post this split into the following separate parts for the maintainers to merge:
- ASoC changes
- DSS changes
- DTS changesAnd once those are all in, please post the defconfig changes.
Tony, this series will get delayed until 3.17, but I'd like to merge the HDMI DMA channel changes to omap4/omap5.dtsi already to 3.16. They are patches 13 and 15.
Those are very trivial, but I'd rather have acks from you for all the .dts changes I'll be sending.
Tomi
Quoted 27 lines · Tomi Valkeinen
Quoted 26 lines · Tony Lindgren
Quoted 10 lines · Jyri Sarha
Since RFC version of the patch set:
- Split callbacks removal patch away from "Integrated ASoC DAI component driver implementation" patches for easier readingThis set of patches fixes OMAP4+ HDMI audio. The structure of the implementatin looks a bit different than before. Instead of creating a driver specific API for a separate ASoC component driver to connect to, this implementation integrates an the component driver into the HDMI driver.
Quoted 7 lines
The idea is to use an existing ASoC component driver API instead of creating a new custom API for each HDMI IP and to avoid splitting the driver to half for separate video and audio parts connected with the API.
The new implementation also uses simple-audio-card for a machine driver instead of having its own HW specific machine driver.
Can you guys please post this split into the following separate parts for the maintainers to merge:
- ASoC changes
- DSS changes
- DTS changes
Quoted 8 lines
Quoted 1 line
And once those are all in, please post the defconfig changes.
Tony, this series will get delayed until 3.17, but I'd like to merge the HDMI DMA channel changes to
omap4/omap5.dtsialready to 3.16. They are patches 13 and 15.Those are very trivial, but I'd rather have acks from you for all the .dts changes I'll be sending.
OK fine with me: