alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V0] ASoC: pxa-ssp: add TISSP mode support
@ 2013-11-05  8:30 Qiao Zhou
  2013-11-06 11:24 ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Qiao Zhou @ 2013-11-05  8:30 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Eric Miao, Haojian Zhuang, alsa-devel, chao.xie,
	trinity.qiao.zhou
  Cc: Qiao Zhou

add TISSP mode support. with this mode enabled, ssp controller
works in TI-ssp protocol automatically and doesn't need to
configure sspsp register to set the timing for tx/rx.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
---
 include/sound/soc-dai.h |    1 +
 sound/soc/pxa/pxa-ssp.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index ae9a227..43fc5d0 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -33,6 +33,7 @@ struct snd_compr_stream;
 #define SND_SOC_DAIFMT_DSP_B		5 /* L data MSB during FRM LRC */
 #define SND_SOC_DAIFMT_AC97		6 /* AC97 */
 #define SND_SOC_DAIFMT_PDM		7 /* Pulse density modulation */
+#define SND_SOC_DAIFMT_SSP		8 /* SSP mode */
 
 /* left and right justified also known as MSB and LSB respectively */
 #define SND_SOC_DAIFMT_MSB		SND_SOC_DAIFMT_LEFT_J
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index a3119a0..effa8d1 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -505,6 +505,14 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
 		sscr0 |= SSCR0_MOD | SSCR0_PSP;
 		sscr1 |= SSCR1_TRAIL | SSCR1_RWOT;
 		break;
+	/*
+	 * add TISSP protocol support. setting to this mode, ssp controller
+	 * works in TI-ssp mode, and need not set psp register to conf
+	 * detailed timing.
+	 */
+	case SND_SOC_DAIFMT_SSP:
+		sscr0 |= SSCR0_TISSP;
+		sscr1 |= SSCR1_RWOT;
 
 	default:
 		return -EINVAL;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-11-15  8:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05  8:30 [PATCH V0] ASoC: pxa-ssp: add TISSP mode support Qiao Zhou
2013-11-06 11:24 ` Mark Brown
2013-11-08  1:52   ` Qiao Zhou
2013-11-08 10:19     ` Mark Brown
2013-11-10  1:50       ` Qiao Zhou
2013-11-10 11:10         ` Mark Brown
2013-11-11  2:03           ` Qiao Zhou
2013-11-11 11:21             ` Mark Brown
2013-11-15  8:57               ` Qiao Zhou
2013-11-10  9:29     ` Daniel Mack
2013-11-11  1:59       ` Qiao Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).