|
@@ -18,6 +18,7 @@
|
|
|
#include <sound/pcm.h>
|
|
|
#include <sound/soc.h>
|
|
|
#include <asm/mach-types.h>
|
|
|
+#include <mach/audmux.h>
|
|
|
|
|
|
static struct snd_soc_card imx_phycore;
|
|
|
|
|
@@ -50,9 +51,32 @@ static int __init imx_phycore_init(void)
|
|
|
{
|
|
|
int ret;
|
|
|
|
|
|
- if (!machine_is_pcm043() && !machine_is_pca100())
|
|
|
+ if (machine_is_pca100()) {
|
|
|
+ mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
|
|
|
+ MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
|
|
|
+ MXC_AUDMUX_V1_PCR_TFCSEL(3) |
|
|
|
+ MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */
|
|
|
+ MXC_AUDMUX_V1_PCR_RXDSEL(3));
|
|
|
+ mxc_audmux_v1_configure_port(3,
|
|
|
+ MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
|
|
|
+ MXC_AUDMUX_V1_PCR_TFCSEL(0) |
|
|
|
+ MXC_AUDMUX_V1_PCR_TFSDIR |
|
|
|
+ MXC_AUDMUX_V1_PCR_RXDSEL(0));
|
|
|
+ } else if (machine_is_pcm043()) {
|
|
|
+ mxc_audmux_v2_configure_port(3,
|
|
|
+ MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
|
|
|
+ MXC_AUDMUX_V2_PTCR_TFSEL(0) |
|
|
|
+ MXC_AUDMUX_V2_PTCR_TFSDIR,
|
|
|
+ MXC_AUDMUX_V2_PDCR_RXDSEL(0));
|
|
|
+ mxc_audmux_v2_configure_port(0,
|
|
|
+ MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
|
|
|
+ MXC_AUDMUX_V2_PTCR_TCSEL(3) |
|
|
|
+ MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */
|
|
|
+ MXC_AUDMUX_V2_PDCR_RXDSEL(3));
|
|
|
+ } else {
|
|
|
/* return happy. We might run on a totally different machine */
|
|
|
return 0;
|
|
|
+ }
|
|
|
|
|
|
imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
|
|
|
if (!imx_phycore_snd_ac97_device)
|