davinci-mcasp.h 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * ALSA SoC McASP Audio Layer for TI DAVINCI processor
 *
 * MCASP related definitions
 *
 * Author: Nirmal Pandey <n-pandey@ti.com>,
 *         Suresh Rajashekara <suresh.r@ti.com>
 *         Steve Chen <schen@.mvista.com>
 *
 * Copyright:   (C) 2009 MontaVista Software, Inc., <source@mvista.com>
 * Copyright:   (C) 2009  Texas Instruments, India
 *
 * 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.
 */

#ifndef DAVINCI_MCASP_H
#define DAVINCI_MCASP_H

#include <linux/io.h>
22 23
#include <linux/platform_data/davinci_asp.h>

24 25
#include "davinci-pcm.h"

26
#define DAVINCI_MCASP_RATES	SNDRV_PCM_RATE_8000_192000
27 28 29 30 31 32 33 34 35 36 37 38 39 40
#define DAVINCI_MCASP_I2S_DAI	0
#define DAVINCI_MCASP_DIT_DAI	1

enum {
	DAVINCI_AUDIO_WORD_8 = 0,
	DAVINCI_AUDIO_WORD_12,
	DAVINCI_AUDIO_WORD_16,
	DAVINCI_AUDIO_WORD_20,
	DAVINCI_AUDIO_WORD_24,
	DAVINCI_AUDIO_WORD_32,
	DAVINCI_AUDIO_WORD_28,  /* This is only valid for McASP */
};

struct davinci_audio_dev {
41
	struct davinci_pcm_dma_params dma_params[2];
42 43
	void __iomem *base;
	int sample_rate;
44
	struct device *dev;
45 46 47 48 49 50 51
	unsigned int codec_fmt;

	/* McASP specific data */
	int	tdm_slots;
	u8	op_mode;
	u8	num_serializer;
	u8	*serial_dir;
52 53 54 55 56
	u8	version;

	/* McASP FIFO related */
	u8	txnumevt;
	u8	rxnumevt;
57 58 59
};

#endif	/* DAVINCI_MCASP_H */