Skip to contentSkip to conversation

omap: zoom2: Fix ASoC multi-component build breakage by removing dead code

PATCH In review Jarkko Nikula 6 participants 9 messages Sep 23, 2010 – Oct 1, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 omap: zoom2: Fix ASoC multi-component build breakage by removing dead code

ASoC Multi-Component Support patch removes #if 0 in board-zoom2.c that was used to protect some uncompiling dead code. Remove that code as it seems to be here quite some time since commit 479f12c.

Cc Vikram Pandita <[email protected]>
Cc Tony Lindgren <[email protected]>

---
Sorry for not noticing this before. Somehow my own test config didn't include zoom2 like omap3_defconfig does.

---
 arch/arm/mach-omap2/board-zoom2.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/mach-omap2/board-zoom2.c +0 -12
index efbcd8f..86d4515 100644
@@ -41,10 +41,6 @@ void zoom2_set_hs_extmute(int mute)
 	gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
 }
 
-static struct twl4030_madc_platform_data zoom2_madc_data = {
-	.irq_line	= 1,
-};
-
 static struct twl4030_codec_audio_data zoom2_audio_data = {
 	.audio_mclk = 26000000,
 	.ramp_delay_value = 3,	/* 161 ms */
@@ -62,15 +58,7 @@ static struct twl4030_platform_data zoom2_twldata = {
 	.irq_end	= TWL4030_IRQ_END,
 
 	/* platform_data for children goes here */
-	.bci		= &zoom2_bci_data,
-	.madc		= &zoom2_madc_data,
-	.usb		= &zoom2_usb_data,
-	.gpio		= &zoom2_gpio_data,
-	.keypad		= &zoom2_kp_twl4030_data,
 	.codec		= &zoom2_codec_data,
-	.vmmc1          = &zoom2_vmmc1,
-	.vmmc2          = &zoom2_vmmc2,
-	.vsim           = &zoom2_vsim,
 };
 
 static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals

ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c into arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration for zoom boards.

Cc Vikram Pandita <[email protected]>
Cc Lopez Cruz, Misael <[email protected]>
Cc Jorge Eduardo Candelaria <[email protected]>
Cc Tony Lindgren <[email protected]>

---
I don't have this HW so not tested. This is omap architecture patch but I think this should go together with ASoC Multi-Component.

---
 arch/arm/mach-omap2/board-zoom-peripherals.c |   12 +++++++
 arch/arm/mach-omap2/board-zoom2.c            |   44 --------------------------
 2 files changed, 12 insertions(+), 44 deletions(-)
arch/arm/mach-omap2/board-zoom-peripherals.c +12 -0
index 6b39849..3c65304 100644
@@ -24,6 +24,8 @@
 #include <plat/common.h>
 #include <plat/usb.h>
 
+#include <mach/board-zoom.h>
+
 #include "mux.h"
 #include "hsmmc.h"
 
@@ -188,6 +190,11 @@ static int zoom_twl_gpio_setup(struct device *dev,
 	return 0;
 }
 
+/* EXTMUTE callback function */
+void zoom2_set_hs_extmute(int mute)
+{
+	gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
+}
 
 static int zoom_batt_table[] = {
 /* 0 C*/
@@ -257,6 +264,11 @@ static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {
 
 static int __init omap_i2c_init(void)
 {
+	if (machine_is_omap_zoom2()) {
+		zoom_audio_data.ramp_delay_value = 3;	/* 161 ms */
+		zoom_audio_data.hs_extmute = 1;
+		zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
+	}
 	omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo,
 			ARRAY_SIZE(zoom_i2c_boardinfo));
 	omap_register_i2c_bus(2, 400, NULL, 0);
arch/arm/mach-omap2/board-zoom2.c +0 -44

56 lines not on this page · raw message

Signature · 1 line
1.7.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals

Quoted 6 lines · Jarkko Nikula

ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c into arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration for zoom boards.

#3 lore raw

RE: [PATCH 2/2] omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals

In reply to Jarkko Nikula

Hi Jarkko,

Quoted 6 lines

ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c into
arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration for zoom boards.

Quoted 7 lines
Cc Vikram Pandita <[email protected]>
Cc Lopez Cruz, Misael <[email protected]>
Cc Jorge Eduardo Candelaria <[email protected]>
Cc Tony Lindgren <[email protected]>

---
I don't have this HW so not tested.

Tested on zoom2 using the 2 patches of your series, compilation break is gone and audio works fine.

Thanks,
-Misael

#4 lore raw

Re: [PATCH 2/2] omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals

Quoted 15 lines · Misael

Hi Jarkko,

Quoted 6 lines

ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c into
arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration for zoom boards.

Quoted 7 lines
Cc Vikram Pandita <[email protected]>
Cc Lopez Cruz, Misael <[email protected]>
Cc Jorge Eduardo Candelaria <[email protected]>
Cc Tony Lindgren <[email protected]>

---
I don't have this HW so not tested.

Quoted 5 lines

Tested on zoom2 using the 2 patches of your series, compilation break is gone and audio works fine.

Thanks,
-Misael

Applied, and manually added your Tested-by:

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
#5 lore raw

RE: [PATCH 2/2] omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals

Quoted 21 lines · Liam Girdwood
Quoted 20 lines · Misael

Hi Jarkko,

Quoted 8 lines

ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c
into
arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration
for zoom boards.

Quoted 7 lines
Cc Vikram Pandita <[email protected]>
Cc Lopez Cruz, Misael <[email protected]>
Cc Jorge Eduardo Candelaria <[email protected]>
Cc Tony Lindgren <[email protected]>

---
I don't have this HW so not tested.

Tested on zoom2 using the 2 patches of your series, compilation break is gone and audio works fine.

Quoted 8 lines
Quoted 2 lines

Thanks,
-Misael

Applied, and manually added your Tested-by:

Thanks

Liam

Misael, Liam,

Sorry I noticed this patch only now. I have a minor comment on the patch:

Specifically, the part below

+ if (machine_is_omap_zoom2()) {
+ zoom_audio_data.ramp_delay_value = 3; /* 161 ms */
+ zoom_audio_data.hs_extmute = 1;
+ zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
+ }

Isn't the audio on a zoom2/zoom3/3630 SDP the same? (Or at least the same on a zoom2 and zoom3)? If so, we could probably get rid of the machine_is_omap_zoom2() check, right?

- Anand

#6 lore raw

RE: [PATCH 2/2] omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals

Quoted 44 lines
Quoted 11 lines · Liam Girdwood
Quoted 10 lines · Misael

Hi Jarkko,

Quoted 8 lines

ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c
into
arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration
for zoom boards.

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Cc Vikram Pandita <[email protected]>
Cc Lopez Cruz, Misael <[email protected]>
Cc Jorge Eduardo Candelaria <[email protected]>
Cc Tony Lindgren <[email protected]>

---
I don't have this HW so not tested.

Tested on zoom2 using the 2 patches of your series, compilation break

is

Quoted 10 lines
Quoted 4 lines

gone and audio works fine.

Thanks,
-Misael

Applied, and manually added your Tested-by:

Thanks

Liam

Misael, Liam,

Sorry I noticed this patch only now. I have a minor comment on the patch:

Specifically, the part below

arch/arm/mach-omap2/board-zoom-peripherals.c +5 -0
+	if (machine_is_omap_zoom2()) {
+		zoom_audio_data.ramp_delay_value = 3;	/* 161 ms */
+		zoom_audio_data.hs_extmute = 1;
+		zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
+	}
Quoted 2 lines

Isn't the audio on a zoom2/zoom3/3630 SDP the same? (Or at least the same on a zoom2 and zoom3)?

Yes, at least zoom2 and zoom3 are the same for audio.

Quoted 2 lines

If so, we could probably get rid of the
machine_is_omap_zoom2() check, right?

I think it'd better to add checks for the machines supported by the driver, so it fails nicely with unsupported ones. I'll go thru the differences between our boards and send a patch soon.

Quoted 1 line

- Anand

Thanks,
-Misa

maintainer Acked-by on v1 1/2
#8 lore raw
In reply to Jarkko Nikula
Quoted 6 lines · Jarkko Nikula

ASoC Multi-Component Support patch removes #if 0 in board-zoom2.c that was used to protect some uncompiling dead code. Remove that code as it seems to be here quite some time since commit 479f12c.

I assume you guys want to merge this via ASoC patches.