#ifndef ICX1087_AUDIO_H
#define ICX1087_AUDIO_H
/*
 * icx1087_audio.h -- Sony ICX1087 platform audio interface
 *
 * Copyright 2006 Sony Corporation.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#include <asm/ioctl.h>

/* Set/Get mute */
#define AUDIO_SET_MUTE			_IOW('a', 0x01, int)
#define AUDIO_GET_MUTE			_IOR('a', 0x02, int)
	#define AUDIO_MUTE_OFF		(0x00)
	#define AUDIO_ADC_MIX_MUTE	(0x01)	/* ADC mixing */
	#define AUDIO_PCM_MIX_MUTE	(0x02)	/* PCM mixing */
	#define AUDIO_DAC_MUTE		(0x04)	/* DAC */
	#define AUDIO_ADC_MUTE		(0x08)	/* ADC */
	#define AUDIO_EXT_MUTE		(0x10)	/* external */
	#define AUDIO_MUTE_ON		(AUDIO_ADC_MIX_MUTE | AUDIO_PCM_MIX_MUTE)
	#define AUDIO_CHIP_MUTE_ON	(AUDIO_MUTE_ON | AUDIO_DAC_MUTE | AUDIO_ADC_MUTE)
	#define AUDIO_ALL_MUTE_ON	(AUDIO_CHIP_MUTE_ON | AUDIO_EXT_MUTE)

/* Set/Get playback source */
#define AUDIO_SET_PLAYBACK		_IOW('a', 0x03, int)
#define AUDIO_GET_PLAYBACK		_IOR('a', 0x04, int)
	#define AUDIO_PLAYBACK_PCM		(0)
	#define AUDIO_PLAYBACK_LINE		(1)
	#define AUDIO_PLAYBACK_TUNER	(2)
	#define AUDIO_PLAYBACK_MIC		(3)

/* Set/Get audio output device */
#define AUDIO_SET_OUTPUT		_IOW('a', 0x05, int)
#define AUDIO_GET_OUTPUT		_IOR('a', 0x06, int)
	#define AUDIO_OUTPUT_HP		(0)		/* Head Phone */
	#define AUDIO_OUTPUT_LINE	(1)		/* Cradle Line Out */

/* Set/Get analog output volume table */
#define AUDIO_SET_AOUT_VOL_TABLE	_IOW('a', 0x07, audio_vol_table_t)
#define AUDIO_GET_AOUT_VOL_TABLE	_IOR('a', 0x08, audio_vol_table_t)
typedef struct {
	unsigned		offset;		/* valid: 0 to 100 */
	unsigned		count;		/* valid: 1 to 101 (offset+count < 102) */
	unsigned char	*buf;		/* point to count bytes buffer */
} audio_vol_table_t;

/* Restart audio codec device */
#define AUDIO_RESTART			_IO('a', 0x09)

#endif	/* ICX1087_AUDIO_H */
