aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm9713.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/wm9713.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/wm9713.c')
-rw-r--r--sound/soc/codecs/wm9713.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 740bf3cde18d..a0cc5ac969a1 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -928,7 +928,8 @@ static int wm9713_set_dai_fmt(struct snd_soc_dai *codec_dai,
928} 928}
929 929
930static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream, 930static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
931 struct snd_pcm_hw_params *params) 931 struct snd_pcm_hw_params *params,
932 struct snd_soc_dai *dai)
932{ 933{
933 struct snd_soc_pcm_runtime *rtd = substream->private_data; 934 struct snd_soc_pcm_runtime *rtd = substream->private_data;
934 struct snd_soc_device *socdev = rtd->socdev; 935 struct snd_soc_device *socdev = rtd->socdev;
@@ -954,7 +955,8 @@ static int wm9713_pcm_hw_params(struct snd_pcm_substream *substream,
954 return 0; 955 return 0;
955} 956}
956 957
957static void wm9713_voiceshutdown(struct snd_pcm_substream *substream) 958static void wm9713_voiceshutdown(struct snd_pcm_substream *substream,
959 struct snd_soc_dai *dai)
958{ 960{
959 struct snd_soc_pcm_runtime *rtd = substream->private_data; 961 struct snd_soc_pcm_runtime *rtd = substream->private_data;
960 struct snd_soc_device *socdev = rtd->socdev; 962 struct snd_soc_device *socdev = rtd->socdev;
@@ -969,7 +971,8 @@ static void wm9713_voiceshutdown(struct snd_pcm_substream *substream)
969 ac97_write(codec, AC97_EXTENDED_MID, status); 971 ac97_write(codec, AC97_EXTENDED_MID, status);
970} 972}
971 973
972static int ac97_hifi_prepare(struct snd_pcm_substream *substream) 974static int ac97_hifi_prepare(struct snd_pcm_substream *substream,
975 struct snd_soc_dai *dai)
973{ 976{
974 struct snd_pcm_runtime *runtime = substream->runtime; 977 struct snd_pcm_runtime *runtime = substream->runtime;
975 struct snd_soc_pcm_runtime *rtd = substream->private_data; 978 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -989,7 +992,8 @@ static int ac97_hifi_prepare(struct snd_pcm_substream *substream)
989 return ac97_write(codec, reg, runtime->rate); 992 return ac97_write(codec, reg, runtime->rate);
990} 993}
991 994
992static int ac97_aux_prepare(struct snd_pcm_substream *substream) 995static int ac97_aux_prepare(struct snd_pcm_substream *substream,
996 struct snd_soc_dai *dai)
993{ 997{
994 struct snd_pcm_runtime *runtime = substream->runtime; 998 struct snd_pcm_runtime *runtime = substream->runtime;
995 struct snd_soc_pcm_runtime *rtd = substream->private_data; 999 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -1042,8 +1046,7 @@ struct snd_soc_dai wm9713_dai[] = {
1042 .rates = WM9713_RATES, 1046 .rates = WM9713_RATES,
1043 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 1047 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
1044 .ops = { 1048 .ops = {
1045 .prepare = ac97_hifi_prepare,}, 1049 .prepare = ac97_hifi_prepare,
1046 .dai_ops = {
1047 .set_clkdiv = wm9713_set_dai_clkdiv, 1050 .set_clkdiv = wm9713_set_dai_clkdiv,
1048 .set_pll = wm9713_set_dai_pll,}, 1051 .set_pll = wm9713_set_dai_pll,},
1049 }, 1052 },
@@ -1056,8 +1059,7 @@ struct snd_soc_dai wm9713_dai[] = {
1056 .rates = WM9713_RATES, 1059 .rates = WM9713_RATES,
1057 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 1060 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
1058 .ops = { 1061 .ops = {
1059 .prepare = ac97_aux_prepare,}, 1062 .prepare = ac97_aux_prepare,
1060 .dai_ops = {
1061 .set_clkdiv = wm9713_set_dai_clkdiv, 1063 .set_clkdiv = wm9713_set_dai_clkdiv,
1062 .set_pll = wm9713_set_dai_pll,}, 1064 .set_pll = wm9713_set_dai_pll,},
1063 }, 1065 },
@@ -1077,8 +1079,7 @@ struct snd_soc_dai wm9713_dai[] = {
1077 .formats = WM9713_PCM_FORMATS,}, 1079 .formats = WM9713_PCM_FORMATS,},
1078 .ops = { 1080 .ops = {
1079 .hw_params = wm9713_pcm_hw_params, 1081 .hw_params = wm9713_pcm_hw_params,
1080 .shutdown = wm9713_voiceshutdown,}, 1082 .shutdown = wm9713_voiceshutdown,
1081 .dai_ops = {
1082 .set_clkdiv = wm9713_set_dai_clkdiv, 1083 .set_clkdiv = wm9713_set_dai_clkdiv,
1083 .set_pll = wm9713_set_dai_pll, 1084 .set_pll = wm9713_set_dai_pll,
1084 .set_fmt = wm9713_set_dai_fmt, 1085 .set_fmt = wm9713_set_dai_fmt,