aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_asrc.h
blob: fc518f12c5533f09d71eb9239bdcd164ba3a8401 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * fsl_asrc.h - ALSA ASRC interface
 *
 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.  This file is licensed
 * under the terms of the GNU General Public License version 2.  This
 * program is licensed "as is" without any warranty of any kind, whether
 * express or implied.
 */

#ifndef _FSL_ASRC_P2P_H
#define _FSL_ASRC_P2P_H

#include <linux/mxc_asrc.h>
#include <sound/dmaengine_pcm.h>
#include <linux/platform_data/dma-imx.h>

enum peripheral_device_type {
	UNKNOWN,
	SSI1,
	SSI2,
	SSI3,
	ESAI,
};

struct fsl_asrc_p2p_params {
	enum asrc_pair_index asrc_index;
	struct dma_async_tx_descriptor  *desc;
	struct dma_chan                 *dma_chan;
	struct imx_dma_data              dma_data;
};

struct fsl_asrc_p2p {
	int p2p_rate;
	int p2p_width;
	enum peripheral_device_type per_dev;
	struct asrc_p2p_ops asrc_ops;

	struct snd_dmaengine_dai_dma_data dma_params_rx;
	struct snd_dmaengine_dai_dma_data dma_params_tx;
	struct imx_dma_data filter_data_tx;
	struct imx_dma_data filter_data_rx;
	struct snd_pcm_substream *substream[2];

	/* playback and record p2p params */
	struct fsl_asrc_p2p_params p2p_params[2];
	struct platform_device *soc_platform_pdev;

	int dmarx[3];
	int dmatx[3];

	char name[32];
};

#endif