* [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio
@ 2012-12-18 1:30 Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 1/5] ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers Ricardo Neri
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Ricardo Neri @ 2012-12-18 1:30 UTC (permalink / raw)
To: tomi.valkeinen, broonie, lrg, tony
Cc: peter.ujfalusi, dzuniga, linux-omap, alsa-devel, Ricardo Neri
Hi Mark, Tomi, Liam, Tony,
This set aims to be the version 3 of my previous submission[1] and aims to
address the comments that Mark and Tomi kindly provided on such submission.
The creation of the platform device for the HDMI audio interface from within the
OMAPDSS HDMI driver that was previously submitted[2] is resubmitted to be
complemented with code to relocate to arch/arm/mach-omap2/display.c the
creation of the platform devices for the HDMI ASoC codec and card drivers. This
series does not break the HDMI audio functionality in any patch.
Also, the names of the platform devices are changed to give them more logical
and more descriptive names.
As the commit
commit 14840b9a83c6a56629db2ba0ec247503e975f143
Author: Ricardo Neri <ricardo.n...@ti.com>
Date: Tue Nov 6 00:19:17 2012 -0600
OMAPDSS: HDMI: Create platform device for audio support
is reverted in Tomi's git://gitorious.org/linux-omap-dss2/linux.git master
branch, this series applies cleanly.
Changes from v1:
*Put in a single series all the patches related to platform device updates.
*Now HDMI audio works correctly in every patch.
*Remove reference to the TPD12S015 HDMI companion chip as the ASoC drivers
are not aware of this and other chips could be used in the future.
Changes from v2:
*Split in two patches the renaming and the relocation of the platform devices.
*Create a separate patch to pass only the address offset of the DMA data port
to the audio interface platform device.
*Keep the name hdmi-audio-codec to not refer to explicitly to OMAP. The codec
can be made generic in a different patch series submitted to alsa-devel.
BR,
Ricardo
[1]. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg80785.html
[2]. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg79795.html
Ricardo Neri (5):
ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers
ARM: OMAP4: Assign IDs to DSS HDMI devices
ARM4: OMAP4+: HDMI: Relocate devices for audio codec and card
ARM: OMAP4+: HDMI: Relocate the device for audio interface
ARM: OMAP4+: HDMI: Refine the DMA port resource for audio
arch/arm/mach-omap2/board-4430sdp.c | 9 ++---
arch/arm/mach-omap2/board-omap4panda.c | 9 ++---
arch/arm/mach-omap2/devices.c | 31 ----------------
arch/arm/mach-omap2/display.c | 31 ++++++++++++++++
drivers/video/omap2/dss/hdmi.c | 62 ++++++++++++++++++++++++++++++++
sound/soc/omap/omap-hdmi-card.c | 4 +--
sound/soc/omap/omap-hdmi.c | 5 ++-
sound/soc/omap/omap-hdmi.h | 2 --
8 files changed, 103 insertions(+), 50 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/5] ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
@ 2012-12-18 1:30 ` Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 2/5] ARM: OMAP4: Assign IDs to DSS HDMI devices Ricardo Neri
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Ricardo Neri @ 2012-12-18 1:30 UTC (permalink / raw)
To: tomi.valkeinen, broonie, lrg, tony
Cc: peter.ujfalusi, dzuniga, linux-omap, alsa-devel, Ricardo Neri
Assign more logical and meaningful names to the platform devices used
by ASoC OMAP HDMI drivers.
The previous omap-hdmi-audio device is renamed as omap-hdmi-audio-card
This is to better illustrate the fact that it describes the whole HDMI
audio in a given board.
The previous omap-hdmi-audio-dai is renamed as omap-hdmi-audio. The -dai
part is removed to not have references to ASoC concepts in the OMAPDSS
HDMI driver. Also, as it will be used by the ASoC HDMI CPU DAI driver,
the name refers only to OMAP HDMI audio functionality, irrespective of the
board.
The names of the ASoC drivers are also updated accordingly.
Signed-off-by: Ricardo Neri <rneri@dextratech.com>
---
| 4 ++--
| 4 ++--
| 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index cba60e0..66518b2 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -356,7 +356,7 @@ static inline void omap_init_dmic(void) {}
defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
static struct platform_device omap_hdmi_audio = {
- .name = "omap-hdmi-audio",
+ .name = "omap-hdmi-audio-card",
.id = -1,
};
@@ -371,7 +371,7 @@ static void __init omap_init_hdmi_audio(void)
return;
}
- pdev = omap_device_build("omap-hdmi-audio-dai",
+ pdev = omap_device_build("omap-hdmi-audio",
-1, oh, NULL, 0, NULL, 0, 0);
WARN(IS_ERR(pdev),
"Can't build omap_device for omap-hdmi-audio-dai.\n");
--git a/sound/soc/omap/omap-hdmi-card.c b/sound/soc/omap/omap-hdmi-card.c
index eaa2ea0..07b9959 100644
--- a/sound/soc/omap/omap-hdmi-card.c
+++ b/sound/soc/omap/omap-hdmi-card.c
@@ -27,12 +27,12 @@
#include <asm/mach-types.h>
#include <video/omapdss.h>
-#define DRV_NAME "omap-hdmi-audio"
+#define DRV_NAME "omap-hdmi-audio-card"
static struct snd_soc_dai_link omap_hdmi_dai = {
.name = "HDMI",
.stream_name = "HDMI",
- .cpu_dai_name = "omap-hdmi-audio-dai",
+ .cpu_dai_name = "omap-hdmi-audio",
.platform_name = "omap-pcm-audio",
.codec_name = "hdmi-audio-codec",
.codec_dai_name = "omap-hdmi-hifi",
--git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index f59c69f..db08501 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -37,7 +37,7 @@
#include "omap-pcm.h"
#include "omap-hdmi.h"
-#define DRV_NAME "omap-hdmi-audio-dai"
+#define DRV_NAME "omap-hdmi-audio"
struct hdmi_priv {
struct omap_pcm_dma_data dma_params;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/5] ARM: OMAP4: Assign IDs to DSS HDMI devices
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 1/5] ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers Ricardo Neri
@ 2012-12-18 1:30 ` Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 3/5] ARM4: OMAP4+: HDMI: Relocate devices for audio codec and card Ricardo Neri
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Ricardo Neri @ 2012-12-18 1:30 UTC (permalink / raw)
To: tomi.valkeinen, broonie, lrg, tony
Cc: peter.ujfalusi, dzuniga, linux-omap, alsa-devel, Ricardo Neri
While Pandaboard and SDP4430 have only one HDMI output connector, it may be
possible that future boards and SoCs support more than one HDMI output.
Thus, we define the identifier of the device. This is used by display
common code to identify and create the platform devices for HDMI audio drivers.
Signed-off-by: Ricardo Neri <rneri@dextratech.com>
---
| 3 +++
arch/arm/mach-omap2/board-omap4panda.c | 3 +++
2 files changed, 6 insertions(+)
--git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..5a486d9 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -666,6 +666,9 @@ static struct omap_dss_device sdp4430_hdmi_device = {
.type = OMAP_DISPLAY_TYPE_HDMI,
.channel = OMAP_DSS_CHANNEL_DIGIT,
.data = &sdp4430_hdmi_data,
+ .dev = {
+ .id = -1,
+ },
};
static struct picodlp_panel_data sdp4430_picodlp_pdata = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..9f336a3 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -440,6 +440,9 @@ static struct omap_dss_device omap4_panda_hdmi_device = {
.type = OMAP_DISPLAY_TYPE_HDMI,
.channel = OMAP_DSS_CHANNEL_DIGIT,
.data = &omap4_panda_hdmi_data,
+ .dev = {
+ .id = -1,
+ },
};
static struct omap_dss_device *omap4_panda_dss_devices[] = {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/5] ARM4: OMAP4+: HDMI: Relocate devices for audio codec and card
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 1/5] ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 2/5] ARM: OMAP4: Assign IDs to DSS HDMI devices Ricardo Neri
@ 2012-12-18 1:30 ` Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 4/5] ARM: OMAP4+: HDMI: Relocate the device for audio interface Ricardo Neri
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Ricardo Neri @ 2012-12-18 1:30 UTC (permalink / raw)
To: tomi.valkeinen, broonie, lrg, tony
Cc: peter.ujfalusi, dzuniga, linux-omap, alsa-devel, Ricardo Neri
Relocate the creation the platform devices for audio the HDMI audio codec and
the audio card to display.c. This allows the display code to create the required
platform devices based on what is wired on the board. Thus, as many devices as
required are created; or none if the HDMI output is not implemented.
Signed-off-by: Ricardo Neri <rneri@dextratech.com>
---
| 6 ------
arch/arm/mach-omap2/board-omap4panda.c | 6 ------
| 7 -------
| 31 +++++++++++++++++++++++++++++++
4 files changed, 31 insertions(+), 19 deletions(-)
--git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 5a486d9..0830d98 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -383,11 +383,6 @@ static struct platform_device sdp4430_dmic_codec = {
.id = -1,
};
-static struct platform_device sdp4430_hdmi_audio_codec = {
- .name = "hdmi-audio-codec",
- .id = -1,
-};
-
static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
.card_name = "SDP4430",
.has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
@@ -422,7 +417,6 @@ static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_vbat,
&sdp4430_dmic_codec,
&sdp4430_abe_audio,
- &sdp4430_hdmi_audio_codec,
};
static struct omap_musb_board_data musb_board_data = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 9f336a3..561a5a7 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -126,11 +126,6 @@ static struct platform_device panda_abe_audio = {
},
};
-static struct platform_device panda_hdmi_audio_codec = {
- .name = "hdmi-audio-codec",
- .id = -1,
-};
-
static struct platform_device btwilink_device = {
.name = "btwilink",
.id = -1,
@@ -140,7 +135,6 @@ static struct platform_device *panda_devices[] __initdata = {
&leds_gpio,
&wl1271_device,
&panda_abe_audio,
- &panda_hdmi_audio_codec,
&btwilink_device,
};
--git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 66518b2..6d37438 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -355,11 +355,6 @@ static inline void omap_init_dmic(void) {}
#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
-static struct platform_device omap_hdmi_audio = {
- .name = "omap-hdmi-audio-card",
- .id = -1,
-};
-
static void __init omap_init_hdmi_audio(void)
{
struct omap_hwmod *oh;
@@ -375,8 +370,6 @@ static void __init omap_init_hdmi_audio(void)
-1, oh, NULL, 0, NULL, 0, 0);
WARN(IS_ERR(pdev),
"Can't build omap_device for omap-hdmi-audio-dai.\n");
-
- platform_device_register(&omap_hdmi_audio);
}
#else
static inline void omap_init_hdmi_audio(void) {}
--git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 282c814e..6cc9cea 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -414,6 +414,37 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
}
}
+ /* Create devices for HDMI audio drivers */
+ for (i = 0; i < board_data->num_devices; i++) {
+ struct platform_device *au_pdev;
+ struct omap_dss_device *dssdev = board_data->devices[i];
+ bool card_created = false;
+
+ if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI)
+ continue;
+
+ /* We need only one device for the audio card */
+ if (card_created == false) {
+ au_pdev = create_simple_dss_pdev("omap-hdmi-audio-card",
+ -1, NULL, 0, dss_pdev);
+ if (IS_ERR(au_pdev)) {
+ pr_err("Could not build platform_device for omap-hdmi-audio-card\n");
+ return PTR_ERR(au_pdev);
+ }
+ card_created = true;
+ }
+
+ /* One device for each HDMI connector in the board */
+ au_pdev = create_simple_dss_pdev("hdmi-audio-codec",
+ dssdev->dev.id,
+ NULL, 0, dss_pdev);
+ if (IS_ERR(au_pdev)) {
+ pr_err("Could not build platform_device for hdmi-audio-codec\n");
+ return PTR_ERR(au_pdev);
+ }
+
+ }
+
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 4/5] ARM: OMAP4+: HDMI: Relocate the device for audio interface
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
` (2 preceding siblings ...)
2012-12-18 1:30 ` [PATCH v3 3/5] ARM4: OMAP4+: HDMI: Relocate devices for audio codec and card Ricardo Neri
@ 2012-12-18 1:30 ` Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 5/5] ARM: OMAP4+: HDMI: Refine the DMA port resource for audio Ricardo Neri
2013-01-03 17:33 ` [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices " Ricardo Neri
5 siblings, 0 replies; 9+ messages in thread
From: Ricardo Neri @ 2012-12-18 1:30 UTC (permalink / raw)
To: tomi.valkeinen, broonie, lrg, tony
Cc: peter.ujfalusi, dzuniga, linux-omap, alsa-devel, Ricardo Neri
The HDMI display and audio functionality share the same resources (e.g., register
spaces). The ASoC HDMI CPU-DAI driver needs access to some (but not all) the
resources of the dss_hdmi platform device. As such resources are within the
address space of omapdss_hdmi, it makes sense to have the DSS HDMI driver to
create the platform driver with the required resources.
Signed-off-by: Ricardo Neri <rneri@dextratech.com>
---
| 24 ----------------
| 59 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 24 deletions(-)
--git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 6d37438..9fdc1f9 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -352,29 +352,6 @@ static void __init omap_init_dmic(void)
static inline void omap_init_dmic(void) {}
#endif
-#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
- defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
-
-static void __init omap_init_hdmi_audio(void)
-{
- struct omap_hwmod *oh;
- struct platform_device *pdev;
-
- oh = omap_hwmod_lookup("dss_hdmi");
- if (!oh) {
- printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
- return;
- }
-
- pdev = omap_device_build("omap-hdmi-audio",
- -1, oh, NULL, 0, NULL, 0, 0);
- WARN(IS_ERR(pdev),
- "Can't build omap_device for omap-hdmi-audio-dai.\n");
-}
-#else
-static inline void omap_init_hdmi_audio(void) {}
-#endif
-
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
#include <linux/platform_data/spi-omap2-mcspi.h>
@@ -620,7 +597,6 @@ static int __init omap2_init_devices(void)
*/
omap_init_audio();
omap_init_camera();
- omap_init_hdmi_audio();
omap_init_mbox();
/* If dtb is there, the devices will be created dynamically */
if (!of_have_populated_dt()) {
--git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 769d082..0dde2b5 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -60,6 +60,9 @@
static struct {
struct mutex lock;
struct platform_device *pdev;
+#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
+ struct platform_device *audio_pdev;
+#endif
struct hdmi_ip_data ip_data;
@@ -822,6 +825,51 @@ static void hdmi_put_clocks(void)
}
#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
+static int hdmi_probe_audio(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct platform_device *aud_pdev;
+ struct resource aud_res[2] = {
+ DEFINE_RES_MEM(-1, -1),
+ DEFINE_RES_DMA(-1),
+ };
+
+ res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ DSSERR("can't get IORESOURCE_MEM HDMI\n");
+ return -EINVAL;
+ }
+
+ /*
+ * Pass this resource to audio drivers to find the DMA port address.
+ * Audio drivers should not ioremap it.
+ */
+ aud_res[0].start = res->start;
+ aud_res[0].end = res->end;
+
+ res = platform_get_resource(hdmi.pdev, IORESOURCE_DMA, 0);
+ if (!res) {
+ DSSERR("can't get IORESOURCE_DMA HDMI\n");
+ return -EINVAL;
+ }
+
+ /* Pass the audio DMA request resource to audio drivers. */
+ aud_res[1].start = res->start;
+
+ /* create platform device for HDMI audio driver */
+ aud_pdev = platform_device_register_simple("omap-hdmi-audio",
+ pdev->id, aud_res,
+ ARRAY_SIZE(aud_res));
+ if (IS_ERR(aud_pdev)) {
+ DSSERR("Can't instantiate hdmi-audio\n");
+ return -ENODEV;
+ }
+
+ hdmi.audio_pdev = aud_pdev;
+
+ return 0;
+}
+
int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts)
{
u32 deep_color;
@@ -1111,6 +1159,12 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
hdmi_probe_pdata(pdev);
+#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
+ r = hdmi_probe_audio(pdev);
+ if (r)
+ DSSWARN("could not create platform device for audio");
+#endif
+
return 0;
err_panel_init:
@@ -1127,6 +1181,11 @@ static int __exit hdmi_remove_child(struct device *dev, void *data)
static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
{
+#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
+ if (hdmi.audio_pdev != NULL)
+ platform_device_unregister(hdmi.audio_pdev);
+#endif
+
device_for_each_child(&pdev->dev, NULL, hdmi_remove_child);
dss_unregister_child_devices(&pdev->dev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 5/5] ARM: OMAP4+: HDMI: Refine the DMA port resource for audio
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
` (3 preceding siblings ...)
2012-12-18 1:30 ` [PATCH v3 4/5] ARM: OMAP4+: HDMI: Relocate the device for audio interface Ricardo Neri
@ 2012-12-18 1:30 ` Ricardo Neri
2013-01-03 17:33 ` [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices " Ricardo Neri
5 siblings, 0 replies; 9+ messages in thread
From: Ricardo Neri @ 2012-12-18 1:30 UTC (permalink / raw)
To: tomi.valkeinen, broonie, lrg, tony
Cc: peter.ujfalusi, dzuniga, linux-omap, alsa-devel, Ricardo Neri
Instead of passing the complete address space to the platform device for audio,
just pass the address offset of the DMA port for audio samples. Thus, we prevent
that two drivers try to ioremap the same resources. This is to be safe, as the
ASoC HDMI CPU-DAI driver will not need to ioremap such resource.
Signed-off-by: Ricardo Neri <rneri@dextratech.com>
---
| 9 ++++++---
| 3 +--
| 2 --
3 files changed, 7 insertions(+), 7 deletions(-)
--git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 0dde2b5..b758f83 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -829,6 +829,7 @@ static int hdmi_probe_audio(struct platform_device *pdev)
{
struct resource *res;
struct platform_device *aud_pdev;
+ u32 port_offset, port_size;
struct resource aud_res[2] = {
DEFINE_RES_MEM(-1, -1),
DEFINE_RES_DMA(-1),
@@ -841,11 +842,13 @@ static int hdmi_probe_audio(struct platform_device *pdev)
}
/*
- * Pass this resource to audio drivers to find the DMA port address.
+ * Pass DMA audio port to audio drivers.
* Audio drivers should not ioremap it.
*/
- aud_res[0].start = res->start;
- aud_res[0].end = res->end;
+ hdmi.ip_data.ops->audio_get_dma_port(&port_offset, &port_size);
+
+ aud_res[0].start = res->start + port_offset;
+ aud_res[0].end = aud_res[0].start + port_size - 1;
res = platform_get_resource(hdmi.pdev, IORESOURCE_DMA, 0);
if (!res) {
--git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index db08501..33418fc 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -281,8 +281,7 @@ static __devinit int omap_hdmi_probe(struct platform_device *pdev)
return -ENODEV;
}
- hdmi_data->dma_params.port_addr = hdmi_rsrc->start
- + OMAP_HDMI_AUDIO_DMA_PORT;
+ hdmi_data->dma_params.port_addr = hdmi_rsrc->start;
hdmi_rsrc = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (!hdmi_rsrc) {
--git a/sound/soc/omap/omap-hdmi.h b/sound/soc/omap/omap-hdmi.h
index 6ad2bf4..33d7a93 100644
--- a/sound/soc/omap/omap-hdmi.h
+++ b/sound/soc/omap/omap-hdmi.h
@@ -25,8 +25,6 @@
#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 | \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
` (4 preceding siblings ...)
2012-12-18 1:30 ` [PATCH v3 5/5] ARM: OMAP4+: HDMI: Refine the DMA port resource for audio Ricardo Neri
@ 2013-01-03 17:33 ` Ricardo Neri
2013-01-04 10:42 ` Mark Brown
5 siblings, 1 reply; 9+ messages in thread
From: Ricardo Neri @ 2013-01-03 17:33 UTC (permalink / raw)
To: Ricardo Neri
Cc: tomi.valkeinen, broonie, lrg, tony, peter.ujfalusi, dzuniga,
linux-omap, alsa-devel
Hi Mark, Tomi,
Just wondering if you had a chance to take a look at these patches.
Thanks!
Ricardo
On 12/17/2012 07:30 PM, Ricardo Neri wrote:
> Hi Mark, Tomi, Liam, Tony,
>
> This set aims to be the version 3 of my previous submission[1] and aims to
> address the comments that Mark and Tomi kindly provided on such submission.
>
> The creation of the platform device for the HDMI audio interface from within the
> OMAPDSS HDMI driver that was previously submitted[2] is resubmitted to be
> complemented with code to relocate to arch/arm/mach-omap2/display.c the
> creation of the platform devices for the HDMI ASoC codec and card drivers. This
> series does not break the HDMI audio functionality in any patch.
>
> Also, the names of the platform devices are changed to give them more logical
> and more descriptive names.
>
> As the commit
>
> commit 14840b9a83c6a56629db2ba0ec247503e975f143
> Author: Ricardo Neri <ricardo.n...@ti.com>
> Date: Tue Nov 6 00:19:17 2012 -0600
>
> OMAPDSS: HDMI: Create platform device for audio support
>
> is reverted in Tomi's git://gitorious.org/linux-omap-dss2/linux.git master
> branch, this series applies cleanly.
>
> Changes from v1:
> *Put in a single series all the patches related to platform device updates.
> *Now HDMI audio works correctly in every patch.
> *Remove reference to the TPD12S015 HDMI companion chip as the ASoC drivers
> are not aware of this and other chips could be used in the future.
>
> Changes from v2:
> *Split in two patches the renaming and the relocation of the platform devices.
> *Create a separate patch to pass only the address offset of the DMA data port
> to the audio interface platform device.
> *Keep the name hdmi-audio-codec to not refer to explicitly to OMAP. The codec
> can be made generic in a different patch series submitted to alsa-devel.
>
> BR,
>
> Ricardo
>
>
> [1]. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg80785.html
> [2]. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg79795.html
>
> Ricardo Neri (5):
> ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers
> ARM: OMAP4: Assign IDs to DSS HDMI devices
> ARM4: OMAP4+: HDMI: Relocate devices for audio codec and card
> ARM: OMAP4+: HDMI: Relocate the device for audio interface
> ARM: OMAP4+: HDMI: Refine the DMA port resource for audio
>
> arch/arm/mach-omap2/board-4430sdp.c | 9 ++---
> arch/arm/mach-omap2/board-omap4panda.c | 9 ++---
> arch/arm/mach-omap2/devices.c | 31 ----------------
> arch/arm/mach-omap2/display.c | 31 ++++++++++++++++
> drivers/video/omap2/dss/hdmi.c | 62 ++++++++++++++++++++++++++++++++
> sound/soc/omap/omap-hdmi-card.c | 4 +--
> sound/soc/omap/omap-hdmi.c | 5 ++-
> sound/soc/omap/omap-hdmi.h | 2 --
> 8 files changed, 103 insertions(+), 50 deletions(-)
>
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio
2013-01-03 17:33 ` [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices " Ricardo Neri
@ 2013-01-04 10:42 ` Mark Brown
2013-01-04 23:19 ` Ricardo Neri
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2013-01-04 10:42 UTC (permalink / raw)
To: Ricardo Neri
Cc: tomi.valkeinen, lrg, tony, peter.ujfalusi, dzuniga, linux-omap,
alsa-devel
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
On Thu, Jan 03, 2013 at 11:33:12AM -0600, Ricardo Neri wrote:
> Just wondering if you had a chance to take a look at these patches.
Don't top post. Whatever patches you're talking about I don't have them
(given that they say "ARM: OMAP4:" I'm likely to have just discarded
them if you sent them to me, people CC me on far too much irrelevant
OMAP stuff).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio
2013-01-04 10:42 ` Mark Brown
@ 2013-01-04 23:19 ` Ricardo Neri
0 siblings, 0 replies; 9+ messages in thread
From: Ricardo Neri @ 2013-01-04 23:19 UTC (permalink / raw)
To: Mark Brown
Cc: tomi.valkeinen, lrg, tony, peter.ujfalusi, dzuniga, linux-omap,
alsa-devel
Hi Mark,
On 01/04/2013 04:42 AM, Mark Brown wrote:
> On Thu, Jan 03, 2013 at 11:33:12AM -0600, Ricardo Neri wrote:
>
>> Just wondering if you had a chance to take a look at these patches.
>
> Don't top post.
Sorry, my bad. Won't do it again.
Whatever patches you're talking about I don't have them
> (given that they say "ARM: OMAP4:" I'm likely to have just discarded
> them if you sent them to me, people CC me on far too much irrelevant
> OMAP stuff).
>
Even though changes involve mostly how and where the platform devices
for OMAP HDMI audio are created, the OMAP HDMI ASoC drivers are modified
as well. Also, you provided feedback in the previous versions. I thought
I should send them to you. I will resend.
BR,
Ricardo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-04 23:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 1:30 [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices for audio Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 1/5] ARM: OMAP4+: HDMI: Rename platform devices for ASoC drivers Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 2/5] ARM: OMAP4: Assign IDs to DSS HDMI devices Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 3/5] ARM4: OMAP4+: HDMI: Relocate devices for audio codec and card Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 4/5] ARM: OMAP4+: HDMI: Relocate the device for audio interface Ricardo Neri
2012-12-18 1:30 ` [PATCH v3 5/5] ARM: OMAP4+: HDMI: Refine the DMA port resource for audio Ricardo Neri
2013-01-03 17:33 ` [PATCH v3 0/5] ARM: OMAP4+: HDMI: Update platform devices " Ricardo Neri
2013-01-04 10:42 ` Mark Brown
2013-01-04 23:19 ` Ricardo Neri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).