arm: tegra: HDA driver support
Dara Ramesh [Thu, 3 Feb 2011 05:08:39 +0000 (10:08 +0530)]
Adding HDA audio driver support for tegra

Original-Change-Id: I484177b4c8464d7e0084f60a2c51caa388ecae98
Reviewed-on: http://git-master/r/17871
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Tested-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com>
Original-Change-Id: I737871669443db731987675f5cb89c377b272f2f

Rebase-Id: Rdc34ed6ad8a44759b501d9fb638b0ee76f553203

arch/arm/mach-tegra/board-cardhu-pinmux.c
arch/arm/mach-tegra/board-cardhu.c

index 6b91682..b63406b 100644 (file)
@@ -335,12 +335,23 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux[] = {
        DEFAULT_PINMUX(DAP1_SCLK,       I2S0,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(CLK1_REQ,        DAP,             NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(CLK1_OUT,        EXTPERIPH1,      NORMAL,    NORMAL,     INPUT),
+#ifdef CONFIG_SND_HDA_CODEC_REALTEK
+       DEFAULT_PINMUX(SPDIF_IN,        DAP2,            PULL_DOWN, NORMAL,     INPUT),
+#else
        DEFAULT_PINMUX(SPDIF_IN,        SPDIF,           NORMAL,    NORMAL,     INPUT),
+#endif
        DEFAULT_PINMUX(SPDIF_OUT,       SPDIF,           NORMAL,    NORMAL,     OUTPUT),
+#ifdef CONFIG_SND_HDA_CODEC_REALTEK
+       DEFAULT_PINMUX(DAP2_FS,         HDA,             PULL_DOWN, NORMAL,     INPUT),
+       DEFAULT_PINMUX(DAP2_DIN,        HDA,             PULL_DOWN, NORMAL,     INPUT),
+       DEFAULT_PINMUX(DAP2_DOUT,       HDA,             PULL_DOWN, NORMAL,     INPUT),
+       DEFAULT_PINMUX(DAP2_SCLK,       HDA,             PULL_DOWN, NORMAL,     INPUT),
+#else
        DEFAULT_PINMUX(DAP2_FS,         I2S1,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(DAP2_DIN,        I2S1,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(DAP2_DOUT,       I2S1,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(DAP2_SCLK,       I2S1,            NORMAL,    NORMAL,     INPUT),
+#endif
        DEFAULT_PINMUX(SPI2_MOSI,       SPI6,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(SPI2_MISO,       SPI6,            NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(SPI2_CS0_N,      SPI6,            NORMAL,    NORMAL,     INPUT),
index 2302223..6aa1aac 100644 (file)
@@ -141,7 +141,8 @@ static __initdata struct tegra_clk_init_table cardhu_clk_init_table[] = {
        { "uartd",      "pll_p",        216000000,      false},
        { "uarte",      "pll_p",        216000000,      false},
        { "pll_m",      NULL,           0,              true},
-       { "hda2codec_2x", "pll_p",      48000000,       false },
+       { "hda",        "pll_p",        108000000,      false},
+       { "hda2codec_2x","pll_p",       48000000,       false},
        { "pll_p_out4", "pll_p",        24000000,       true },
        { "pwm",        "clk_32k",      32768,          false},
        { "blink",      "clk_32k",      32768,          true},
@@ -243,6 +244,9 @@ static struct platform_device *cardhu_devices[] __initdata = {
 #if ENABLE_USB_HOST
        &tegra_ehci2_device,
 #endif
+#if defined(CONFIG_SND_HDA_TEGRA)
+       &tegra_hda_device,
+#endif
 #if defined(CONFIG_TEGRA_IOVMM_SMMU)
        &tegra_smmu_device,
 #endif