asoc: tegra: add use_codec_jd_irq to allow AP to be able to use codec irq
Simon Je [Tue, 11 Jun 2013 06:24:53 +0000 (15:24 +0900)]
Bug 1287224

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

arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h
sound/soc/tegra/tegra_rt5640.c

index d65077f..627a93f 100644 (file)
@@ -56,6 +56,7 @@ struct tegra_asoc_platform_data {
        int gpio_codec2;
        int gpio_codec3;
        bool micbias_gpio_absent;
+       bool use_codec_jd_irq;
        unsigned int debounce_time_hp;
        bool edp_support;
        unsigned int edp_states[TEGRA_SPK_EDP_NUM_STATES];
index 7b3ed82..93c3c5f 100644 (file)
@@ -1031,6 +1031,12 @@ static __devinit 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);