From fadac2035f5f0fb0e03f1122bcf334cc24b898ce Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 26 Jul 2014 01:39:42 +0200 Subject: Revert "asoc: tegra20_ac97: fix sampling rate" This reverts commit f162e88fc6aac0fef03c49c1ac596995a03ff134. Somehow NVIDIA's media player does not like it to be fixed as it starts stuttering like crazy at times. Still keep the dangerous time out handling clean-up. While at it get rid of the excessive dev_info() logging as well. --- sound/soc/tegra/tegra20_ac97.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'sound/soc/tegra/tegra20_ac97.c') diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index f43b69f5250f..e40d40c640d9 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -57,7 +57,6 @@ static struct tegra20_ac97 *ac97; static int tegra20_ac97_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { -pr_info("%s %u fmt=%d", __func__, __LINE__, fmt); return 0; } @@ -77,8 +76,6 @@ static int tegra20_ac97_hw_params(struct snd_pcm_substream *substream, { struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai); - pr_info("%s(): dai->id=%d, %s\n", __func__, dai->id, (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)?"play":"rec"); - //TODO: adaptable sample size if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { @@ -100,8 +97,6 @@ int ac97_fifo_set_attention_level(struct tegra20_ac97 *ac97, int ifc, int fifo, { u32 val; - pr_info("%s()\n", __func__); - check_ifc(ifc, -EINVAL); if (ifc == TEGRA_DAI_AC97_PCM) @@ -172,8 +167,6 @@ int ac97_fifo_set_attention_level(struct tegra20_ac97 *ac97, int ifc, int fifo, void ac97_slot_enable(struct tegra20_ac97 *ac97, int ifc, int fifo, int on) { - pr_info("%s()\n", __func__); - check_ifc(ifc); if (!fifo) { @@ -209,8 +202,6 @@ static inline void tegra20_ac97_start_playback(struct snd_soc_dai *cpu_dai) { struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(cpu_dai); - pr_info("%s()\n", __func__); - ac97_fifo_set_attention_level(ac97, cpu_dai->id, AC97_FIFO_TX, /* Only FIFO level proven stable for video playback */ #ifdef TEGRA_AC97_32BIT_PLAYBACK @@ -226,8 +217,6 @@ static inline void tegra20_ac97_stop_playback(struct snd_soc_dai *cpu_dai) struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(cpu_dai); int delay_cnt = 10; /* 1ms max wait for fifo to drain */ - pr_info("%s()\n", __func__); - ac97_fifo_set_attention_level(ac97, cpu_dai->id, AC97_FIFO_TX, AC97_FIFO_ATN_LVL_NONE); @@ -266,8 +255,6 @@ static int tegra20_ac97_trigger(struct snd_pcm_substream *substream, int cmd, { int ret = 0; - pr_info("%s()\n", __func__); - switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -296,8 +283,6 @@ static void tegra20_ac97_reset(struct snd_ac97 *ac97) { int gpio_status; - pr_info("%s()\n", __func__); - /* do wolfson hard reset */ #define GPIO_AC97_nRESET TEGRA_GPIO_PV0 gpio_status = gpio_request(GPIO_AC97_nRESET, "WOLFSON_RESET"); @@ -319,8 +304,6 @@ static void tegra20_ac97_warm_reset(struct snd_ac97 *ac97) { int gpio_status; - pr_info("%s()\n", __func__); - /* do wolfson warm reset by toggling SYNC */ #define GPIO_AC97_SYNC TEGRA_GPIO_PP0 gpio_status = gpio_request(GPIO_AC97_SYNC, "WOLFSON_SYNC"); @@ -345,6 +328,8 @@ static unsigned short tegra20_ac97_read(struct snd_ac97 *ac97_snd, unsigned shor u32 val; int timeout = 100; +//pr_info("%s(0x%04x)", __func__, reg); + // mutex_lock(&car_mutex); /* Set MSB=1 to indicate Read Command! */ @@ -410,10 +395,6 @@ static int tegra20_ac97_probe(struct snd_soc_dai *dai) //hw_probe: reset GPIO, clk_get, clk_enable, request_irq struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai); - pr_info("%s()\n", __func__); - pr_info("ac97->capture_dma_data=%p\n", &ac97->capture_dma_data); - pr_info("ac97->playback_dma_data=%p\n", &ac97->playback_dma_data); - dai->capture_dma_data = &ac97->capture_dma_data; dai->playback_dma_data = &ac97->playback_dma_data; @@ -491,8 +472,6 @@ static __devinit int tegra20_ac97_platform_probe(struct platform_device *pdev) int ret; struct snd_ac97_bus *ac97_bus; - pr_info("%s()\n", __func__); - ac97 = kzalloc(sizeof(struct tegra20_ac97), GFP_KERNEL); if (!ac97) { dev_err(&pdev->dev, "Can't allocate tegra20_ac97\n"); @@ -562,7 +541,6 @@ static __devinit int tegra20_ac97_platform_probe(struct platform_device *pdev) strncpy(ac97->card->driver, pdev->dev.driver->name, sizeof(ac97->card->driver)); #endif -pr_info("%s() %u\n", __func__, __LINE__); /* put propper DAC to DAP DAS path in place */ ret = tegra20_das_connect_dac_to_dap(TEGRA20_DAS_DAP_SEL_DAC3, @@ -579,7 +557,6 @@ pr_info("%s() %u\n", __func__, __LINE__); goto err_create; } -pr_info("%s() %u\n", __func__, __LINE__); ret = snd_ac97_bus(ac97->card, 0, &tegra20_ac97_ops, NULL, &ac97_bus); if (ret) { dev_err(&pdev->dev, "failed registerign ac97_bus!\n"); @@ -599,7 +576,6 @@ err_clk_put: err_free: kfree(ac97); exit: -pr_info("%s() %u\n", __func__, __LINE__); return ret; } -- cgit v1.2.3