2019-06-04 11:11:33 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2006-10-12 16:26:55 +04:00
|
|
|
/*
|
|
|
|
* linux/sound/arm/pxa2xx-pcm.c -- ALSA PCM interface for the Intel PXA2xx chip
|
|
|
|
*
|
|
|
|
* Author: Nicolas Pitre
|
|
|
|
* Created: Nov 30, 2004
|
|
|
|
* Copyright: (C) 2004 MontaVista Software, Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/dma-mapping.h>
|
2011-07-15 20:38:28 +04:00
|
|
|
#include <linux/module.h>
|
2013-08-12 12:42:39 +04:00
|
|
|
#include <linux/dmaengine.h>
|
2013-08-12 12:42:41 +04:00
|
|
|
#include <linux/of.h>
|
2006-10-12 16:26:55 +04:00
|
|
|
|
|
|
|
#include <sound/core.h>
|
|
|
|
#include <sound/soc.h>
|
2008-09-10 05:01:20 +04:00
|
|
|
#include <sound/pxa2xx-lib.h>
|
2013-08-12 12:42:39 +04:00
|
|
|
#include <sound/dmaengine_pcm.h>
|
2006-10-12 16:26:55 +04:00
|
|
|
|
2018-01-29 05:48:35 +03:00
|
|
|
static const struct snd_soc_component_driver pxa2xx_soc_platform = {
|
2019-10-02 08:33:50 +03:00
|
|
|
.pcm_construct = pxa2xx_soc_pcm_new,
|
|
|
|
.open = pxa2xx_soc_pcm_open,
|
|
|
|
.close = pxa2xx_soc_pcm_close,
|
|
|
|
.hw_params = pxa2xx_soc_pcm_hw_params,
|
|
|
|
.prepare = pxa2xx_soc_pcm_prepare,
|
|
|
|
.trigger = pxa2xx_soc_pcm_trigger,
|
|
|
|
.pointer = pxa2xx_soc_pcm_pointer,
|
2006-10-12 16:26:55 +04:00
|
|
|
};
|
|
|
|
|
2012-12-07 18:26:17 +04:00
|
|
|
static int pxa2xx_soc_platform_probe(struct platform_device *pdev)
|
2008-12-03 22:58:17 +03:00
|
|
|
{
|
2018-01-29 05:48:35 +03:00
|
|
|
return devm_snd_soc_register_component(&pdev->dev, &pxa2xx_soc_platform,
|
|
|
|
NULL, 0);
|
2010-03-17 23:15:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct platform_driver pxa_pcm_driver = {
|
|
|
|
.driver = {
|
2013-08-12 12:42:41 +04:00
|
|
|
.name = "pxa-pcm-audio",
|
2010-03-17 23:15:21 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
.probe = pxa2xx_soc_platform_probe,
|
|
|
|
};
|
|
|
|
|
2011-11-25 06:13:37 +04:00
|
|
|
module_platform_driver(pxa_pcm_driver);
|
2008-12-03 22:58:17 +03:00
|
|
|
|
2006-10-12 16:26:55 +04:00
|
|
|
MODULE_AUTHOR("Nicolas Pitre");
|
|
|
|
MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module");
|
|
|
|
MODULE_LICENSE("GPL");
|
2016-05-06 18:27:34 +03:00
|
|
|
MODULE_ALIAS("platform:pxa-pcm-audio");
|