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

TOMOYO Linux Cross Reference
Linux/sound/soc/amd/renoir/acp3x-rn.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ 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+
  2 //
  3 // Machine driver for AMD Renoir platform using DMIC
  4 //
  5 //Copyright 2020 Advanced Micro Devices, Inc.
  6 
  7 #include <sound/soc.h>
  8 #include <sound/soc-dapm.h>
  9 #include <linux/module.h>
 10 #include <sound/pcm.h>
 11 #include <sound/pcm_params.h>
 12 #include <linux/io.h>
 13 
 14 #include "rn_acp3x.h"
 15 
 16 #define DRV_NAME "acp_pdm_mach"
 17 
 18 SND_SOC_DAILINK_DEF(acp_pdm,
 19                     DAILINK_COMP_ARRAY(COMP_CPU("acp_rn_pdm_dma.0")));
 20 
 21 SND_SOC_DAILINK_DEF(dmic_codec,
 22                     DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec.0",
 23                                                   "dmic-hifi")));
 24 
 25 SND_SOC_DAILINK_DEF(platform,
 26                     DAILINK_COMP_ARRAY(COMP_PLATFORM("acp_rn_pdm_dma.0")));
 27 
 28 static struct snd_soc_dai_link acp_dai_pdm[] = {
 29         {
 30                 .name = "acp3x-dmic-capture",
 31                 .stream_name = "DMIC capture",
 32                 .capture_only = 1,
 33                 SND_SOC_DAILINK_REG(acp_pdm, dmic_codec, platform),
 34         },
 35 };
 36 
 37 static struct snd_soc_card acp_card = {
 38         .name = "acp",
 39         .owner = THIS_MODULE,
 40         .dai_link = acp_dai_pdm,
 41         .num_links = 1,
 42 };
 43 
 44 static int acp_probe(struct platform_device *pdev)
 45 {
 46         int ret;
 47         struct acp_pdm *machine = NULL;
 48         struct snd_soc_card *card;
 49 
 50         card = &acp_card;
 51         acp_card.dev = &pdev->dev;
 52 
 53         platform_set_drvdata(pdev, card);
 54         snd_soc_card_set_drvdata(card, machine);
 55         ret = devm_snd_soc_register_card(&pdev->dev, card);
 56         if (ret) {
 57                 return dev_err_probe(&pdev->dev, ret,
 58                                 "snd_soc_register_card(%s) failed\n",
 59                                 card->name);
 60         }
 61         return 0;
 62 }
 63 
 64 static struct platform_driver acp_mach_driver = {
 65         .driver = {
 66                 .name = "acp_pdm_mach",
 67                 .pm = &snd_soc_pm_ops,
 68         },
 69         .probe = acp_probe,
 70 };
 71 
 72 module_platform_driver(acp_mach_driver);
 73 
 74 MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
 75 MODULE_DESCRIPTION("AMD Renoir support for DMIC");
 76 MODULE_LICENSE("GPL v2");
 77 MODULE_ALIAS("platform:" DRV_NAME);
 78 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php