diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-11-18 17:11:38 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-11-21 09:12:10 -0500 |
commit | dee89c4d94433520e4e3977ae203d4cfbfe385fb (patch) | |
tree | bdbe4c54cd9789b02a6d0bf5f75a47b8721e073e /sound/soc/pxa/pxa-ssp.c | |
parent | a47cbe7263236691ee0bbc392f7fd4ec0da1159f (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/pxa/pxa-ssp.c')
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index e2b54b88c380..d0dd6245a20a 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -212,7 +212,8 @@ static struct pxa2xx_pcm_dma_params *ssp_dma_params[4][4] = { | |||
212 | }, | 212 | }, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static int pxa_ssp_startup(struct snd_pcm_substream *substream) | 215 | static int pxa_ssp_startup(struct snd_pcm_substream *substream, |
216 | struct snd_soc_dai *dai) | ||
216 | { | 217 | { |
217 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 218 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
218 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 219 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
@@ -228,7 +229,8 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream) | |||
228 | return ret; | 229 | return ret; |
229 | } | 230 | } |
230 | 231 | ||
231 | static void pxa_ssp_shutdown(struct snd_pcm_substream *substream) | 232 | static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, |
233 | struct snd_soc_dai *dai) | ||
232 | { | 234 | { |
233 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 235 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
234 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 236 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
@@ -604,7 +606,8 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
604 | * Can be called multiple times by oss emulation. | 606 | * Can be called multiple times by oss emulation. |
605 | */ | 607 | */ |
606 | static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | 608 | static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, |
607 | struct snd_pcm_hw_params *params) | 609 | struct snd_pcm_hw_params *params, |
610 | struct snd_soc_dai *dai) | ||
608 | { | 611 | { |
609 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 612 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
610 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 613 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
@@ -678,7 +681,8 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
678 | return 0; | 681 | return 0; |
679 | } | 682 | } |
680 | 683 | ||
681 | static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd) | 684 | static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd, |
685 | struct snd_soc_dai *dai) | ||
682 | { | 686 | { |
683 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 687 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
684 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 688 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
@@ -806,8 +810,6 @@ struct snd_soc_dai pxa_ssp_dai[] = { | |||
806 | .shutdown = pxa_ssp_shutdown, | 810 | .shutdown = pxa_ssp_shutdown, |
807 | .trigger = pxa_ssp_trigger, | 811 | .trigger = pxa_ssp_trigger, |
808 | .hw_params = pxa_ssp_hw_params, | 812 | .hw_params = pxa_ssp_hw_params, |
809 | }, | ||
810 | .dai_ops = { | ||
811 | .set_sysclk = pxa_ssp_set_dai_sysclk, | 813 | .set_sysclk = pxa_ssp_set_dai_sysclk, |
812 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, | 814 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, |
813 | .set_pll = pxa_ssp_set_dai_pll, | 815 | .set_pll = pxa_ssp_set_dai_pll, |
@@ -840,8 +842,6 @@ struct snd_soc_dai pxa_ssp_dai[] = { | |||
840 | .shutdown = pxa_ssp_shutdown, | 842 | .shutdown = pxa_ssp_shutdown, |
841 | .trigger = pxa_ssp_trigger, | 843 | .trigger = pxa_ssp_trigger, |
842 | .hw_params = pxa_ssp_hw_params, | 844 | .hw_params = pxa_ssp_hw_params, |
843 | }, | ||
844 | .dai_ops = { | ||
845 | .set_sysclk = pxa_ssp_set_dai_sysclk, | 845 | .set_sysclk = pxa_ssp_set_dai_sysclk, |
846 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, | 846 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, |
847 | .set_pll = pxa_ssp_set_dai_pll, | 847 | .set_pll = pxa_ssp_set_dai_pll, |
@@ -875,8 +875,6 @@ struct snd_soc_dai pxa_ssp_dai[] = { | |||
875 | .shutdown = pxa_ssp_shutdown, | 875 | .shutdown = pxa_ssp_shutdown, |
876 | .trigger = pxa_ssp_trigger, | 876 | .trigger = pxa_ssp_trigger, |
877 | .hw_params = pxa_ssp_hw_params, | 877 | .hw_params = pxa_ssp_hw_params, |
878 | }, | ||
879 | .dai_ops = { | ||
880 | .set_sysclk = pxa_ssp_set_dai_sysclk, | 878 | .set_sysclk = pxa_ssp_set_dai_sysclk, |
881 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, | 879 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, |
882 | .set_pll = pxa_ssp_set_dai_pll, | 880 | .set_pll = pxa_ssp_set_dai_pll, |
@@ -910,8 +908,6 @@ struct snd_soc_dai pxa_ssp_dai[] = { | |||
910 | .shutdown = pxa_ssp_shutdown, | 908 | .shutdown = pxa_ssp_shutdown, |
911 | .trigger = pxa_ssp_trigger, | 909 | .trigger = pxa_ssp_trigger, |
912 | .hw_params = pxa_ssp_hw_params, | 910 | .hw_params = pxa_ssp_hw_params, |
913 | }, | ||
914 | .dai_ops = { | ||
915 | .set_sysclk = pxa_ssp_set_dai_sysclk, | 911 | .set_sysclk = pxa_ssp_set_dai_sysclk, |
916 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, | 912 | .set_clkdiv = pxa_ssp_set_dai_clkdiv, |
917 | .set_pll = pxa_ssp_set_dai_pll, | 913 | .set_pll = pxa_ssp_set_dai_pll, |