2 * Generic TXx9 ACLC machine driver
4 * Copyright (C) 2009 Atsushi Nemoto
6 * Based on RBTX49xx patch from CELF patch archive.
7 * (C) Copyright TOSHIBA CORPORATION 2004-2006
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 * This is a very generic AC97 sound machine driver for boards which
14 * have (AC97) audio at ACLC (e.g. RBTX49XX boards).
17 #include <linux/module.h>
18 #include <linux/platform_device.h>
19 #include <sound/core.h>
20 #include <sound/pcm.h>
21 #include <sound/soc.h>
24 static struct snd_soc_dai_link txx9aclc_generic_dai = {
26 .stream_name = "AC97 HiFi",
27 .cpu_dai_name = "txx9aclc-ac97",
28 .codec_dai_name = "ac97-hifi",
29 .platform_name = "txx9aclc-pcm-audio",
30 .codec_name = "ac97-codec",
33 static struct snd_soc_card txx9aclc_generic_card = {
34 .name = "Generic TXx9 ACLC Audio",
36 .dai_link = &txx9aclc_generic_dai,
40 static struct platform_device *soc_pdev;
42 static int __init txx9aclc_generic_probe(struct platform_device *pdev)
46 soc_pdev = platform_device_alloc("soc-audio", -1);
49 platform_set_drvdata(soc_pdev, &txx9aclc_generic_card);
50 ret = platform_device_add(soc_pdev);
52 platform_device_put(soc_pdev);
59 static int __exit txx9aclc_generic_remove(struct platform_device *pdev)
61 platform_device_unregister(soc_pdev);
65 static struct platform_driver txx9aclc_generic_driver = {
66 .remove = __exit_p(txx9aclc_generic_remove),
68 .name = "txx9aclc-generic",
73 static int __init txx9aclc_generic_init(void)
75 return platform_driver_probe(&txx9aclc_generic_driver,
76 txx9aclc_generic_probe);
79 static void __exit txx9aclc_generic_exit(void)
81 platform_driver_unregister(&txx9aclc_generic_driver);
84 module_init(txx9aclc_generic_init);
85 module_exit(txx9aclc_generic_exit);
87 MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
88 MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver");
89 MODULE_LICENSE("GPL");
90 MODULE_ALIAS("platform:txx9aclc-generic");