4 * OMAP ALSA SoC machine driver for TI OMAP HDMI
5 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
6 * Author: Ricardo Neri <ricardo.neri@ti.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #include <linux/module.h>
25 #include <sound/pcm.h>
26 #include <sound/soc.h>
27 #include <asm/mach-types.h>
28 #include <video/omapdss.h>
30 #define DRV_NAME "omap-hdmi-audio"
32 static struct snd_soc_dai_link omap_hdmi_dai
= {
34 .stream_name
= "HDMI",
35 .cpu_dai_name
= "omap-hdmi-audio-dai",
36 .platform_name
= "omap-pcm-audio",
37 .codec_name
= "hdmi-audio-codec",
38 .codec_dai_name
= "hdmi-hifi",
41 static struct snd_soc_card snd_soc_omap_hdmi
= {
44 .dai_link
= &omap_hdmi_dai
,
48 static int omap_hdmi_probe(struct platform_device
*pdev
)
50 struct snd_soc_card
*card
= &snd_soc_omap_hdmi
;
53 card
->dev
= &pdev
->dev
;
55 ret
= snd_soc_register_card(card
);
57 dev_err(&pdev
->dev
, "snd_soc_register_card failed (%d)\n", ret
);
64 static int omap_hdmi_remove(struct platform_device
*pdev
)
66 struct snd_soc_card
*card
= platform_get_drvdata(pdev
);
68 snd_soc_unregister_card(card
);
73 static struct platform_driver omap_hdmi_driver
= {
78 .probe
= omap_hdmi_probe
,
79 .remove
= omap_hdmi_remove
,
82 module_platform_driver(omap_hdmi_driver
);
84 MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
85 MODULE_DESCRIPTION("OMAP HDMI machine ASoC driver");
86 MODULE_LICENSE("GPL");
87 MODULE_ALIAS("platform:" DRV_NAME
);