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

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

Version: ~ [ linux-5.15-rc7 ] ~ [ linux-5.14.14 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.75 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.155 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.213 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.252 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.287 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.289 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ 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 /* supported machines:
 11  *
 12  * Machine      Connections             AMP
 13  * -------      -----------             ---
 14  * BAST         MIC, HPOUT, LOUT, LIN   TPA2001D1 (HPOUTL,R) (gain hardwired)
 15  * VR1000       HPOUT, LIN              None
 16  * VR2000       LIN, LOUT, MIC, HP      LM4871 (HPOUTL,R)
 17  * DePicture    LIN, LOUT, MIC, HP      LM4871 (HPOUTL,R)
 18  * Anubis       LIN, LOUT, MIC, HP      TPA2001D1 (HPOUTL,R)
 19  */
 20 
 21 static const struct snd_soc_dapm_widget dapm_widgets[] = {
 22         SND_SOC_DAPM_HP("Headphone Jack", NULL),
 23         SND_SOC_DAPM_LINE("Line In", NULL),
 24         SND_SOC_DAPM_LINE("Line Out", NULL),
 25         SND_SOC_DAPM_MIC("Mic Jack", NULL),
 26 };
 27 
 28 static const struct snd_soc_dapm_route base_map[] = {
 29         { "Headphone Jack", NULL, "LHPOUT"},
 30         { "Headphone Jack", NULL, "RHPOUT"},
 31 
 32         { "Line Out", NULL, "LOUT" },
 33         { "Line Out", NULL, "ROUT" },
 34 
 35         { "LLINEIN", NULL, "Line In"},
 36         { "RLINEIN", NULL, "Line In"},
 37 
 38         { "MICIN", NULL, "Mic Jack"},
 39 };
 40 
 41 /**
 42  * simtec_tlv320aic23_init - initialise and add controls
 43  * @codec; The codec instance to attach to.
 44  *
 45  * Attach our controls and configure the necessary codec
 46  * mappings for our sound card instance.
 47 */
 48 static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
 49 {
 50         simtec_audio_init(rtd);
 51 
 52         return 0;
 53 }
 54 
 55 SND_SOC_DAILINK_DEFS(tlv320aic23,
 56         DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")),
 57         DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.0-001a",
 58                                       "tlv320aic3x-hifi")),
 59         DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis")));
 60 
 61 static struct snd_soc_dai_link simtec_dai_aic23 = {
 62         .name           = "tlv320aic23",
 63         .stream_name    = "TLV320AIC23",
 64         .init           = simtec_tlv320aic23_init,
 65         SND_SOC_DAILINK_REG(tlv320aic23),
 66 };
 67 
 68 /* simtec audio machine driver */
 69 static struct snd_soc_card snd_soc_machine_simtec_aic23 = {
 70         .name           = "Simtec",
 71         .owner          = THIS_MODULE,
 72         .dai_link       = &simtec_dai_aic23,
 73         .num_links      = 1,
 74 
 75         .dapm_widgets   = dapm_widgets,
 76         .num_dapm_widgets = ARRAY_SIZE(dapm_widgets),
 77         .dapm_routes    = base_map,
 78         .num_dapm_routes = ARRAY_SIZE(base_map),
 79 };
 80 
 81 static int simtec_audio_tlv320aic23_probe(struct platform_device *pd)
 82 {
 83         return simtec_audio_core_probe(pd, &snd_soc_machine_simtec_aic23);
 84 }
 85 
 86 static struct platform_driver simtec_audio_tlv320aic23_driver = {
 87         .driver = {
 88                 .name   = "s3c24xx-simtec-tlv320aic23",
 89                 .pm     = simtec_audio_pm,
 90         },
 91         .probe  = simtec_audio_tlv320aic23_probe,
 92         .remove = simtec_audio_remove,
 93 };
 94 
 95 module_platform_driver(simtec_audio_tlv320aic23_driver);
 96 
 97 MODULE_ALIAS("platform:s3c24xx-simtec-tlv320aic23");
 98 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
 99 MODULE_DESCRIPTION("ALSA SoC Simtec Audio support");
100 MODULE_LICENSE("GPL");
101 

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