Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * DB1000/DB1500/DB1100 ASoC audio fabric support code.
0004  *
0005  * (c) 2011 Manuel Lauss <manuel.lauss@googlemail.com>
0006  *
0007  */
0008 
0009 #include <linux/module.h>
0010 #include <linux/moduleparam.h>
0011 #include <linux/timer.h>
0012 #include <linux/interrupt.h>
0013 #include <linux/platform_device.h>
0014 #include <sound/core.h>
0015 #include <sound/pcm.h>
0016 #include <sound/soc.h>
0017 #include <asm/mach-au1x00/au1000.h>
0018 #include <asm/mach-db1x00/bcsr.h>
0019 
0020 #include "psc.h"
0021 
0022 SND_SOC_DAILINK_DEFS(hifi,
0023     DAILINK_COMP_ARRAY(COMP_CPU("alchemy-ac97c")),
0024     DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")),
0025     DAILINK_COMP_ARRAY(COMP_PLATFORM("alchemy-pcm-dma.0")));
0026 
0027 static struct snd_soc_dai_link db1000_ac97_dai = {
0028     .name       = "AC97",
0029     .stream_name    = "AC97 HiFi",
0030     SND_SOC_DAILINK_REG(hifi),
0031 };
0032 
0033 static struct snd_soc_card db1000_ac97 = {
0034     .name       = "DB1000_AC97",
0035     .owner      = THIS_MODULE,
0036     .dai_link   = &db1000_ac97_dai,
0037     .num_links  = 1,
0038 };
0039 
0040 static int db1000_audio_probe(struct platform_device *pdev)
0041 {
0042     struct snd_soc_card *card = &db1000_ac97;
0043     card->dev = &pdev->dev;
0044     return devm_snd_soc_register_card(&pdev->dev, card);
0045 }
0046 
0047 static struct platform_driver db1000_audio_driver = {
0048     .driver = {
0049         .name   = "db1000-audio",
0050         .pm = &snd_soc_pm_ops,
0051     },
0052     .probe      = db1000_audio_probe,
0053 };
0054 
0055 module_platform_driver(db1000_audio_driver);
0056 
0057 MODULE_LICENSE("GPL");
0058 MODULE_DESCRIPTION("DB1000/DB1500/DB1100 ASoC audio");
0059 MODULE_AUTHOR("Manuel Lauss");