Re: [PATCH V3] ASoC: SAMSUNG: Add quirk to support Exynos4 PCM audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 28, 2011 at 10:39 AM, Sangbeom Kim <sbkim73@xxxxxxxxxxx> wrote:

> @@ -10,7 +10,6 @@
> Â* it under the terms of the GNU General Public License version 2 as
> Â* published by the Free Software Foundation.
> Â*/
> -
> Â#include <linux/clk.h>
> Â#include <linux/io.h>

Please avoid null changes.


> @@ -299,25 +299,34 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream,
>
> Â Â Â Âspin_lock_irqsave(&pcm->lock, flags);
>
> - Â Â Â /* Get hold of the PCMSOURCE_CLK */
> - Â Â Â clkctl = readl(regs + S3C_PCM_CLKCTL);
> - Â Â Â if (clkctl & S3C_PCM_CLKCTL_SERCLKSEL_PCLK)
> - Â Â Â Â Â Â Â clk = pcm->pclk;
> - Â Â Â else
> + Â Â Â if (pcm->quirks == QUIRK_NO_DIV) {
> Â Â Â Â Â Â Â Âclk = pcm->cclk;
> + Â Â Â Â Â Â Â if (clk_get_rate(clk) != (pcm->sclk_per_fs*params_rate(params))) {
> + Â Â Â Â Â Â Â Â Â Â Â clk_set_rate(clk, pcm->sclk_per_fs*params_rate(params));
> + Â Â Â Â Â Â Â }
> + Â Â Â Â Â Â Â sync_div = clk_get_rate(clk)/(params_rate(params))-1;

The sync_div assignment is essentially unchanged. See below..


> - Â Â Â /* Set the SYNC divider */
> - Â Â Â sync_div = pcm->sclk_per_fs - 1;
> + Â Â Â Â Â Â Â sync_div = pcm->sclk_per_fs - 1;
> + Â Â Â }

so this could be moved outside of the if-else block as common code.


> @@ -330,7 +339,6 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream,
> Â Â Â Âdev_dbg(pcm->dev, "PCMSOURCE_CLK-%lu SCLK=%ufs SCLK_DIV=%d SYNC_DIV=%d\n",
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âclk_get_rate(clk), pcm->sclk_per_fs,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âsclk_div, sync_div);
> -
> Â Â Â Âreturn 0;
> Â}

Again, this is not needed.


I know I should have pointed these out earlier to avoid unnecessary
revision. My apologies.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux