#ifndef _MPC5XXX_I2S_H
#define _MPC5XXX_I2S_H

#include <linux/ioctl.h>

#define I2S_IOCTL_BASE 'I'
#define I2S_SET_CHANNEL _IOW(I2S_IOCTL_BASE, 1, struct i2s_ioctl)
struct i2s_ioctl {
	int psc_num;  /* psc number, 1-3 */
	int data_width; /* 8,16,24,32 */
	int mclk_div;    /* 528 MHz / MCLK divider, (0x1ff + 1) max */
	int bclk_div;     /* MCLK/BCLK divider, (0x1ff + 1) max */
	int frsync_div;     /* BCLK/LRCK divider, (0x1ff + 1) max */
	int mclk; /* provide MCLK */
	int master; /* Generate SCK and LRCK */
};
/* For unknown reasons it does not work with big BUFSIZE */
/* #define BUFSIZE 4096 */
#define BUFSIZE 16
#endif
