aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8580.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-18 17:11:38 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-21 09:12:10 -0500
commitdee89c4d94433520e4e3977ae203d4cfbfe385fb (patch)
treebdbe4c54cd9789b02a6d0bf5f75a47b8721e073e /sound/soc/codecs/wm8580.c
parenta47cbe7263236691ee0bbc392f7fd4ec0da1159f (diff)
ASoC: Merge snd_soc_ops into snd_soc_dai_ops
Liam Girdwood's ASoC v2 work avoids having two different ops structures for DAIs by merging the members of struct snd_soc_ops into struct snd_soc_dai_ops, allowing per DAI configuration for everything. Backport this change. This paves the way for future work allowing any combination of DAIs to be connected rather than having fixed purpose CODEC and CPU DAIs and only allowing CODEC<->CPU interconnections. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8580.c')
-rw-r--r--sound/soc/codecs/wm8580.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index cbcd7c324ab9..220d4b68904a 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -548,13 +548,13 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai,
548 * Set PCM DAI bit size and sample rate. 548 * Set PCM DAI bit size and sample rate.
549 */ 549 */
550static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, 550static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
551 struct snd_pcm_hw_params *params) 551 struct snd_pcm_hw_params *params,
552 struct snd_soc_dai *dai)
552{ 553{
553 struct snd_soc_pcm_runtime *rtd = substream->private_data; 554 struct snd_soc_pcm_runtime *rtd = substream->private_data;
554 struct snd_soc_dai_link *dai = rtd->dai;
555 struct snd_soc_device *socdev = rtd->socdev; 555 struct snd_soc_device *socdev = rtd->socdev;
556 struct snd_soc_codec *codec = socdev->codec; 556 struct snd_soc_codec *codec = socdev->codec;
557 u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->codec_dai->id); 557 u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->id);
558 558
559 paifb &= ~WM8580_AIF_LENGTH_MASK; 559 paifb &= ~WM8580_AIF_LENGTH_MASK;
560 /* bit size */ 560 /* bit size */
@@ -574,7 +574,7 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
574 return -EINVAL; 574 return -EINVAL;
575 } 575 }
576 576
577 wm8580_write(codec, WM8580_PAIF3 + dai->codec_dai->id, paifb); 577 wm8580_write(codec, WM8580_PAIF3 + dai->id, paifb);
578 return 0; 578 return 0;
579} 579}
580 580
@@ -798,8 +798,6 @@ struct snd_soc_dai wm8580_dai[] = {
798 }, 798 },
799 .ops = { 799 .ops = {
800 .hw_params = wm8580_paif_hw_params, 800 .hw_params = wm8580_paif_hw_params,
801 },
802 .dai_ops = {
803 .set_fmt = wm8580_set_paif_dai_fmt, 801 .set_fmt = wm8580_set_paif_dai_fmt,
804 .set_clkdiv = wm8580_set_dai_clkdiv, 802 .set_clkdiv = wm8580_set_dai_clkdiv,
805 .set_pll = wm8580_set_dai_pll, 803 .set_pll = wm8580_set_dai_pll,
@@ -818,8 +816,6 @@ struct snd_soc_dai wm8580_dai[] = {
818 }, 816 },
819 .ops = { 817 .ops = {
820 .hw_params = wm8580_paif_hw_params, 818 .hw_params = wm8580_paif_hw_params,
821 },
822 .dai_ops = {
823 .set_fmt = wm8580_set_paif_dai_fmt, 819 .set_fmt = wm8580_set_paif_dai_fmt,
824 .set_clkdiv = wm8580_set_dai_clkdiv, 820 .set_clkdiv = wm8580_set_dai_clkdiv,
825 .set_pll = wm8580_set_dai_pll, 821 .set_pll = wm8580_set_dai_pll,