diff options
Diffstat (limited to 'sound/soc/imx/eukrea-tlv320.c')
-rw-r--r-- | sound/soc/imx/eukrea-tlv320.c | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/sound/soc/imx/eukrea-tlv320.c b/sound/soc/imx/eukrea-tlv320.c index 1c1fdd10f73f..bfcb6d9768b8 100644 --- a/sound/soc/imx/eukrea-tlv320.c +++ b/sound/soc/imx/eukrea-tlv320.c @@ -23,6 +23,7 @@ #include <sound/pcm.h> #include <sound/soc.h> #include <asm/mach-types.h> +#include <mach/audmux.h> #include "../codecs/tlv320aic23.h" #include "imx-ssi.h" @@ -97,12 +98,43 @@ static struct platform_device *eukrea_tlv320_snd_device; static int __init eukrea_tlv320_init(void) { int ret; - - if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd() - && !machine_is_eukrea_cpuimx35sd() - && !machine_is_eukrea_cpuimx51sd()) + int int_port = 0, ext_port; + + if (machine_is_eukrea_cpuimx27()) { + mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, + MXC_AUDMUX_V1_PCR_SYN | + MXC_AUDMUX_V1_PCR_TFSDIR | + MXC_AUDMUX_V1_PCR_TCLKDIR | + MXC_AUDMUX_V1_PCR_RFSDIR | + MXC_AUDMUX_V1_PCR_RCLKDIR | + MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | + MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | + MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) + ); + mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4, + MXC_AUDMUX_V1_PCR_SYN | + MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0) + ); + } else if (machine_is_eukrea_cpuimx25sd() || + machine_is_eukrea_cpuimx35sd() || + machine_is_eukrea_cpuimx51sd()) { + ext_port = machine_is_eukrea_cpuimx25sd() ? 4 : 3; + mxc_audmux_v2_configure_port(int_port, + MXC_AUDMUX_V2_PTCR_SYN | + MXC_AUDMUX_V2_PTCR_TFSDIR | + MXC_AUDMUX_V2_PTCR_TFSEL(ext_port) | + MXC_AUDMUX_V2_PTCR_TCLKDIR | + MXC_AUDMUX_V2_PTCR_TCSEL(ext_port), + MXC_AUDMUX_V2_PDCR_RXDSEL(ext_port) + ); + mxc_audmux_v2_configure_port(ext_port, + MXC_AUDMUX_V2_PTCR_SYN, + MXC_AUDMUX_V2_PDCR_RXDSEL(int_port) + ); + } else { /* return happy. We might run on a totally different machine */ return 0; + } eukrea_tlv320_snd_device = platform_device_alloc("soc-audio", -1); if (!eukrea_tlv320_snd_device) |