blob: 950e3e0c971d36c868ca0d1898c6f312be6686db [file] [log] [blame]
Kuninori Morimoto41a686e2010-08-31 14:46:53 +09001/*
2 * FSI - HDMI sound support
3 *
4 * Copyright (C) 2010 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
12#include <linux/platform_device.h>
13#include <sound/sh_fsi.h>
14#include <video/sh_mobile_hdmi.h>
15
16static struct snd_soc_dai_link fsi_dai_link = {
17 .name = "HDMI",
18 .stream_name = "HDMI",
19 .cpu_dai_name = "fsib-dai", /* fsi B */
20 .codec_dai_name = "sh_mobile_hdmi-hifi",
21 .platform_name = "sh_fsi2",
22 .codec_name = "sh-mobile-hdmi",
23};
24
25static struct snd_soc_card fsi_soc_card = {
26 .name = "FSI",
27 .dai_link = &fsi_dai_link,
28 .num_links = 1,
29};
30
31static struct platform_device *fsi_snd_device;
32
33static int __init fsi_hdmi_init(void)
34{
35 int ret = -ENOMEM;
36
37 fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B);
38 if (!fsi_snd_device)
39 goto out;
40
41 platform_set_drvdata(fsi_snd_device, &fsi_soc_card);
42 ret = platform_device_add(fsi_snd_device);
43
44 if (ret)
45 platform_device_put(fsi_snd_device);
46
47out:
48 return ret;
49}
50
51static void __exit fsi_hdmi_exit(void)
52{
53 platform_device_unregister(fsi_snd_device);
54}
55
56module_init(fsi_hdmi_init);
57module_exit(fsi_hdmi_exit);
58
59MODULE_LICENSE("GPL");
60MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card");
61MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");