brintos

brintos / linux-shallow public Read only

0
0
Text · 1.3 KiB · 5ecb467 Raw
51 lines · c
1// SPDX-License-Identifier: GPL-2.0-only2/*3 * linux/sound/arm/ep93xx-pcm.c - EP93xx ALSA PCM interface4 *5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>6 * Copyright (C) 2006 Applied Data Systems7 *8 * Rewritten for the SoC audio subsystem (Based on PXA2xx code):9 *   Copyright (c) 2008 Ryan Mallon10 */11 12#include <linux/module.h>13#include <linux/init.h>14#include <linux/platform_device.h>15#include <linux/dmaengine.h>16 17#include <sound/pcm.h>18#include <sound/soc.h>19#include <sound/dmaengine_pcm.h>20 21#include "ep93xx-pcm.h"22 23static const struct snd_pcm_hardware ep93xx_pcm_hardware = {24	.info			= (SNDRV_PCM_INFO_MMAP		|25				   SNDRV_PCM_INFO_MMAP_VALID	|26				   SNDRV_PCM_INFO_INTERLEAVED	|27				   SNDRV_PCM_INFO_BLOCK_TRANSFER),28	.buffer_bytes_max	= 131072,29	.period_bytes_min	= 32,30	.period_bytes_max	= 32768,31	.periods_min		= 1,32	.periods_max		= 32,33	.fifo_size		= 32,34};35 36static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {37	.pcm_hardware = &ep93xx_pcm_hardware,38	.prealloc_buffer_size = 131072,39};40 41int devm_ep93xx_pcm_platform_register(struct device *dev)42{43	return devm_snd_dmaengine_pcm_register(dev,44		&ep93xx_dmaengine_pcm_config, 0);45}46EXPORT_SYMBOL_GPL(devm_ep93xx_pcm_platform_register);47 48MODULE_AUTHOR("Ryan Mallon");49MODULE_DESCRIPTION("EP93xx ALSA PCM interface");50MODULE_LICENSE("GPL");51