/*
 *
 * Philips UDA1380 mixer device driver
 *
 * Copyright (c) 2002 Hewlett-Packard Company
 *
 * Copyright (c) 2000 Nicolas Pitre <nico@cam.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License.
 */

#define UDA1380_NAME "uda1380"

struct uda1380_cfg {
	unsigned int fs:16;
	unsigned int format:3;
	unsigned int mic_connected:1;
	unsigned int line_connected:1;
};

#define FMT_I2S		0
#define FMT_LSB16	1
#define FMT_LSB18	2
#define FMT_LSB20	3
#define FMT_MSB		5

#define I2C_UDA1380_CONFIGURE	0x13800001
#define I2C_UDA1380_OPEN	0x13800002
#define I2C_UDA1380_CLOSE	0x13800003

struct i2c_gain {
	unsigned int	left:8;
	unsigned int	right:8;
};

#define I2C_SET_VOLUME		0x13800010
#define I2C_SET_TREBLE		0x13800011
#define I2C_SET_BASS		0x13800012
#define I2C_SET_LINE_GAIN	0x13800013
#define I2C_SET_MIC_GAIN	0x13800014

struct i2c_agc {
	unsigned int	level:8;
	unsigned int	enable:1;
	unsigned int	attack:7;
	unsigned int	decay:8;
	unsigned int	channel:8;
};

#define I2C_SET_AGC		0x1380015
