~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/txx9/txx9aclc-generic.c

Version: ~ [ linux-5.18 ] ~ [ linux-5.17.9 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.41 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.117 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.195 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.244 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.280 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.315 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * Generic TXx9 ACLC machine driver
  4  *
  5  * Copyright (C) 2009 Atsushi Nemoto
  6  *
  7  * Based on RBTX49xx patch from CELF patch archive.
  8  * (C) Copyright TOSHIBA CORPORATION 2004-2006
  9  *
 10  * This is a very generic AC97 sound machine driver for boards which
 11  * have (AC97) audio at ACLC (e.g. RBTX49XX boards).
 12  */
 13 
 14 #include <linux/module.h>
 15 #include <linux/platform_device.h>
 16 #include <sound/core.h>
 17 #include <sound/pcm.h>
 18 #include <sound/soc.h>
 19 #include "txx9aclc.h"
 20 
 21 static struct snd_soc_dai_link txx9aclc_generic_dai = {
 22         .name = "AC97",
 23         .stream_name = "AC97 HiFi",
 24         .cpu_dai_name = "txx9aclc-ac97",
 25         .codec_dai_name = "ac97-hifi",
 26         .platform_name  = "txx9aclc-pcm-audio",
 27         .codec_name     = "ac97-codec",
 28 };
 29 
 30 static struct snd_soc_card txx9aclc_generic_card = {
 31         .name           = "Generic TXx9 ACLC Audio",
 32         .owner          = THIS_MODULE,
 33         .dai_link       = &txx9aclc_generic_dai,
 34         .num_links      = 1,
 35 };
 36 
 37 static struct platform_device *soc_pdev;
 38 
 39 static int __init txx9aclc_generic_probe(struct platform_device *pdev)
 40 {
 41         int ret;
 42 
 43         soc_pdev = platform_device_alloc("soc-audio", -1);
 44         if (!soc_pdev)
 45                 return -ENOMEM;
 46         platform_set_drvdata(soc_pdev, &txx9aclc_generic_card);
 47         ret = platform_device_add(soc_pdev);
 48         if (ret) {
 49                 platform_device_put(soc_pdev);
 50                 return ret;
 51         }
 52 
 53         return 0;
 54 }
 55 
 56 static int __exit txx9aclc_generic_remove(struct platform_device *pdev)
 57 {
 58         platform_device_unregister(soc_pdev);
 59         return 0;
 60 }
 61 
 62 static struct platform_driver txx9aclc_generic_driver = {
 63         .remove = __exit_p(txx9aclc_generic_remove),
 64         .driver = {
 65                 .name = "txx9aclc-generic",
 66         },
 67 };
 68 
 69 static int __init txx9aclc_generic_init(void)
 70 {
 71         return platform_driver_probe(&txx9aclc_generic_driver,
 72                                      txx9aclc_generic_probe);
 73 }
 74 
 75 static void __exit txx9aclc_generic_exit(void)
 76 {
 77         platform_driver_unregister(&txx9aclc_generic_driver);
 78 }
 79 
 80 module_init(txx9aclc_generic_init);
 81 module_exit(txx9aclc_generic_exit);
 82 
 83 MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>");
 84 MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver");
 85 MODULE_LICENSE("GPL");
 86 MODULE_ALIAS("platform:txx9aclc-generic");
 87 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp