omap: zoom2: Fix ASoC multi-component build breakage by removing dead code
Subsystems (3)
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.
---
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
@@ -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
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.
---
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
@@ -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
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.cintoarch/arm/mach-omap2/board-zoom2.c. However, that code should go toboard-zoom-peripherals.cinstead as there is common code and registration for zoom boards.Signed-off-by Jarkko Nikula <[email protected]>
RE: [PATCH 2/2] omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals
In reply to Jarkko NikulaHi Jarkko,
Quoted 6 lines
ASoC Multi-Component Support moves some code from
sound/soc/omap/zoom2.cintoarch/arm/mach-omap2/board-zoom2.c. However, that code should go toboard-zoom-peripherals.cinstead as there is common code and registration for zoom boards.
Quoted 7 lines
Signed-off-by Jarkko Nikula <[email protected]>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
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.cintoarch/arm/mach-omap2/board-zoom2.c. However, that code should go toboard-zoom-peripherals.cinstead as there is common code and registration for zoom boards.Quoted 7 lines
Signed-off-by Jarkko Nikula <[email protected]>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
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
intoarch/arm/mach-omap2/board-zoom2.c. However, that code should go toboard-zoom-peripherals.cinstead as there is common code and registration
for zoom boards.Quoted 7 lines
Signed-off-by Jarkko Nikula <[email protected]>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,
-MisaelApplied, 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
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
intoarch/arm/mach-omap2/board-zoom2.c. However, that code should go toboard-zoom-peripherals.cinstead as there is common code and registration
for zoom boards.Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Signed-off-by Jarkko Nikula <[email protected]>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,
-MisaelApplied, 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
Quoted 5 lines · Jarkko Nikula
ASoC Multi-Component Support patch removes #if 0 in
board-zoom2.cthat was used to protect some uncompiling dead code. Remove that code as it seems to be here quite some time since commit 479f12c.Signed-off-by Jarkko Nikula <[email protected]>
Quoted 6 lines · Jarkko Nikula
ASoC Multi-Component Support patch removes #if 0 in
board-zoom2.cthat was used to protect some uncompiling dead code. Remove that code as it seems to be here quite some time since commit 479f12c.Signed-off-by Jarkko Nikula <[email protected]>Cc Vikram Pandita <[email protected]>
I assume you guys want to merge this via ASoC patches.