Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Jassi Brar <jassi.brar@samsung.com>
Cc: alsa-devel@alsa-project.org, kgene.kim@samsung.com,
	broonie@opensource.wolfsonmicro.com
Subject: Re: [PATCH] ASoC: WM8580: Debug interface index
Date: Fri, 03 Dec 2010 11:34:36 +0000	[thread overview]
Message-ID: <1291376076.3271.32.camel@odin> (raw)
In-Reply-To: <1291340065-16897-1-git-send-email-jassi.brar@samsung.com>

On Fri, 2010-12-03 at 10:34 +0900, Jassi Brar wrote:
> We want the index of DAI's driver here.
> 

It's fine but could you add a little more context here.

> Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
> ---
>  sound/soc/codecs/wm8580.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
> index e2a9276..cb7765f 100644
> --- a/sound/soc/codecs/wm8580.c
> +++ b/sound/soc/codecs/wm8580.c
> @@ -507,13 +507,13 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
>  	}
>  
>  	/* Look up the SYSCLK ratio; accept only exact matches */
> -	ratio = wm8580->sysclk[dai->id] / params_rate(params);
> +	ratio = wm8580->sysclk[dai->driver->id] / params_rate(params);
>  	for (i = 0; i < ARRAY_SIZE(wm8580_sysclk_ratios); i++)
>  		if (ratio == wm8580_sysclk_ratios[i])
>  			break;
>  	if (i == ARRAY_SIZE(wm8580_sysclk_ratios)) {
>  		dev_err(codec->dev, "Invalid clock ratio %d/%d\n",
> -			wm8580->sysclk[dai->id], params_rate(params));
> +			wm8580->sysclk[dai->driver->id], params_rate(params));
>  		return -EINVAL;
>  	}
>  	paifa |= i;
> @@ -716,7 +716,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
>  
>  	switch (clk_id) {
>  	case WM8580_CLKSRC_ADCMCLK:
> -		if (dai->id != WM8580_DAI_PAIFTX)
> +		if (dai->driver->id != WM8580_DAI_PAIFTX)
>  			return -EINVAL;
>  		sel = 0 << sel_shift;
>  		break;
> @@ -735,7 +735,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
>  	}
>  
>  	/* We really should validate PLL settings but not yet */
> -	wm8580->sysclk[dai->id] = freq;
> +	wm8580->sysclk[dai->driver->id] = freq;
>  
>  	return snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel);
>  }

  reply	other threads:[~2010-12-03 11:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03  1:34 [PATCH] ASoC: WM8580: Debug interface index Jassi Brar
2010-12-03 11:34 ` Liam Girdwood [this message]
2010-12-03 16:39   ` Mark Brown
2010-12-04 15:26     ` Jassi Brar
2010-12-20 12:34       ` Mark Brown

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=1291376076.3271.32.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jassi.brar@samsung.com \
    --cc=kgene.kim@samsung.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