diff options
author | Vijay Mali <vmali@nvidia.com> | 2013-01-31 16:02:15 +0530 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2013-02-04 20:13:35 -0800 |
commit | 7424ad0dd6099b0021a7ec8beee4f7684ad69a9e (patch) | |
tree | 9669a9345d6b861695026ea4c0ac7099846fda39 | |
parent | 202e54a9c315105ae44ccd42faa90dcb1c9434b0 (diff) |
asoc: tegra: aic326x: Fix build break and cleanup
Fix build break for cardhu where DAM coefficient
programming is not supported. Add appropriate check for
compilation.
Cleanup - remove DAM shutdown sequence
Bug 1179798
Change-Id: Ia12dcbd1eb45b27d18ae2a2acb6d5554256cc7f9
Signed-off-by: Vijay Mali <vmali@nvidia.com>
Reviewed-on: http://git-master/r/195949
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Scott Peterson <speterson@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
-rw-r--r-- | sound/soc/tegra/tegra_aic326x.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/sound/soc/tegra/tegra_aic326x.c b/sound/soc/tegra/tegra_aic326x.c index d5fcd99fbc1b..a5ab8c1140d4 100644 --- a/sound/soc/tegra/tegra_aic326x.c +++ b/sound/soc/tegra/tegra_aic326x.c @@ -3,7 +3,7 @@ * * Author: Vinod G. <vinodg@nvidia.com> * - * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. @@ -298,9 +298,6 @@ static int tegra_aic326x_hw_params(struct snd_pcm_substream *substream, struct tegra_asoc_platform_data *pdata = machine->pdata; int srate, mclk, sample_size, i2s_daifmt; int err, rate; -#ifndef CONFIG_ARCH_TEGRA_2x_SOC - struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(cpu_dai); -#endif switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: @@ -384,12 +381,7 @@ static int tegra_aic326x_hw_params(struct snd_pcm_substream *substream, dev_err(card->dev, "failed to set dac-dap path\n"); return err; } -#else /*assumes tegra3*/ - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && i2s->is_dam_used) - tegra_aic326x_set_dam_cif(i2s->dam_ifc, srate, - params_channels(params), sample_size, 0, 0, 0, 0); #endif - return 0; } @@ -611,7 +603,7 @@ static int tegra_aic326x_startup(struct snd_pcm_substream *substream) i2s->call_record_dam_ifc2); tegra30_ahub_set_rx_cif_source(i2s->rxcif, TEGRA30_AHUB_TXCIF_DAM0_TX0 + i2s->call_record_dam_ifc); - +#ifndef CONFIG_ARCH_TEGRA_3x_SOC /* Configure DAM0 for SRC */ if (bb_info->rate != hifi_info->rate) { tegra30_dam_write_coeff_ram(i2s->call_record_dam_ifc, @@ -625,7 +617,7 @@ static int tegra_aic326x_startup(struct snd_pcm_substream *substream) bb_info->rate, hifi_info->rate); } - +#endif /* enable the dam */ tegra30_dam_enable(i2s->call_record_dam_ifc, TEGRA30_DAM_ENABLE, TEGRA30_DAM_CHIN1); @@ -652,22 +644,10 @@ static void tegra_aic326x_shutdown(struct snd_pcm_substream *substream) return; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - /* disable the dam*/ - tegra30_dam_enable(i2s->dam_ifc, TEGRA30_DAM_DISABLE, - TEGRA30_DAM_CHIN1); - - /* disconnect the ahub connections*/ - tegra30_ahub_unset_rx_cif_source(TEGRA30_AHUB_RXCIF_DAM0_RX1 + - (i2s->dam_ifc*2)); - - /* disable the dam and free the controller */ - tegra30_dam_disable_clock(i2s->dam_ifc); - tegra30_dam_free_channel(i2s->dam_ifc, TEGRA30_DAM_CHIN1); - i2s->dam_ch_refcount--; - if (!i2s->dam_ch_refcount) - tegra30_dam_free_controller(i2s->dam_ifc); + tegra30_ahub_unset_rx_cif_source( + TEGRA30_AHUB_RXCIF_I2S0_RX0 + i2s->id); + tegra30_ahub_disable_clocks(); } else { - if (!i2s->is_call_mode_rec) return; |