asoc: codecs: enable DVT(P1640) of tegratab to use ALC5639
Simon Je [Mon, 20 May 2013 21:19:57 +0000 (06:19 +0900)]
Bug 1227518
Bug 1287224

Change-Id: Icdd3de929f9d6d9e6fec4a3aab0142d6d8250324
Signed-off-by: Simon Je <sje@nvidia.com>
Reviewed-on: http://git-master/r/230940
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>

arch/arm/mach-tegra/board-tegratab.c
sound/soc/codecs/Makefile

index 622628b..ad8c19a 100644 (file)
@@ -218,9 +218,20 @@ static struct i2c_board_info __initdata rt5640_board_info = {
        I2C_BOARD_INFO("rt5640", 0x1c),
 };
 
+static struct i2c_board_info __initdata rt5639_board_info = {
+       I2C_BOARD_INFO("rt5639", 0x1c),
+};
+
 static void tegratab_i2c_init(void)
 {
-       i2c_register_board_info(0, &rt5640_board_info, 1);
+       struct board_info board_info;
+
+       tegra_get_board_info(&board_info);
+
+       if (board_info.board_id == BOARD_P1640)
+               i2c_register_board_info(0, &rt5639_board_info, 1);
+       else
+               i2c_register_board_info(0, &rt5640_board_info, 1);
 }
 
 static struct platform_device *tegratab_uart_devices[] __initdata = {
@@ -528,8 +539,13 @@ static void tegratab_audio_init(void)
 
        tegra_get_board_info(&board_info);
 
-       tegratab_audio_pdata.codec_name = "rt5640.0-001c";
-       tegratab_audio_pdata.codec_dai_name = "rt5640-aif1";
+       if (board_info.board_id == BOARD_P1640) {
+               tegratab_audio_pdata.codec_name = "rt5639.0-001c";
+               tegratab_audio_pdata.codec_dai_name = "rt5639-aif1";
+       } else {
+               tegratab_audio_pdata.codec_name = "rt5640.0-001c";
+               tegratab_audio_pdata.codec_dai_name = "rt5640-aif1";
+       }
 }
 
 
index da16bac..e242e5a 100644 (file)
@@ -98,7 +98,7 @@ snd-soc-wm9705-objs := wm9705.o
 snd-soc-wm9712-objs := wm9712.o
 snd-soc-wm9713-objs := wm9713.o
 snd-soc-wm-hubs-objs := wm_hubs.o
-snd-soc-rt5639-objs := rt5639.o
+snd-soc-rt5639-objs := rt5639.o rt56xx_ioctl.o rt5639_ioctl.o
 snd-soc-rt5640-objs := rt5640.o
 
 # Amp