]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
soc: tegra: max98090: Add K3.10 support
authorJohnny Qiu <joqiu@nvidia.com>
Wed, 27 Nov 2013 12:18:53 +0000 (12:18 +0000)
committerWinnie Hsu <whsu@nvidia.com>
Sat, 8 Feb 2014 01:44:15 +0000 (17:44 -0800)
Bug 1405054
Bug 1408474

Change-Id: Icbf29d222eefc76be061a5d2bc3b085e3325e3ca
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/345833
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>
Tested-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/362912
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Vikram Fugro <vfugro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
sound/soc/tegra/tegra_max98090.c

index 3971bc0cb7a5e51bd97aee0391b125a480bc26c7..8c392ca84e6dcb2f9f79de12ae1eeaf8176fc1d7 100644 (file)
 #endif
 #define DRV_NAME "tegra-snd-max98090"
 
+#ifndef __devinit
+#define __devinit
+#endif
+#ifndef __devexit
+#define __devexit
+#endif
+#ifndef __devexit_p
+#define __devexit_p(x) (x)
+#endif
+
 #define GPIO_SPKR_EN    BIT(0)
 #define GPIO_HP_MUTE    BIT(1)
 #define GPIO_INT_MIC_EN BIT(2)
@@ -487,7 +497,7 @@ static int tegra_max98090_startup(struct snd_pcm_substream *substream)
                tegra30_dam_enable_clock(i2s->dam_ifc);
 
                tegra30_ahub_set_rx_cif_source(TEGRA30_AHUB_RXCIF_DAM0_RX1 +
-                               (i2s->dam_ifc*2), i2s->txcif);
+                               (i2s->dam_ifc*2), i2s->playback_fifo_cif);
 
                /*
                *make the dam tx to i2s rx connection if this is the only
@@ -529,7 +539,7 @@ static int tegra_max98090_startup(struct snd_pcm_substream *substream)
                tegra30_dam_enable_clock(i2s->call_record_dam_ifc);
 
                /* setup the connections for voice call record */
-               tegra30_ahub_unset_rx_cif_source(i2s->rxcif);
+               tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif);
 #if defined(CONFIG_ARCH_TEGRA_14x_SOC)
                /* configure the dam */
                tegra_max98090_set_dam_cif(i2s->call_record_dam_ifc,
@@ -556,7 +566,7 @@ static int tegra_max98090_startup(struct snd_pcm_substream *substream)
                tegra30_ahub_set_rx_cif_source(TEGRA30_AHUB_RXCIF_DAM0_RX1 +
                        (i2s->call_record_dam_ifc*2),
                        TEGRA30_AHUB_TXCIF_I2S0_TX0 + codec_info->i2s_id);
-               tegra30_ahub_set_rx_cif_source(i2s->rxcif,
+               tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif,
                        TEGRA30_AHUB_TXCIF_DAM0_TX0 +
                        i2s->call_record_dam_ifc);
 
@@ -612,7 +622,7 @@ static void tegra_max98090_shutdown(struct snd_pcm_substream *substream)
                        TEGRA30_DAM_DISABLE, TEGRA30_DAM_CHIN0_SRC);
 
                /* disconnect the ahub connections*/
-               tegra30_ahub_unset_rx_cif_source(i2s->rxcif);
+               tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif);
                tegra30_ahub_unset_rx_cif_source(TEGRA30_AHUB_RXCIF_DAM0_RX0 +
                        (i2s->call_record_dam_ifc*2));
                tegra30_ahub_unset_rx_cif_source(TEGRA30_AHUB_RXCIF_DAM0_RX1 +
@@ -1106,6 +1116,7 @@ static int tegra_max98090_resume_pre(struct snd_soc_card *card)
        struct snd_soc_jack_gpio *gpio = &tegra_max98090_hp_jack_gpio;
        struct tegra_max98090 *machine = snd_soc_card_get_drvdata(card);
        int i, suspend_allowed = 1;
+       int ret;
 
        for (i = 0; i < machine->pcard->num_links; i++) {
                if (machine->pcard->dai_link[i].ignore_suspend) {
@@ -1128,9 +1139,9 @@ static int tegra_max98090_resume_pre(struct snd_soc_card *card)
                }
 
                if (machine->avdd_aud_reg)
-                       regulator_enable(machine->avdd_aud_reg);
+                       ret = regulator_enable(machine->avdd_aud_reg);
                if (machine->vdd_sw_1v8_reg)
-                       regulator_enable(machine->vdd_sw_1v8_reg);
+                       ret = regulator_enable(machine->vdd_sw_1v8_reg);
        }
 
        return 0;
@@ -1264,9 +1275,9 @@ static __devinit int tegra_max98090_driver_probe(struct platform_device *pdev)
        }
 
        if (machine->vdd_sw_1v8_reg)
-               regulator_enable(machine->vdd_sw_1v8_reg);
+               ret = regulator_enable(machine->vdd_sw_1v8_reg);
        if (machine->avdd_aud_reg)
-               regulator_enable(machine->avdd_aud_reg);
+               ret = regulator_enable(machine->avdd_aud_reg);
 
 
 #ifdef CONFIG_SWITCH
@@ -1314,12 +1325,18 @@ static __devinit int tegra_max98090_driver_probe(struct platform_device *pdev)
 
        tegra_max98090_dai[DAI_LINK_HIFI].cpu_dai_name =
        tegra_max98090_i2s_dai_name[machine->codec_info[HIFI_CODEC].i2s_id];
+       tegra_max98090_dai[DAI_LINK_HIFI].platform_name =
+       tegra_max98090_i2s_dai_name[machine->codec_info[HIFI_CODEC].i2s_id];
 
        tegra_max98090_dai[DAI_LINK_HIFI_MAX97236].cpu_dai_name =
        tegra_max98090_i2s_dai_name[machine->codec_info[HIFI_CODEC].i2s_id];
+       tegra_max98090_dai[DAI_LINK_HIFI_MAX97236].platform_name =
+       tegra_max98090_i2s_dai_name[machine->codec_info[HIFI_CODEC].i2s_id];
 
        tegra_max98090_dai[DAI_LINK_BTSCO].cpu_dai_name =
        tegra_max98090_i2s_dai_name[machine->codec_info[BT_SCO].i2s_id];
+       tegra_max98090_dai[DAI_LINK_BTSCO].platform_name =
+       tegra_max98090_i2s_dai_name[machine->codec_info[BT_SCO].i2s_id];
 
        card->dapm.idle_bias_off = 1;
        ret = snd_soc_register_card(card);