Re: [PATCH V2 1/4] ASoC: SAMSUNG: Modify I2S driver to support idma

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

 



On Wed, Jun 15, 2011 at 2:13 PM, Sangbeom Kim <sbkim73@xxxxxxxxxxx> wrote:

> +#define AHB_INTENLVL0          (1 << 24)
> +#define AHB_LVL0INT            (1 << 20)
> +#define AHB_CLRLVL0INT         (1 << 16)
> +#define AHB_DMARLD             (1 << 5)
> +#define AHB_INTMASK            (1 << 3)
> +#define AHB_DMAEN              (1 << 0)
> +#define AHB_LVLINTMASK         (0xf << 20)
> +
> +#define I2SSIZE_TRNMSK         (0xffff)
> +#define I2SSIZE_SHIFT          (16)
Not serious but ....
a) Let us please get over our infatuation with such parentheses :)
b) Ideally these _new_ definitions should have been added separate to
this moving.


> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
> index 992a732..2fc2428 100644
> --- a/sound/soc/samsung/i2s.c
> +++ b/sound/soc/samsung/i2s.c
> @@ -9,7 +9,7 @@
>  * it under the terms of the GNU General Public License version 2 as
>  * published by the Free Software Foundation.
>  */
> -
> +#define DEBUG
Usually we don't do it by default.


> +#define ST_RUNNING             (1<<0)
> +#define ST_OPENED              (1<<1)
why do we need these two defines ?


 @@ -646,6 +548,7 @@ static int i2s_hw_params(struct snd_pcm_substream
*substream,
>  {
>        struct i2s_dai *i2s = to_info(dai);
>        u32 mod = readl(i2s->addr + I2SMOD);
> +       u32 ahb = readl(i2s->addr + I2SAHB);
Please realize that this function is common for even s3c24xx, for
which this is invalid AHB read
and all other subsequent ops.

> @@ -702,6 +605,13 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
>                                params_format(params));
>                return -EINVAL;
>        }
> +
> +       if (is_secondary(i2s)) {
> +               ahb |= (AHB_DMARLD | AHB_INTMASK);
> +               mod |= MOD_TXS_IDMA;
> +       }
> +
> +       writel(ahb, i2s->addr + I2SAHB);
... this too.
--
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