summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorVinod G <vinodg@nvidia.com>2011-03-03 14:57:08 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:52:27 -0700
commitbbb78899bfdd81ecff3ba75e6e0b8418001a9af0 (patch)
treee2d8dae068a012b8c93792335e13de034ac182b4 /sound
parent5be1dd4dd04db4a4c4e8004e364d504bf9f56857 (diff)
arm: tegra: Merge changes from main branch
Changes specific to separate the codecs based on board are integrated from rel-2010-11 branch Original-Change-Id: I9fe2e05d5347f02cd3047f453d03437b735e2c4b Reviewed-on: http://git-master/r/21562 Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Tested-by: Scott Peterson <speterson@nvidia.com> Change-Id: I06473d906c1043a8fcc511cd66cfb57e311afdae
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_i2s.c18
-rw-r--r--sound/soc/tegra/tegra_soc_wm8903.c20
2 files changed, 31 insertions, 7 deletions
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c
index f96cfe6e0abf..cb2904608697 100644
--- a/sound/soc/tegra/tegra_i2s.c
+++ b/sound/soc/tegra/tegra_i2s.c
@@ -378,7 +378,11 @@ static struct snd_soc_dai_ops tegra_i2s_dai_ops = {
struct snd_soc_dai tegra_i2s_dai[] = {
{
.name = "tegra-i2s-1",
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
.id = 0,
+#else
+ .id = 1,
+#endif
.probe = tegra_i2s_probe,
.suspend = tegra_i2s_suspend,
.resume = tegra_i2s_resume,
@@ -396,6 +400,7 @@ struct snd_soc_dai tegra_i2s_dai[] = {
},
.ops = &tegra_i2s_dai_ops,
},
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
{
.name = "tegra-i2s-2",
.id = 1,
@@ -416,6 +421,7 @@ struct snd_soc_dai tegra_i2s_dai[] = {
},
.ops = &tegra_i2s_dai_ops,
},
+#endif
};
EXPORT_SYMBOL_GPL(tegra_i2s_dai);
@@ -424,6 +430,7 @@ static int tegra_i2s_driver_probe(struct platform_device *pdev)
int err = 0;
struct resource *res, *mem;
struct tegra_i2s_info *info;
+ int i = 0;
struct clk *pll_a_out0_clk =
clk_get_sys(NULL, "pll_a_out0");
int i = 0;
@@ -485,6 +492,16 @@ static int tegra_i2s_driver_probe(struct platform_device *pdev)
clk_enable(info->i2s_clk);
clk_set_rate(info->i2s_clk, info->pdata->i2s_clk_rate);
+#if !defined(CONFIG_ARCH_TEGRA_2x_SOC)
+ info->pmc_clk = clk_get_sys("clk_out_1", "extern1");
+ if (IS_ERR_OR_NULL(info->pmc_clk))
+ {
+ dev_err(&pdev->dev, "can't get pmc clock\n");
+ goto fail_unmap_mem;
+ }
+ clk_enable(info->pmc_clk);
+#endif
+
info->bit_format = TEGRA_AUDIO_BIT_FORMAT_DEFAULT;
if (info->pdata->mode == I2S_BIT_FORMAT_DSP)
info->bit_format = TEGRA_AUDIO_BIT_FORMAT_DSP;
@@ -512,6 +529,7 @@ fail_release_mem:
release_mem_region(mem->start, resource_size(mem));
fail:
kfree(info);
+
return err;
}
diff --git a/sound/soc/tegra/tegra_soc_wm8903.c b/sound/soc/tegra/tegra_soc_wm8903.c
index 27883f5e74ef..1c99b768e3ee 100644
--- a/sound/soc/tegra/tegra_soc_wm8903.c
+++ b/sound/soc/tegra/tegra_soc_wm8903.c
@@ -4,15 +4,19 @@
* (c) 2010-2011 Nvidia Graphics Pvt. Ltd.
* http://www.nvidia.com
*
- * Copyright 2007 Wolfson Microelectronics PLC.
- * Author: Graeme Gregory
- * graeme.gregory@wolfsonmicro.com or linux@wolfsonmicro.com
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
*
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "tegra_soc.h"
@@ -490,6 +494,7 @@ static struct snd_soc_dai_link tegra_soc_dai[] = {
.init = tegra_codec_init,
.ops = &tegra_hifi_ops,
},
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
{
.name = "Tegra-generic",
.stream_name = "Tegra Generic Voice",
@@ -506,6 +511,7 @@ static struct snd_soc_dai_link tegra_soc_dai[] = {
.init = tegra_codec_init,
.ops = &tegra_spdif_ops,
},
+#endif
};
static struct tegra_audio_data audio_data = {