diff options
author | Jassi Brar <jassi.brar@samsung.com> | 2010-12-02 20:34:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-03 11:39:10 -0500 |
commit | 062869382bb2821bb8482db1e67850dfd11296fb (patch) | |
tree | c0b1a57814b04974cd2a73fa14831c114e3a98b5 /sound/soc/codecs/wm8580.c | |
parent | 001ae4c0350a35e8358514326e5c3d165357979a (diff) |
ASoC: WM8580: Debug interface index
We want the index of DAI's driver here.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8580.c')
-rw-r--r-- | 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 e2a927684b48..cb7765f7687d 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, | |||
507 | } | 507 | } |
508 | 508 | ||
509 | /* Look up the SYSCLK ratio; accept only exact matches */ | 509 | /* Look up the SYSCLK ratio; accept only exact matches */ |
510 | ratio = wm8580->sysclk[dai->id] / params_rate(params); | 510 | ratio = wm8580->sysclk[dai->driver->id] / params_rate(params); |
511 | for (i = 0; i < ARRAY_SIZE(wm8580_sysclk_ratios); i++) | 511 | for (i = 0; i < ARRAY_SIZE(wm8580_sysclk_ratios); i++) |
512 | if (ratio == wm8580_sysclk_ratios[i]) | 512 | if (ratio == wm8580_sysclk_ratios[i]) |
513 | break; | 513 | break; |
514 | if (i == ARRAY_SIZE(wm8580_sysclk_ratios)) { | 514 | if (i == ARRAY_SIZE(wm8580_sysclk_ratios)) { |
515 | dev_err(codec->dev, "Invalid clock ratio %d/%d\n", | 515 | dev_err(codec->dev, "Invalid clock ratio %d/%d\n", |
516 | wm8580->sysclk[dai->id], params_rate(params)); | 516 | wm8580->sysclk[dai->driver->id], params_rate(params)); |
517 | return -EINVAL; | 517 | return -EINVAL; |
518 | } | 518 | } |
519 | paifa |= i; | 519 | paifa |= i; |
@@ -716,7 +716,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id, | |||
716 | 716 | ||
717 | switch (clk_id) { | 717 | switch (clk_id) { |
718 | case WM8580_CLKSRC_ADCMCLK: | 718 | case WM8580_CLKSRC_ADCMCLK: |
719 | if (dai->id != WM8580_DAI_PAIFTX) | 719 | if (dai->driver->id != WM8580_DAI_PAIFTX) |
720 | return -EINVAL; | 720 | return -EINVAL; |
721 | sel = 0 << sel_shift; | 721 | sel = 0 << sel_shift; |
722 | break; | 722 | break; |
@@ -735,7 +735,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id, | |||
735 | } | 735 | } |
736 | 736 | ||
737 | /* We really should validate PLL settings but not yet */ | 737 | /* We really should validate PLL settings but not yet */ |
738 | wm8580->sysclk[dai->id] = freq; | 738 | wm8580->sysclk[dai->driver->id] = freq; |
739 | 739 | ||
740 | return snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel); | 740 | return snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel); |
741 | } | 741 | } |