From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
To: Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
Mike Frysinger <vapier@gentoo.org>,
Daniel Mack <zonque@gmail.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: qi.wang@intel.com, yong.y.wang@intel.com, joel.clark@intel.com,
kok.howg.ewe@intel.com, Tomoya MORINAGA <tomoya.rohm@gmail.com>
Subject: [PATCH 2/3] sound/soc/lapis: add machine driver
Date: Mon, 21 Nov 2011 13:08:51 +0900 [thread overview]
Message-ID: <1321848532-8784-2-git-send-email-tomoya.rohm@gmail.com> (raw)
In-Reply-To: <1321848532-8784-1-git-send-email-tomoya.rohm@gmail.com>
Add machine driver for LAPIS Semiconductor ML7213 IOH.
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
---
sound/soc/Kconfig | 1 +
sound/soc/Makefile | 1 +
sound/soc/lapis/Kconfig | 6 ++
sound/soc/lapis/Makefile | 4 ++
sound/soc/lapis/ml7213ioh-machine.c | 87 +++++++++++++++++++++++++++++++++++
5 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 sound/soc/lapis/Kconfig
create mode 100644 sound/soc/lapis/Makefile
create mode 100644 sound/soc/lapis/ml7213ioh-machine.c
diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
index 1381db8..674142b 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -60,6 +60,7 @@ source "sound/soc/s6000/Kconfig"
source "sound/soc/sh/Kconfig"
source "sound/soc/tegra/Kconfig"
source "sound/soc/txx9/Kconfig"
+source "sound/soc/lapis/Kconfig"
# Supported codecs
source "sound/soc/codecs/Kconfig"
diff --git a/sound/soc/Makefile b/sound/soc/Makefile
index 9ea8ac8..6586d99 100644
--- a/sound/soc/Makefile
+++ b/sound/soc/Makefile
@@ -22,3 +22,4 @@ obj-$(CONFIG_SND_SOC) += s6000/
obj-$(CONFIG_SND_SOC) += sh/
obj-$(CONFIG_SND_SOC) += tegra/
obj-$(CONFIG_SND_SOC) += txx9/
+obj-$(CONFIG_SND_SOC) += lapis/
diff --git a/sound/soc/lapis/Kconfig b/sound/soc/lapis/Kconfig
new file mode 100644
index 0000000..1bd5200
--- /dev/null
+++ b/sound/soc/lapis/Kconfig
@@ -0,0 +1,6 @@
+config SND_SOC_ML7213_MACHINE
+ tristate "ML7213 IOH ASoC machine driver"
+ depends on SND_SOC_TXX9ACLC
+ select SND_SOC_ML7213_PLATFORM
+ help
+ This is ASoC machine driver for ML7213 IOH
diff --git a/sound/soc/lapis/Makefile b/sound/soc/lapis/Makefile
new file mode 100644
index 0000000..468d922
--- /dev/null
+++ b/sound/soc/lapis/Makefile
@@ -0,0 +1,4 @@
+# Platform
+snd-soc-ml7213-machine-objs := ml7213ioh-machine.o
+
+obj-$(CONFIG_SND_SOC_ML7213_MACHINE) += snd-soc-ml7213-plat.o
diff --git a/sound/soc/lapis/ml7213ioh-machine.c b/sound/soc/lapis/ml7213ioh-machine.c
new file mode 100644
index 0000000..7f5629c
--- /dev/null
+++ b/sound/soc/lapis/ml7213ioh-machine.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2011 LAPIS Semiconductor Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+
+static struct snd_soc_dai_link ioh_i2s_dai = {
+ .name = "I2S",
+ .stream_name = "I2S HiFi",
+ .cpu_dai_name = "ml7213ioh-i2s",
+ .codec_dai_name = "ml7213ioh-hifi",
+ .platform_name = "ml7213ioh-pcm-audio",
+ .codec_name = "ml26124-codec",
+};
+
+static struct snd_soc_card ioh_i2s_card = {
+ .name = "ml7213ioh i2s",
+ .dai_link = &ioh_i2s_dai,
+ .num_links = 1,
+};
+
+static struct platform_device *soc_pdev;
+
+static int __init ioh_i2s_probe(struct platform_device *pdev)
+{
+ int ret;
+
+ soc_pdev = platform_device_alloc("soc-audio", -1);
+ if (!soc_pdev)
+ return -ENOMEM;
+ platform_set_drvdata(soc_pdev, &ioh_i2s_card);
+ ret = platform_device_add(soc_pdev);
+ if (ret) {
+ platform_device_put(soc_pdev);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int __exit ioh_i2s_remove(struct platform_device *pdev)
+{
+ platform_device_unregister(soc_pdev);
+ return 0;
+}
+
+static struct platform_driver ioh_i2s_driver = {
+ .remove = ioh_i2s_remove,
+ .driver = {
+ .name = "ml7213ioh-machine",
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init ioh_i2s_init(void)
+{
+ return platform_driver_probe(&ioh_i2s_driver,
+ ioh_i2s_probe);
+}
+
+static void __exit ioh_i2s_exit(void)
+{
+ platform_driver_unregister(&ioh_i2s_driver);
+}
+
+module_init(ioh_i2s_init);
+module_exit(ioh_i2s_exit);
+
+MODULE_AUTHOR("Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>");
+MODULE_DESCRIPTION("LAPIS Semiconductor ML7213 IOH ALSA SoC machine driver");
+MODULE_LICENSE("GPL");
--
1.7.4.4
next prev parent reply other threads:[~2011-11-21 4:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 4:08 [PATCH 1/3] sound/soc/codecs: add LAPIS Semiconductor ML26124 Tomoya MORINAGA
2011-11-21 4:08 ` Tomoya MORINAGA [this message]
2011-11-21 11:34 ` [PATCH 2/3] sound/soc/lapis: add machine driver Mark Brown
2011-12-02 5:33 ` Tomoya MORINAGA
2011-12-02 6:14 ` Takashi Iwai
2011-12-02 6:18 ` Tomoya MORINAGA
2011-12-02 6:39 ` Takashi Iwai
2011-12-02 6:52 ` Tomoya MORINAGA
2011-12-02 7:01 ` Takashi Iwai
2011-12-02 7:13 ` Tomoya MORINAGA
2011-12-02 7:16 ` Takashi Iwai
2011-12-02 11:46 ` Mark Brown
2011-12-02 12:09 ` Tomoya MORINAGA
2011-12-02 12:22 ` Mark Brown
2011-12-02 12:35 ` Tomoya MORINAGA
2011-12-02 12:49 ` Mark Brown
2011-11-21 4:08 ` [PATCH 3/3] sound/soc/lapis: add platform driver Tomoya MORINAGA
2011-11-21 11:45 ` Mark Brown
2011-12-12 8:28 ` Tomoya MORINAGA
2011-12-12 10:05 ` [alsa-devel] " Mark Brown
2011-12-13 4:38 ` Tomoya MORINAGA
2011-12-13 4:59 ` Mark Brown
2011-11-21 11:26 ` [PATCH 1/3] sound/soc/codecs: add LAPIS Semiconductor ML26124 Mark Brown
2011-11-22 10:47 ` Tomoya MORINAGA
2011-11-22 11:19 ` Mark Brown
2011-11-25 2:03 ` Tomoya MORINAGA
2011-11-25 11:02 ` Mark Brown
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=1321848532-8784-2-git-send-email-tomoya.rohm@gmail.com \
--to=tomoya.rohm@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=perex@perex.cz \
--cc=qi.wang@intel.com \
--cc=tiwai@suse.de \
--cc=vapier@gentoo.org \
--cc=yong.y.wang@intel.com \
--cc=zonque@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome