All of lore.kernel.org
 help / color / mirror / Atom feed
From: Naresh Medisetty <naresh@ti.com>
To: alsa-devel@alsa-project.org
Cc: davinci-linux-open-source@linux.davincidsp.com,
	Naresh Medisetty <naresh@ti.com>
Subject: [PATCH 7/9] ARM: DaVinci: ASoC: Adds ALSA SoC DIT/DIR driver support for DM646X
Date: Mon, 16 Mar 2009 08:05:48 -0400	[thread overview]
Message-ID: <1237205148-30242-1-git-send-email-naresh@ti.com> (raw)

Adds ALSA SoC DIT/DIR driver support for DM646X

Signed-off-by: Naresh Medisetty <naresh@ti.com>
---
This patch applies on the ASoC tree available at http://opensource.wolfsonmicro.com/cgi-bin/gitweb.cgi?p=linux-2.6-asoc.git;a=commit;h=168776ef58d38503f8ac4f8a7eb1039137208032.

 sound/soc/codecs/codec_stubs.c |   63 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/codecs/codec_stubs.c

diff --git a/sound/soc/codecs/codec_stubs.c b/sound/soc/codecs/codec_stubs.c
new file mode 100644
index 0000000..60d3446
--- /dev/null
+++ b/sound/soc/codecs/codec_stubs.c
@@ -0,0 +1,63 @@
+/*
+ * ALSA SoC DaVinci DIT/DIR driver
+ *
+ *  TI DaVinci audio controller can operate in DIT/DIR (SPDI/F) where
+ *  no codec is needed.  This file provides stub codec that can be used
+ *  in these configurations.
+ *
+ * Author:      Steve Chen,  <schen@mvista.com>
+ * Copyright:   (C) 2008 MontaVista Software, Inc., <source@mvista.com>
+ * Copyright:   (C) 2008  Texas Instruments, India
+ *
+ * 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.
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <sound/soc.h>
+#include <sound/pcm.h>
+
+#define STUB_RATES	SNDRV_PCM_RATE_8000_96000
+#define STUB_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
+			SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)
+
+struct snd_soc_dai dit_stub_dai[] = {
+	{
+		.name = "DIT",
+		.playback = {
+			.stream_name = "Playback",
+			.channels_min = 1,
+			.channels_max = 384,
+			.rates = STUB_RATES,
+			.formats = STUB_FORMATS,
+		},
+	}
+};
+
+struct snd_soc_dai dir_stub_dai[] = {
+	{
+		.name = "DIR",
+		.capture = {
+			.stream_name = "Capture",
+			.channels_min = 1,
+			.channels_max = 384,
+			.rates = STUB_RATES,
+			.formats = STUB_FORMATS,
+		},
+	}
+};
+
+static int __init dit_modinit(void)
+{
+	return snd_soc_register_dai(dit_stub_dai);
+}
+module_init(dit_modinit);
+
+static void __exit dit_exit(void)
+{
+	snd_soc_unregister_dai(dit_stub_dai);
+}
+module_exit(dit_exit);
+
-- 
1.5.6

             reply	other threads:[~2009-03-16 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 12:05 Naresh Medisetty [this message]
2009-03-16 15:25 ` [PATCH 7/9] ARM: DaVinci: ASoC: Adds ALSA SoC DIT/DIR driver support for DM646X Mark Brown
2009-03-18 12:16   ` Medisetty, Naresh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1237205148-30242-1-git-send-email-naresh@ti.com \
    --to=naresh@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.