alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon@horms.net>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: rsnd: fixup rsnd_gen_dma_addr() for Gen1
Date: Wed, 18 Jun 2014 14:36:01 +0900	[thread overview]
Message-ID: <20140618053558.GA15909@verge.net.au> (raw)
In-Reply-To: <87k38fyp3a.wl%kuninori.morimoto.gx@renesas.com>

On Tue, Jun 17, 2014 at 06:38:01PM -0700, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> ad32d0c7b0e993433df152ae747652647eb65a27
> (ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr)
> added rsnd_gen_dma_addr() to calculate DMA addr,
> but, it is necessary only for Gen2.
> This patch ignores Gen1 case.
> Kernel will be panic without this patch.
> Special thanks to Simon
> 
> Reported-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Hi Morimoto-san,

thanks for the quick fix.
I have verified that the bockw board no longer panics.

Tested-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  sound/soc/sh/rcar/gen.c |   33 +++++++++++++++++++++------------
>  1 file changed, 21 insertions(+), 12 deletions(-)
> 
> diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
> index 1dd2b7d..0280a11 100644
> --- a/sound/soc/sh/rcar/gen.c
> +++ b/sound/soc/sh/rcar/gen.c
> @@ -184,7 +184,7 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
>  #define RDMA_CMD_O_N(addr, i)	(addr ##_reg - 0x004f8000 + (0x400 * i))
>  #define RDMA_CMD_O_P(addr, i)	(addr ##_reg - 0x001f8000 + (0x400 * i))
>  
> -void rsnd_gen_dma_addr(struct rsnd_priv *priv,
> +static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
>  		       struct rsnd_dma *dma,
>  		       struct dma_slave_config *cfg,
>  		       int is_play, int slave_id)
> @@ -226,17 +226,6 @@ void rsnd_gen_dma_addr(struct rsnd_priv *priv,
>  		}
>  	};
>  
> -	cfg->slave_id	= slave_id;
> -	cfg->src_addr	= 0;
> -	cfg->dst_addr	= 0;
> -	cfg->direction	= is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
> -
> -	/*
> -	 * gen1 uses default DMA addr
> -	 */
> -	if (rsnd_is_gen1(priv))
> -		return;
> -
>  	/* it shouldn't happen */
>  	if (use_dvc & !use_src) {
>  		dev_err(dev, "DVC is selected without SRC\n");
> @@ -250,6 +239,26 @@ void rsnd_gen_dma_addr(struct rsnd_priv *priv,
>  		id, cfg->src_addr, cfg->dst_addr);
>  }
>  
> +void rsnd_gen_dma_addr(struct rsnd_priv *priv,
> +		       struct rsnd_dma *dma,
> +		       struct dma_slave_config *cfg,
> +		       int is_play, int slave_id)
> +{
> +	cfg->slave_id   = slave_id;
> +	cfg->src_addr   = 0;
> +	cfg->dst_addr   = 0;
> +	cfg->direction  = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
> +
> +	/*
> +	 * gen1 uses default DMA addr
> +	 */
> +	if (rsnd_is_gen1(priv))
> +		return;
> +
> +	rsnd_gen2_dma_addr(priv, dma, cfg, is_play, slave_id);
> +}
> +
> +
>  /*
>   *		Gen2
>   */
> -- 
> 1.7.9.5
> 

-- 
Simon Horman/ホーマン サイモン        simon@horms.net
Horms Solutions 株式会社                www.horms.net
〒651-0084 兵庫県神戸市中央区磯辺通4-1-8 ITCビル901号
Tel: 03 6365 5977                   Fax: 03 6673 4268
Skype: horms7
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2014-06-18  5:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 12:13 Possible regression caused by "ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr" Simon Horman
2014-06-18  1:38 ` [PATCH] ASoC: rsnd: fixup rsnd_gen_dma_addr() for Gen1 Kuninori Morimoto
2014-06-18  5:36   ` Simon Horman [this message]
2014-06-18  8:52   ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140618053558.GA15909@verge.net.au \
    --to=simon@horms.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=magnus.damm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).