blob: 0fe2346a9aa29e3064c2d13a86f62add8b0804d1 [file] [log] [blame]
Vladimir Barinov310355c2008-02-18 11:40:22 +01001/*
2 * ALSA PCM interface for the TI DAVINCI processor
3 *
Vladimir Barinovd6b52032008-09-29 23:14:11 +04004 * Author: Vladimir Barinov, <vbarinov@embeddedalley.com>
Vladimir Barinov310355c2008-02-18 11:40:22 +01005 * Copyright: (C) 2007 MontaVista Software, Inc., <source@mvista.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef _DAVINCI_PCM_H
13#define _DAVINCI_PCM_H
14
Matt Porterb8ec56d2012-10-17 16:08:03 +020015#include <linux/genalloc.h>
Hebbar, Gururaja896f66b2012-08-27 18:56:41 +053016#include <linux/platform_data/davinci_asp.h>
Matt Porter3ad7a422013-03-06 11:15:31 -050017#include <linux/platform_data/edma.h>
Chaithrika U Sb67f4482009-06-05 06:28:40 -040018
Vladimir Barinov310355c2008-02-18 11:40:22 +010019struct davinci_pcm_dma_params {
Chaithrika U Sb67f4482009-06-05 06:28:40 -040020 int channel; /* sync dma channel ID */
Chaithrika U S6a99fb52009-08-11 16:58:52 -040021 unsigned short acnt;
Chaithrika U Sb67f4482009-06-05 06:28:40 -040022 dma_addr_t dma_addr; /* device physical address for DMA */
Troy Kisky1e224f32009-11-18 17:49:53 -070023 unsigned sram_size;
Matt Porterb8ec56d2012-10-17 16:08:03 +020024 struct gen_pool *sram_pool; /* SRAM gen_pool for ping pong */
Sekhar Nori48519f02010-07-19 12:31:16 +053025 enum dma_event_q asp_chan_q; /* event queue number for ASP channel */
26 enum dma_event_q ram_chan_q; /* event queue number for RAM channel */
Chaithrika U Sb67f4482009-06-05 06:28:40 -040027 unsigned char data_type; /* xfer data type */
28 unsigned char convert_mono_stereo;
Chaithrika U S4fa9c1a2009-09-30 17:32:27 -040029 unsigned int fifo_level;
Vladimir Barinov310355c2008-02-18 11:40:22 +010030};
31
Peter Ujfalusi1a95d8d2014-03-18 15:20:37 +020032#if IS_ENABLED(CONFIG_SND_DAVINCI_SOC)
Hebbar, Gururajaf08095a2012-08-27 18:56:39 +053033int davinci_soc_platform_register(struct device *dev);
Peter Ujfalusi1a95d8d2014-03-18 15:20:37 +020034#else
35static inline int davinci_soc_platform_register(struct device *dev)
36{
37 return 0;
38}
Peter Ujfalusi1a95d8d2014-03-18 15:20:37 +020039#endif /* CONFIG_SND_DAVINCI_SOC */
Hebbar, Gururajaf08095a2012-08-27 18:56:39 +053040
Vladimir Barinov310355c2008-02-18 11:40:22 +010041#endif