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

TOMOYO Linux Cross Reference
Linux/sound/soc/samsung/s3c24xx_simtec_hermes.c

Version: ~ [ linux-5.10-rc1 ] ~ [ linux-5.9.1 ] ~ [ linux-5.8.16 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.72 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.152 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.202 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.240 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.240 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 //
  3 // Copyright 2009 Simtec Electronics
  4 
  5 #include <linux/module.h>
  6 #include <sound/soc.h>
  7 
  8 #include "s3c24xx_simtec.h"
  9 
 10 static const struct snd_soc_dapm_widget dapm_widgets[] = {
 11         SND_SOC_DAPM_LINE("GSM Out", NULL),
 12         SND_SOC_DAPM_LINE("GSM In", NULL),
 13         SND_SOC_DAPM_LINE("Line In", NULL),
 14         SND_SOC_DAPM_LINE("Line Out", NULL),
 15         SND_SOC_DAPM_LINE("ZV", NULL),
 16         SND_SOC_DAPM_MIC("Mic Jack", NULL),
 17         SND_SOC_DAPM_HP("Headphone Jack", NULL),
 18 };
 19 
 20 static const struct snd_soc_dapm_route base_map[] = {
 21         /* Headphone connected to HP{L,R}OUT and HP{L,R}COM */
 22 
 23         { "Headphone Jack", NULL, "HPLOUT" },
 24         { "Headphone Jack", NULL, "HPLCOM" },
 25         { "Headphone Jack", NULL, "HPROUT" },
 26         { "Headphone Jack", NULL, "HPRCOM" },
 27 
 28         /* ZV connected to Line1 */
 29 
 30         { "LINE1L", NULL, "ZV" },
 31         { "LINE1R", NULL, "ZV" },
 32 
 33         /* Line In connected to Line2 */
 34 
 35         { "LINE2L", NULL, "Line In" },
 36         { "LINE2R", NULL, "Line In" },
 37 
 38         /* Microphone connected to MIC3R and MIC_BIAS */
 39 
 40         { "MIC3L", NULL, "Mic Jack" },
 41 
 42         /* GSM connected to MONO_LOUT and MIC3L (in) */
 43 
 44         { "GSM Out", NULL, "MONO_LOUT" },
 45         { "MIC3L", NULL, "GSM In" },
 46 
 47         /* Speaker is connected to LINEOUT{LN,LP,RN,RP}, however we are
 48          * not using the DAPM to power it up and down as there it makes
 49          * a click when powering up. */
 50 };
 51 
 52 /**
 53  * simtec_hermes_init - initialise and add controls
 54  * @codec; The codec instance to attach to.
 55  *
 56  * Attach our controls and configure the necessary codec
 57  * mappings for our sound card instance.
 58 */
 59 static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)
 60 {
 61         simtec_audio_init(rtd);
 62 
 63         return 0;
 64 }
 65 
 66 SND_SOC_DAILINK_DEFS(tlv320aic33,
 67         DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")),
 68         DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.0-001a",
 69                                       "tlv320aic3x-hifi")),
 70         DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis")));
 71 
 72 static struct snd_soc_dai_link simtec_dai_aic33 = {
 73         .name           = "tlv320aic33",
 74         .stream_name    = "TLV320AIC33",
 75         .init           = simtec_hermes_init,
 76         SND_SOC_DAILINK_REG(tlv320aic33),
 77 };
 78 
 79 /* simtec audio machine driver */
 80 static struct snd_soc_card snd_soc_machine_simtec_aic33 = {
 81         .name           = "Simtec-Hermes",
 82         .owner          = THIS_MODULE,
 83         .dai_link       = &simtec_dai_aic33,
 84         .num_links      = 1,
 85 
 86         .dapm_widgets   = dapm_widgets,
 87         .num_dapm_widgets = ARRAY_SIZE(dapm_widgets),
 88         .dapm_routes    = base_map,
 89         .num_dapm_routes = ARRAY_SIZE(base_map),
 90 };
 91 
 92 static int simtec_audio_hermes_probe(struct platform_device *pd)
 93 {
 94         dev_info(&pd->dev, "probing....\n");
 95         return simtec_audio_core_probe(pd, &snd_soc_machine_simtec_aic33);
 96 }
 97 
 98 static struct platform_driver simtec_audio_hermes_platdrv = {
 99         .driver = {
100                 .name   = "s3c24xx-simtec-hermes-snd",
101                 .pm     = simtec_audio_pm,
102         },
103         .probe  = simtec_audio_hermes_probe,
104         .remove = simtec_audio_remove,
105 };
106 
107 module_platform_driver(simtec_audio_hermes_platdrv);
108 
109 MODULE_ALIAS("platform:s3c24xx-simtec-hermes-snd");
110 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
111 MODULE_DESCRIPTION("ALSA SoC Simtec Audio support");
112 MODULE_LICENSE("GPL");
113 

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