asoc: tegra: rt5639/40: Add irq based HS detection
Manoj Gangwal [Thu, 5 Dec 2013 11:29:27 +0000 (16:29 +0530)]
Bug 1418744
Bug 1418174

Change-Id: I430ec14b74f0d83a11f48737cc29e736a223a2a0
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/339121
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

sound/soc/tegra/tegra_rt5639.c
sound/soc/tegra/tegra_rt5640.c

index 149491f..99537dc 100644 (file)
@@ -1081,6 +1081,11 @@ static int tegra_rt5639_driver_probe(struct platform_device *pdev)
                goto err_unregister_card;
        }
 
+       if (pdata->use_codec_jd_irq) {
+               codec = card->rtd[DAI_LINK_HIFI].codec;
+               rt5639_irq_jd_reg_init(codec);
+       }
+
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
        ret = tegra_asoc_utils_set_parent(&machine->util_data,
                                pdata->i2s_param[HIFI_CODEC].is_i2s_master);
index 67bed11..224e629 100644 (file)
@@ -1068,6 +1068,12 @@ static int tegra_rt5640_driver_probe(struct platform_device *pdev)
                goto err_unregister_card;
        }
 
+       if (pdata->use_codec_jd_irq) {
+               codec = card->rtd[DAI_LINK_HIFI].codec;
+               if (!strncmp(pdata->codec_name, "rt5639", 6))
+                       rt5639_irq_jd_reg_init(codec);
+       }
+
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
        ret = tegra_asoc_utils_set_parent(&machine->util_data,
                                pdata->i2s_param[HIFI_CODEC].is_i2s_master);