Skip to contentSkip to conversation

ASoC: support pxa168 ssp in ASoC

PATCH New Haojian Zhuang 1 participant 1 message Mar 17, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: support pxa168 ssp in ASoC

Support pxa168 ssp in ASoC. The clock configuration and hw_params() is different from pxa2xx ssp. Others are shared with pxa2xx ssp.

---
 sound/soc/pxa/Kconfig      |    6 +-
 sound/soc/pxa/Makefile     |    2 +
 sound/soc/pxa/pxa168-ssp.c |  318 ++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/pxa/pxa168-ssp.h |   31 +++++
 4 files changed, 356 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/pxa/pxa168-ssp.c
 create mode 100644 sound/soc/pxa/pxa168-ssp.h
sound/soc/pxa/Kconfig +5 -1
index 7be1d5f..286d52a 100644
@@ -1,6 +1,6 @@
 config SND_PXA2XX_SOC
 	tristate "SoC Audio for the Intel PXA2xx chip"
-	depends on ARCH_PXA
+	depends on ARCH_PXA || ARCH_MMP
 	select SND_PXA2XX_LIB
 	help
 	  Say Y or M if you want to add support for codecs attached to
@@ -25,6 +25,10 @@ config SND_PXA2XX_SOC_SSP
 	tristate
 	select PXA_SSP
 
+config SND_PXA168_SOC_SSP
+	tristate
+	select PXA_SSP
+
 config SND_PXA2XX_SOC_CORGI
 	tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
 	depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx
sound/soc/pxa/Makefile +2 -0
index 33c1579..a74e6c9 100644
@@ -3,11 +3,13 @@ snd-soc-pxa2xx-objs := pxa2xx-pcm.o
 snd-soc-pxa2xx-ac97-objs := pxa2xx-ac97.o
 snd-soc-pxa2xx-i2s-objs := pxa2xx-i2s.o
 snd-soc-pxa2xx-ssp-objs := pxa-ssp.o pxa2xx-ssp.o
+snd-soc-pxa168-ssp-objs := pxa-ssp.o pxa168-ssp.o
 
 obj-$(CONFIG_SND_PXA2XX_SOC) += snd-soc-pxa2xx.o
 obj-$(CONFIG_SND_PXA2XX_SOC_AC97) += snd-soc-pxa2xx-ac97.o
 obj-$(CONFIG_SND_PXA2XX_SOC_I2S) += snd-soc-pxa2xx-i2s.o
 obj-$(CONFIG_SND_PXA2XX_SOC_SSP) += snd-soc-pxa2xx-ssp.o
+obj-$(CONFIG_SND_PXA168_SOC_SSP) += snd-soc-pxa168-ssp.o
 
 # PXA Machine Support
 snd-soc-corgi-objs := corgi.o
sound/soc/pxa/pxa168-ssp.c new file +318 -0

318 lines not on this page · raw message

sound/soc/pxa/pxa168-ssp.h new file +31 -0
new file mode 100644
index 0000000..59b3cb9
@@ -0,0 +1,31 @@
+/*
+ * ASoC PXA168 SSP port support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _PXA168_SSP_H
+#define _PXA168_SSP_H
+
+/* pxa DAI SSP IDs */
+enum {
+	PXA168_DAI_SSP1,
+	PXA168_DAI_SSP2,
+	PXA168_DAI_SSP3,
+	PXA168_DAI_SSP4,
+	PXA168_DAI_SSP5,
+	PXA168_DAI_SSP_MAX,
+};
+
+/* PXA168 SSP SYSCLK source */
+#define PXA168_ASYSCLK_MASTER		0	/* ASYSCLK master -- pxa168 */
+#define PXA168_ASYSCLK_SLAVE		1	/* ASYSCLK slave -- pxa168 */
+
+extern struct snd_soc_dai pxa168_ssp_dai[PXA168_DAI_SSP_MAX];
+
+extern int pxa168_seek_mclk_conf(int rate, int format, int channel);
+extern int pxa168_get_mclk(int i);
+
+#endif
Signature · 1 line
1.5.6.5