summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-04-25 17:45:00 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:56:21 -0700
commit85262834e1eec3b6f88292d9a893091362fe6076 (patch)
tree7268609071159a240df4b8264945011ce5e0f09d /sound
parent998ffd3922224bfc0b4fb4676d43979563e3bf8d (diff)
sound: Changes for Tegra3
Change-Id: I25391126c593bd4738800c03bf3a65a0aa62ba92
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_soc_wm8753.c20
-rw-r--r--sound/soc/tegra/tegra_soc_wm8903.c22
2 files changed, 30 insertions, 12 deletions
diff --git a/sound/soc/tegra/tegra_soc_wm8753.c b/sound/soc/tegra/tegra_soc_wm8753.c
index 87b1b0655ad7..44380ee4649f 100644
--- a/sound/soc/tegra/tegra_soc_wm8753.c
+++ b/sound/soc/tegra/tegra_soc_wm8753.c
@@ -160,18 +160,22 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
unsigned int value;
int err;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
if (tegra_das_is_port_master(tegra_audio_codec_type_hifi))
dai_flag |= SND_SOC_DAIFMT_CBM_CFM;
else
+#endif
dai_flag |= SND_SOC_DAIFMT_CBS_CFS;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
data_fmt = tegra_das_get_codec_data_fmt(tegra_audio_codec_type_hifi);
/* We are supporting DSP and I2s format for now */
- if (data_fmt & dac_dap_data_format_i2s)
- dai_flag |= SND_SOC_DAIFMT_I2S;
- else
+ if (data_fmt & dac_dap_data_format_dsp)
dai_flag |= SND_SOC_DAIFMT_DSP_A;
+ else
+#endif
+ dai_flag |= SND_SOC_DAIFMT_I2S;
err = snd_soc_dai_set_fmt(codec_dai, dai_flag);
if (err < 0) {
@@ -323,18 +327,22 @@ static int tegra_voice_hw_params(struct snd_pcm_substream *substream,
int dai_flag = 0, sys_clk;
int err;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
if (tegra_das_is_port_master(tegra_audio_codec_type_bluetooth))
dai_flag |= SND_SOC_DAIFMT_CBM_CFM;
else
+#endif
dai_flag |= SND_SOC_DAIFMT_CBS_CFS;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
data_fmt = tegra_das_get_codec_data_fmt(tegra_audio_codec_type_bluetooth);
/* We are supporting DSP and I2s format for now */
- if (data_fmt & dac_dap_data_format_dsp)
- dai_flag |= SND_SOC_DAIFMT_DSP_A;
- else
+ if (data_fmt & dac_dap_data_format_i2s)
dai_flag |= SND_SOC_DAIFMT_I2S;
+ else
+#endif
+ dai_flag |= SND_SOC_DAIFMT_DSP_A;
err = snd_soc_dai_set_fmt(codec_dai, dai_flag);
if (err < 0) {
diff --git a/sound/soc/tegra/tegra_soc_wm8903.c b/sound/soc/tegra/tegra_soc_wm8903.c
index 057f78b28cde..883941c119c0 100644
--- a/sound/soc/tegra/tegra_soc_wm8903.c
+++ b/sound/soc/tegra/tegra_soc_wm8903.c
@@ -80,18 +80,22 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
int dai_flag = 0, sys_clk;
int err;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
if (tegra_das_is_port_master(tegra_audio_codec_type_hifi))
dai_flag |= SND_SOC_DAIFMT_CBM_CFM;
else
+#endif
dai_flag |= SND_SOC_DAIFMT_CBS_CFS;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
data_fmt = tegra_das_get_codec_data_fmt(tegra_audio_codec_type_hifi);
/* We are supporting DSP and I2s format for now */
- if (data_fmt & dac_dap_data_format_i2s)
- dai_flag |= SND_SOC_DAIFMT_I2S;
- else
+ if (data_fmt & dac_dap_data_format_dsp)
dai_flag |= SND_SOC_DAIFMT_DSP_A;
+ else
+#endif
+ dai_flag |= SND_SOC_DAIFMT_I2S;
err = snd_soc_dai_set_fmt(codec_dai, dai_flag);
if (err < 0) {
@@ -220,18 +224,22 @@ static int tegra_voice_hw_params(struct snd_pcm_substream *substream,
int dai_flag = 0, sys_clk;
int err;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
if (tegra_das_is_port_master(tegra_audio_codec_type_bluetooth))
dai_flag |= SND_SOC_DAIFMT_CBM_CFM;
else
+#endif
dai_flag |= SND_SOC_DAIFMT_CBS_CFS;
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
data_fmt = tegra_das_get_codec_data_fmt(tegra_audio_codec_type_bluetooth);
/* We are supporting DSP and I2s format for now */
- if (data_fmt & dac_dap_data_format_dsp)
- dai_flag |= SND_SOC_DAIFMT_DSP_A;
- else
+ if (data_fmt & dac_dap_data_format_i2s)
dai_flag |= SND_SOC_DAIFMT_I2S;
+ else
+#endif
+ dai_flag |= SND_SOC_DAIFMT_DSP_A;
err = snd_soc_dai_set_fmt(codec_dai, dai_flag);
if (err < 0) {
@@ -474,6 +482,7 @@ static int tegra_codec_init(struct snd_soc_codec *codec)
int err = 0;
if (!audio_data->init_done) {
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
audio_data->dap_mclk = tegra_das_get_dap_mclk();
if (!audio_data->dap_mclk) {
pr_err("Failed to get dap mclk \n");
@@ -481,6 +490,7 @@ static int tegra_codec_init(struct snd_soc_codec *codec)
return err;
}
clk_enable(audio_data->dap_mclk);
+#endif
/* Add tegra specific widgets */
snd_soc_dapm_new_controls(codec, tegra_dapm_widgets,