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

TOMOYO Linux Cross Reference
Linux/sound/soc/pxa/em-x270.c

Version: ~ [ linux-6.4-rc3 ] ~ [ linux-6.3.4 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.30 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.113 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.180 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.243 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.283 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.315 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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-or-later
  2 /*
  3  * SoC audio driver for EM-X270, eXeda and CM-X300
  4  *
  5  * Copyright 2007, 2009 CompuLab, Ltd.
  6  *
  7  * Author: Mike Rapoport <mike@compulab.co.il>
  8  *
  9  * Copied from tosa.c:
 10  * Copyright 2005 Wolfson Microelectronics PLC.
 11  * Copyright 2005 Openedhand Ltd.
 12  *
 13  * Authors: Liam Girdwood <lrg@slimlogic.co.uk>
 14  *          Richard Purdie <richard@openedhand.com>
 15  */
 16 
 17 #include <linux/module.h>
 18 #include <linux/moduleparam.h>
 19 #include <linux/device.h>
 20 
 21 #include <sound/core.h>
 22 #include <sound/pcm.h>
 23 #include <sound/soc.h>
 24 
 25 #include <asm/mach-types.h>
 26 #include <mach/audio.h>
 27 
 28 SND_SOC_DAILINK_DEFS(ac97,
 29         DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")),
 30         DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")),
 31         DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio")));
 32 
 33 SND_SOC_DAILINK_DEFS(ac97_aux,
 34         DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")),
 35         DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-aux")),
 36         DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio")));
 37 
 38 static struct snd_soc_dai_link em_x270_dai[] = {
 39         {
 40                 .name = "AC97",
 41                 .stream_name = "AC97 HiFi",
 42                 SND_SOC_DAILINK_REG(ac97),
 43         },
 44         {
 45                 .name = "AC97 Aux",
 46                 .stream_name = "AC97 Aux",
 47                 SND_SOC_DAILINK_REG(ac97_aux),
 48         },
 49 };
 50 
 51 static struct snd_soc_card em_x270 = {
 52         .name = "EM-X270",
 53         .owner = THIS_MODULE,
 54         .dai_link = em_x270_dai,
 55         .num_links = ARRAY_SIZE(em_x270_dai),
 56 };
 57 
 58 static struct platform_device *em_x270_snd_device;
 59 
 60 static int __init em_x270_init(void)
 61 {
 62         int ret;
 63 
 64         if (!(machine_is_em_x270() || machine_is_exeda()
 65               || machine_is_cm_x300()))
 66                 return -ENODEV;
 67 
 68         em_x270_snd_device = platform_device_alloc("soc-audio", -1);
 69         if (!em_x270_snd_device)
 70                 return -ENOMEM;
 71 
 72         platform_set_drvdata(em_x270_snd_device, &em_x270);
 73         ret = platform_device_add(em_x270_snd_device);
 74 
 75         if (ret)
 76                 platform_device_put(em_x270_snd_device);
 77 
 78         return ret;
 79 }
 80 
 81 static void __exit em_x270_exit(void)
 82 {
 83         platform_device_unregister(em_x270_snd_device);
 84 }
 85 
 86 module_init(em_x270_init);
 87 module_exit(em_x270_exit);
 88 
 89 /* Module information */
 90 MODULE_AUTHOR("Mike Rapoport");
 91 MODULE_DESCRIPTION("ALSA SoC EM-X270, eXeda and CM-X300");
 92 MODULE_LICENSE("GPL");
 93 

~ [ 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