aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/imx/eukrea-tlv320.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/imx/eukrea-tlv320.c')
-rw-r--r--sound/soc/imx/eukrea-tlv320.c40
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..7d4475cfdb24 100644
--- a/sound/soc/imx/eukrea-tlv320.c
+++ b/sound/soc/imx/eukrea-tlv320.c
@@ -26,6 +26,7 @@
26 26
27#include "../codecs/tlv320aic23.h" 27#include "../codecs/tlv320aic23.h"
28#include "imx-ssi.h" 28#include "imx-ssi.h"
29#include "imx-audmux.h"
29 30
30#define CODEC_CLOCK 12000000 31#define CODEC_CLOCK 12000000
31 32
@@ -97,12 +98,43 @@ static struct platform_device *eukrea_tlv320_snd_device;
97static int __init eukrea_tlv320_init(void) 98static int __init eukrea_tlv320_init(void)
98{ 99{
99 int ret; 100 int ret;
100 101 int int_port = 0, ext_port;
101 if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd() 102
102 && !machine_is_eukrea_cpuimx35sd() 103 if (machine_is_eukrea_cpuimx27()) {
103 && !machine_is_eukrea_cpuimx51sd()) 104 imx_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
105 IMX_AUDMUX_V1_PCR_SYN |
106 IMX_AUDMUX_V1_PCR_TFSDIR |
107 IMX_AUDMUX_V1_PCR_TCLKDIR |
108 IMX_AUDMUX_V1_PCR_RFSDIR |
109 IMX_AUDMUX_V1_PCR_RCLKDIR |
110 IMX_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) |
111 IMX_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) |
112 IMX_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4)
113 );
114 imx_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4,
115 IMX_AUDMUX_V1_PCR_SYN |
116 IMX_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0)
117 );
118 } else if (machine_is_eukrea_cpuimx25sd() ||
119 machine_is_eukrea_cpuimx35sd() ||
120 machine_is_eukrea_cpuimx51sd()) {
121 ext_port = machine_is_eukrea_cpuimx25sd() ? 4 : 3;
122 imx_audmux_v2_configure_port(int_port,
123 IMX_AUDMUX_V2_PTCR_SYN |
124 IMX_AUDMUX_V2_PTCR_TFSDIR |
125 IMX_AUDMUX_V2_PTCR_TFSEL(ext_port) |
126 IMX_AUDMUX_V2_PTCR_TCLKDIR |
127 IMX_AUDMUX_V2_PTCR_TCSEL(ext_port),
128 IMX_AUDMUX_V2_PDCR_RXDSEL(ext_port)
129 );
130 imx_audmux_v2_configure_port(ext_port,
131 IMX_AUDMUX_V2_PTCR_SYN,
132 IMX_AUDMUX_V2_PDCR_RXDSEL(int_port)
133 );
134 } else {
104 /* return happy. We might run on a totally different machine */ 135 /* return happy. We might run on a totally different machine */
105 return 0; 136 return 0;
137 }
106 138
107 eukrea_tlv320_snd_device = platform_device_alloc("soc-audio", -1); 139 eukrea_tlv320_snd_device = platform_device_alloc("soc-audio", -1);
108 if (!eukrea_tlv320_snd_device) 140 if (!eukrea_tlv320_snd_device)