On 2012-11-16 03:36, Ricardo Neri wrote:
This relocates and renames the platform devices for ASoC HDMI drivers to give them a more logical structure.
The previous omap-hdmi-audio device is renamed as omap-hdmi-audio-card and is relocated to the SDP4430 and Pandaboard board files. This is to better illustrate the fact that it describes the whole HDMI audio functionality on such boards, including the companion chip.
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.
And same thing here as with the previous patch. Do the move and rename in separate patches for clarity.
Signed-off-by: Ricardo Neri ricardo.neri@ti.com
arch/arm/mach-omap2/board-4430sdp.c | 6 ++++++ arch/arm/mach-omap2/board-omap4panda.c | 6 ++++++ arch/arm/mach-omap2/devices.c | 17 ----------------- drivers/video/omap2/dss/hdmi.c | 2 +- sound/soc/omap/omap-hdmi-card.c | 4 ++-- sound/soc/omap/omap-hdmi.c | 2 +- 6 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 3669c12..97bdff3 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -388,6 +388,11 @@ static struct platform_device sdp4430_hdmi_audio_codec = { .id = -1, };
+static struct platform_device sdp4430_hdmi_audio_card = {
- .name = "omap-hdmi-audio-card",
- .id = -1,
+};
static struct omap_abe_twl6040_data sdp4430_abe_audio_data = { .card_name = "SDP4430", .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, @@ -423,6 +428,7 @@ static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_dmic_codec, &sdp4430_abe_audio, &sdp4430_hdmi_audio_codec,
- &sdp4430_hdmi_audio_card,
};
I don't know anything at all about the audio drivers, but this doesn't feel good to me. The HDMI audio is tied to the HDMI video, both of which are parts of OMAP SoC. So if you have two boards with HDMI video (and thus audio), the device data related to HDMI video and audio are identical except for a few HW details like the GPIOs for the TPD chip.
So is there any reason to add hdmi audio devices in each board file? It sounds to me that a common place to add the device for all boards would make more sense. This could, perhaps, be arch/arm/mach-omap2/display.c which handles adding the HDMI device, or some other similar file (although you just removed it from such a file, the devices.c...).
And actually, why isn't the card driver added in the hdmi video driver, like the omap-hdmi-audio-dai?
You say the omap-hdmi-audio-card covers also the TPD chip, but why does HDMI audio even need to cover that chip? It has no relevance to the audio side, as long as the video driver enables it properly, right?
Perhaps I'm missing something here, as I don't have any knowledge of the audio side, though. What do the different audio devices represent?
So I'm not saying your approach is wrong, I just don't understand it =).
Tomi