aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/omap/omap-hdmi-card.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-25 08:45:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-25 08:45:25 -0700
commitbe87cfb47c5c740f7b17929bcd7c480b228513e0 (patch)
tree48a82c823205e4ac0b50ea7d6c336fc5a26b5bbe /sound/soc/omap/omap-hdmi-card.c
parent58823de9d2f1265030d0d06cb03cc2a551994398 (diff)
parentadcc70b249ca77c1197eb62b1645146721ba6e5b (diff)
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound update from Takashi Iwai: "This is the second updates for 3.5-rc1. It's mainly for OMAP4 HDMI updates and the device tree updates for OMAP, in addition to a couple of PCM accuray improvement and Realtek ALC269VD codec support." * tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits) ALSA: hda/realtek - Add new codec support for ALC269VD ALSA: core: group read of pointer, tstamp and jiffies ASoC: OMAP: HDMI: Rename sound card source file ASoC: OMAP: HDMI: Make sound card naming more generic ASoC: OMAP: HDMI: Make build config options more generic ASoC: OMAP: HDMI: Expand capabilities of the HDMI DAI ASoC: OMAP: HDMI: Improve how the display state is verified ASoC: OMAP: HDMI: Expand configuration of hw_params ASoC: OMAP: HDMI: Use the DSS audio interface ASoC: OMAP: HDMI: Create a structure for private data of the CPU DAI ASoC: OMAP: HDMI: Change error values in HDMI CPU DAI ASoC: OMAP: HDMI: Update the platform device names ASoC: omap-abe-twl6040: Introduce driver data for runtime parameters ASoC: omap-abe-twl6040: Move Digital Mic widget into dapm table ASoC: omap-abe-twl6040: Keep only one snd_soc_dai_link structure ASoC: omap-dmic: Add device tree bindings ASoC: omap-mcpdm: Add device tree bindings ASoC: omap-mcbsp: buffer size constraint only applies to playback stream ASoC: omap-mcbsp: Use the common interrupt line if supported by the SoC ASoC: omap-mcbsp: Remove unused FRAME dma_op_mode ...
Diffstat (limited to 'sound/soc/omap/omap-hdmi-card.c')
-rw-r--r--sound/soc/omap/omap-hdmi-card.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-hdmi-card.c b/sound/soc/omap/omap-hdmi-card.c
new file mode 100644
index 000000000000..eaa2ea0e3f81
--- /dev/null
+++ b/sound/soc/omap/omap-hdmi-card.c
@@ -0,0 +1,87 @@
+/*
+ * omap-hdmi-card.c
+ *
+ * OMAP ALSA SoC machine driver for TI OMAP HDMI
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ * Author: Ricardo Neri <ricardo.neri@ti.com>
+ *
+ * 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.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <linux/module.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include <asm/mach-types.h>
+#include <video/omapdss.h>
+
+#define DRV_NAME "omap-hdmi-audio"
+
+static struct snd_soc_dai_link omap_hdmi_dai = {
+ .name = "HDMI",
+ .stream_name = "HDMI",
+ .cpu_dai_name = "omap-hdmi-audio-dai",
+ .platform_name = "omap-pcm-audio",
+ .codec_name = "hdmi-audio-codec",
+ .codec_dai_name = "omap-hdmi-hifi",
+};
+
+static struct snd_soc_card snd_soc_omap_hdmi = {
+ .name = "OMAPHDMI",
+ .owner = THIS_MODULE,
+ .dai_link = &omap_hdmi_dai,
+ .num_links = 1,
+};
+
+static __devinit int omap_hdmi_probe(struct platform_device *pdev)
+{
+ struct snd_soc_card *card = &snd_soc_omap_hdmi;
+ int ret;
+
+ card->dev = &pdev->dev;
+
+ ret = snd_soc_register_card(card);
+ if (ret) {
+ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
+ card->dev = NULL;
+ return ret;
+ }
+ return 0;
+}
+
+static int __devexit omap_hdmi_remove(struct platform_device *pdev)
+{
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+ snd_soc_unregister_card(card);
+ card->dev = NULL;
+ return 0;
+}
+
+static struct platform_driver omap_hdmi_driver = {
+ .driver = {
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+ },
+ .probe = omap_hdmi_probe,
+ .remove = __devexit_p(omap_hdmi_remove),
+};
+
+module_platform_driver(omap_hdmi_driver);
+
+MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
+MODULE_DESCRIPTION("OMAP HDMI machine ASoC driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);