aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/imx
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-03-05 09:30:50 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-05 19:02:47 -0500
commit17ec38a8b6d95100a585ed66ccc7bada13e09d0d (patch)
treeef3d7afbe72e450611232c6267b215d54c2e2d97 /sound/soc/imx
parent60282ede6b73d6ac7b571df5c65fa6a77db1a4a2 (diff)
ASoC: imx: move phycore audmux call into ASoC machine driver
It moves phycore audmux configuration call from board file into ASoC machine driver phycore-ac97 to ease converting audmux into a platform driver later. It moves phycore audmux configuration call from board file into ASoC machine driver phycore-ac97, so that it gets aligned with wm1133-ev1 and mx27vis-aic32x4, and more importantly it will ease the moving of audmux into sound/soc/imx as a platform driver later. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/imx')
-rw-r--r--sound/soc/imx/phycore-ac97.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/sound/soc/imx/phycore-ac97.c b/sound/soc/imx/phycore-ac97.c
index 6ac12111de6a..a59692e740b4 100644
--- a/sound/soc/imx/phycore-ac97.c
+++ b/sound/soc/imx/phycore-ac97.c
@@ -18,6 +18,7 @@
18#include <sound/pcm.h> 18#include <sound/pcm.h>
19#include <sound/soc.h> 19#include <sound/soc.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include <mach/audmux.h>
21 22
22static struct snd_soc_card imx_phycore; 23static struct snd_soc_card imx_phycore;
23 24
@@ -50,9 +51,32 @@ static int __init imx_phycore_init(void)
50{ 51{
51 int ret; 52 int ret;
52 53
53 if (!machine_is_pcm043() && !machine_is_pca100()) 54 if (machine_is_pca100()) {
55 mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
56 MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
57 MXC_AUDMUX_V1_PCR_TFCSEL(3) |
58 MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */
59 MXC_AUDMUX_V1_PCR_RXDSEL(3));
60 mxc_audmux_v1_configure_port(3,
61 MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
62 MXC_AUDMUX_V1_PCR_TFCSEL(0) |
63 MXC_AUDMUX_V1_PCR_TFSDIR |
64 MXC_AUDMUX_V1_PCR_RXDSEL(0));
65 } else if (machine_is_pcm043()) {
66 mxc_audmux_v2_configure_port(3,
67 MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
68 MXC_AUDMUX_V2_PTCR_TFSEL(0) |
69 MXC_AUDMUX_V2_PTCR_TFSDIR,
70 MXC_AUDMUX_V2_PDCR_RXDSEL(0));
71 mxc_audmux_v2_configure_port(0,
72 MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
73 MXC_AUDMUX_V2_PTCR_TCSEL(3) |
74 MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */
75 MXC_AUDMUX_V2_PDCR_RXDSEL(3));
76 } else {
54 /* return happy. We might run on a totally different machine */ 77 /* return happy. We might run on a totally different machine */
55 return 0; 78 return 0;
79 }
56 80
57 imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1); 81 imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
58 if (!imx_phycore_snd_ac97_device) 82 if (!imx_phycore_snd_ac97_device)