summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2010-03-03 10:06:23 -0600
committerFrank Li <Frank.Li@freescale.com>2010-03-16 12:37:41 +0800
commit96728166ccdb7d2d48ac7bf3ef2edf842266e1b4 (patch)
tree656018700ce09599d98fe54d00c5eba617ced976 /arch
parent52b28a4f060309a6510a8ae7d7dcf94377782ad5 (diff)
ENGR00117752 MX28: Support S/PDIF audio playback
Support S/PDIF audio playback Signed-off-by: Alan Tull <r80115@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/imx28evk_defconfig36
-rw-r--r--arch/arm/mach-mx28/device.c15
-rw-r--r--arch/arm/mach-mx28/mx28evk_pins.c13
-rw-r--r--arch/arm/plat-mxs/device.c22
4 files changed, 85 insertions, 1 deletions
diff --git a/arch/arm/configs/imx28evk_defconfig b/arch/arm/configs/imx28evk_defconfig
index 1842fedc9a1d..37733e7a4295 100644
--- a/arch/arm/configs/imx28evk_defconfig
+++ b/arch/arm/configs/imx28evk_defconfig
@@ -1029,7 +1029,41 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+# CONFIG_SOUND_OSS_CORE is not set
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_JACK=y
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+# CONFIG_SND_RAWMIDI_SEQ is not set
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+# CONFIG_SND_SBAWE_SEQ is not set
+# CONFIG_SND_EMU10K1_SEQ is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_ARM is not set
+# CONFIG_SND_USB is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_MXS_SOC=y
+CONFIG_SND_MXS_SOC_SPDIF_DAI=y
+CONFIG_SND_MXS_SOC_EVK_DEVB=y
+CONFIG_SND_MXS_SOC_DAI=y
+CONFIG_SND_MXS_SOC_SAIF0_SELECT=y
+# CONFIG_SND_MXS_SOC_SAIF1_SELECT is not set
+CONFIG_SND_MXS_SOC_EVK_DEVB_SPDIF=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_SGTL5000=y
+CONFIG_SND_SOC_MXS_SPDIF=y
+# CONFIG_SOUND_PRIME is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
diff --git a/arch/arm/mach-mx28/device.c b/arch/arm/mach-mx28/device.c
index 4e07d5261cd3..d8cbba1b9621 100644
--- a/arch/arm/mach-mx28/device.c
+++ b/arch/arm/mach-mx28/device.c
@@ -1079,6 +1079,20 @@ void __init mx28_init_audio(void)
}
#endif
+#if defined(CONFIG_SND_SOC_MXS_SPDIF) || \
+ defined(CONFIG_SND_SOC_MXS_SPDIF_MODULE)
+void __init mx28_init_spdif(void)
+{ struct platform_device *pdev;
+ pdev = mxs_get_device("mxs-spdif", 0);
+ if (pdev == NULL || IS_ERR(pdev))
+ return;
+ mxs_add_device(pdev, 3);
+}
+#else
+static inline mx28_init_spdif(void)
+{
+}
+#endif
int __init mx28_device_init(void)
{
@@ -1095,6 +1109,7 @@ int __init mx28_device_init(void)
mx28_init_kbd();
mx28_init_ts();
mx28_init_audio();
+ mx28_init_spdif();
mx28_init_lcdif();
mx28_init_pxp();
mx28_init_dcp();
diff --git a/arch/arm/mach-mx28/mx28evk_pins.c b/arch/arm/mach-mx28/mx28evk_pins.c
index 8bddbeb9f9e5..e8ac2d2b5328 100644
--- a/arch/arm/mach-mx28/mx28evk_pins.c
+++ b/arch/arm/mach-mx28/mx28evk_pins.c
@@ -791,6 +791,19 @@ static struct pin_desc mx28evk_fixed_pins[] = {
.pull = 1,
},
#endif
+#if defined(CONFIG_SND_SOC_MXS_SPDIF) || \
+ defined(CONFIG_SND_SOC_MXS_SPDIF_MODULE)
+ {
+ .name = "SPDIF",
+ .id = PINID_SPDIF,
+ .fun = PIN_FUN1,
+ .strength = PAD_12MA,
+ .voltage = PAD_3_3V,
+ .pullup = 1,
+ .drive = 1,
+ .pull = 1,
+ },
+#endif
};
#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)
diff --git a/arch/arm/plat-mxs/device.c b/arch/arm/plat-mxs/device.c
index 4cd1b0f0a47e..62d144a45707 100644
--- a/arch/arm/plat-mxs/device.c
+++ b/arch/arm/plat-mxs/device.c
@@ -386,6 +386,19 @@ static struct platform_device mxs_sgtl5000[] = {
};
#endif
+#if defined(CONFIG_SND_SOC_MXS_SPDIF) || \
+ defined(CONFIG_SND_SOC_MXS_SPDIF_MODULE)
+static struct platform_device mxs_spdif[] = {
+ {
+ .name = "mxs-spdif",
+ .id = 0,
+ .dev = {
+ .release = mxs_nop_release,
+ },
+ },
+};
+#endif
+
static struct mxs_dev_lookup dev_lookup[] = {
#if defined(CONFIG_SERIAL_MXS_DUART) || \
defined(CONFIG_SERIAL_MXS_DUART_MODULE)
@@ -542,6 +555,15 @@ static struct mxs_dev_lookup dev_lookup[] = {
.pdev = mxs_sgtl5000,
},
#endif
+
+#if defined(CONFIG_SND_SOC_MXS_SPDIF) || \
+ defined(CONFIG_SND_SOC_MXS_SPDIF_MODULE)
+ {
+ .name = "mxs-spdif",
+ .size = ARRAY_SIZE(mxs_spdif),
+ .pdev = mxs_spdif,
+ },
+#endif
};
struct platform_device *mxs_get_device(char *name, int id)