mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 12:17:31 +07:00
1802d0beec
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49 lines
1.4 KiB
C
49 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* edma-pcm.c - eDMA PCM driver using dmaengine for AM3xxx, AM4xxx
|
|
*
|
|
* Copyright (C) 2014 Texas Instruments, Inc.
|
|
*
|
|
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
|
*
|
|
* Based on: sound/soc/tegra/tegra_pcm.c
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
#include <sound/core.h>
|
|
#include <sound/pcm.h>
|
|
#include <sound/pcm_params.h>
|
|
#include <sound/soc.h>
|
|
#include <sound/dmaengine_pcm.h>
|
|
|
|
#include "edma-pcm.h"
|
|
|
|
static const struct snd_pcm_hardware edma_pcm_hardware = {
|
|
.info = SNDRV_PCM_INFO_MMAP |
|
|
SNDRV_PCM_INFO_MMAP_VALID |
|
|
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME |
|
|
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP |
|
|
SNDRV_PCM_INFO_INTERLEAVED,
|
|
.buffer_bytes_max = 128 * 1024,
|
|
.period_bytes_min = 32,
|
|
.period_bytes_max = 64 * 1024,
|
|
.periods_min = 2,
|
|
.periods_max = 19, /* Limit by edma dmaengine driver */
|
|
};
|
|
|
|
static const struct snd_dmaengine_pcm_config edma_dmaengine_pcm_config = {
|
|
.pcm_hardware = &edma_pcm_hardware,
|
|
.prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
|
|
.prealloc_buffer_size = 128 * 1024,
|
|
};
|
|
|
|
int edma_pcm_platform_register(struct device *dev)
|
|
{
|
|
return devm_snd_dmaengine_pcm_register(dev, &edma_dmaengine_pcm_config, 0);
|
|
}
|
|
EXPORT_SYMBOL_GPL(edma_pcm_platform_register);
|
|
|
|
MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
|
|
MODULE_DESCRIPTION("eDMA PCM ASoC platform driver");
|
|
MODULE_LICENSE("GPL");
|