xref: /openbmc/linux/sound/pci/emu10k1/p17v.h (revision 3969f617)
13969f617SJames Courtier-Dutton /*
23969f617SJames Courtier-Dutton  *  Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
33969f617SJames Courtier-Dutton  *  Driver p17v chips
43969f617SJames Courtier-Dutton  *  Version: 0.01
53969f617SJames Courtier-Dutton  *
63969f617SJames Courtier-Dutton  *   This program is free software; you can redistribute it and/or modify
73969f617SJames Courtier-Dutton  *   it under the terms of the GNU General Public License as published by
83969f617SJames Courtier-Dutton  *   the Free Software Foundation; either version 2 of the License, or
93969f617SJames Courtier-Dutton  *   (at your option) any later version.
103969f617SJames Courtier-Dutton  *
113969f617SJames Courtier-Dutton  *   This program is distributed in the hope that it will be useful,
123969f617SJames Courtier-Dutton  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
133969f617SJames Courtier-Dutton  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
143969f617SJames Courtier-Dutton  *   GNU General Public License for more details.
153969f617SJames Courtier-Dutton  *
163969f617SJames Courtier-Dutton  *   You should have received a copy of the GNU General Public License
173969f617SJames Courtier-Dutton  *   along with this program; if not, write to the Free Software
183969f617SJames Courtier-Dutton  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
193969f617SJames Courtier-Dutton  *
203969f617SJames Courtier-Dutton  */
213969f617SJames Courtier-Dutton 
223969f617SJames Courtier-Dutton /******************************************************************************/
233969f617SJames Courtier-Dutton /* Audigy2Value Tina (P17V) pointer-offset register set,
243969f617SJames Courtier-Dutton  * accessed through the PTR20 and DATA24 registers  */
253969f617SJames Courtier-Dutton /******************************************************************************/
263969f617SJames Courtier-Dutton 
273969f617SJames Courtier-Dutton /* 00 - 07: Not used */
283969f617SJames Courtier-Dutton #define P17V_PLAYBACK_FIFO_PTR	0x08	/* Current playback fifo pointer
293969f617SJames Courtier-Dutton 					 * and number of sound samples in cache.
303969f617SJames Courtier-Dutton 					 */
313969f617SJames Courtier-Dutton /* 09 - 12: Not used */
323969f617SJames Courtier-Dutton #define P17V_CAPTURE_FIFO_PTR	0x13	/* Current capture fifo pointer
333969f617SJames Courtier-Dutton 					 * and number of sound samples in cache.
343969f617SJames Courtier-Dutton 					 */
353969f617SJames Courtier-Dutton /* 14 - 17: Not used */
363969f617SJames Courtier-Dutton #define P17V_PB_CHN_SEL		0x18	/* P17v playback channel select */
373969f617SJames Courtier-Dutton #define P17V_SE_SLOT_SEL_L	0x19	/* Sound Engine slot select low */
383969f617SJames Courtier-Dutton #define P17V_SE_SLOT_SEL_H	0x1a	/* Sound Engine slot select high */
393969f617SJames Courtier-Dutton /* 1b - 1f: Not used */
403969f617SJames Courtier-Dutton /* 20 - 2f: Not used */
413969f617SJames Courtier-Dutton /* 30 - 3b: Not used */
423969f617SJames Courtier-Dutton #define P17V_SPI		0x3c	/* SPI interface register */
433969f617SJames Courtier-Dutton #define P17V_I2C_ADDR		0x3d	/* I2C Address */
443969f617SJames Courtier-Dutton #define P17V_I2C_0		0x3e	/* I2C Data */
453969f617SJames Courtier-Dutton #define P17V_I2C_1		0x3f	/* I2C Data */
463969f617SJames Courtier-Dutton 
473969f617SJames Courtier-Dutton #define P17V_START_AUDIO	0x40	/* Start Audio bit */
483969f617SJames Courtier-Dutton /* 41 - 47: Reserved */
493969f617SJames Courtier-Dutton #define P17V_START_CAPTURE	0x48	/* Start Capture bit */
503969f617SJames Courtier-Dutton #define P17V_CAPTURE_FIFO_BASE	0x49	/* Record FIFO base address */
513969f617SJames Courtier-Dutton #define P17V_CAPTURE_FIFO_SIZE	0x4a	/* Record FIFO buffer size */
523969f617SJames Courtier-Dutton #define P17V_CAPTURE_FIFO_INDEX	0x4b	/* Record FIFO capture index */
533969f617SJames Courtier-Dutton #define P17V_CAPTURE_VOL_H	0x4c	/* P17v capture volume control */
543969f617SJames Courtier-Dutton #define P17V_CAPTURE_VOL_L	0x4d	/* P17v capture volume control */
553969f617SJames Courtier-Dutton /* 4e - 4f: Not used */
563969f617SJames Courtier-Dutton /* 50 - 5f: Not used */
573969f617SJames Courtier-Dutton #define P17V_SRCSel		0x60	/* SRC48 and SRCMulti sample rate select
583969f617SJames Courtier-Dutton 					 * and output select
593969f617SJames Courtier-Dutton 					 */
603969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_10K1_VOL_L	0x61	/* 10K to Mixer_AC97 input volume control */
613969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_10K1_VOL_H	0x62	/* 10K to Mixer_AC97 input volume control */
623969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_P17V_VOL_L	0x63	/* P17V to Mixer_AC97 input volume control */
633969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_P17V_VOL_H	0x64	/* P17V to Mixer_AC97 input volume control */
643969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_SRP_REC_VOL_L	0x65	/* SRP Record to Mixer_AC97 input volume control */
653969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_SRP_REC_VOL_H	0x66	/* SRP Record to Mixer_AC97 input volume control */
663969f617SJames Courtier-Dutton /* 67 - 68: Reserved */
673969f617SJames Courtier-Dutton #define P17V_MIXER_Spdif_10K1_VOL_L	0x69	/* 10K to Mixer_Spdif input volume control */
683969f617SJames Courtier-Dutton #define P17V_MIXER_Spdif_10K1_VOL_H	0x6A	/* 10K to Mixer_Spdif input volume control */
693969f617SJames Courtier-Dutton #define P17V_MIXER_Spdif_P17V_VOL_L	0x6B	/* P17V to Mixer_Spdif input volume control */
703969f617SJames Courtier-Dutton #define P17V_MIXER_Spdif_P17V_VOL_H	0x6C	/* P17V to Mixer_Spdif input volume control */
713969f617SJames Courtier-Dutton #define P17V_MIXER_Spdif_SRP_REC_VOL_L	0x6D	/* SRP Record to Mixer_Spdif input volume control */
723969f617SJames Courtier-Dutton #define P17V_MIXER_Spdif_SRP_REC_VOL_H	0x6E	/* SRP Record to Mixer_Spdif input volume control */
733969f617SJames Courtier-Dutton /* 6f - 70: Reserved */
743969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_10K1_VOL_L	0x71	/* 10K to Mixer_I2S input volume control */
753969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_10K1_VOL_H	0x72	/* 10K to Mixer_I2S input volume control */
763969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_P17V_VOL_L	0x73	/* P17V to Mixer_I2S input volume control */
773969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_P17V_VOL_H	0x74	/* P17V to Mixer_I2S input volume control */
783969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_SRP_REC_VOL_L	0x75	/* SRP Record to Mixer_I2S input volume control */
793969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_SRP_REC_VOL_H	0x76	/* SRP Record to Mixer_I2S input volume control */
803969f617SJames Courtier-Dutton /* 77 - 78: Reserved */
813969f617SJames Courtier-Dutton #define P17V_MIXER_AC97_ENABLE		0x79	/* Mixer AC97 input audio enable */
823969f617SJames Courtier-Dutton #define P17V_MIXER_SPDIF_ENABLE		0x7A	/* Mixer SPDIF input audio enable */
833969f617SJames Courtier-Dutton #define P17V_MIXER_I2S_ENABLE		0x7B	/* Mixer I2S input audio enable */
843969f617SJames Courtier-Dutton #define P17V_AUDIO_OUT_ENABLE		0x7C	/* Audio out enable */
853969f617SJames Courtier-Dutton #define P17V_MIXER_ATT			0x7D	/* SRP Mixer Attenuation Select */
863969f617SJames Courtier-Dutton #define P17V_SRP_RECORD_SRR		0x7E	/* SRP Record channel source Select */
873969f617SJames Courtier-Dutton #define P17V_SOFT_RESET_SRP_MIXER	0x7F	/* SRP and mixer soft reset */
883969f617SJames Courtier-Dutton 
893969f617SJames Courtier-Dutton #define P17V_AC97_OUT_MASTER_VOL_L	0x80	/* AC97 Output master volume control */
903969f617SJames Courtier-Dutton #define P17V_AC97_OUT_MASTER_VOL_H	0x81	/* AC97 Output master volume control */
913969f617SJames Courtier-Dutton #define P17V_SPDIF_OUT_MASTER_VOL_L	0x82	/* SPDIF Output master volume control */
923969f617SJames Courtier-Dutton #define P17V_SPDIF_OUT_MASTER_VOL_H	0x83	/* SPDIF Output master volume control */
933969f617SJames Courtier-Dutton #define P17V_I2S_OUT_MASTER_VOL_L	0x84	/* I2S Output master volume control */
943969f617SJames Courtier-Dutton #define P17V_I2S_OUT_MASTER_VOL_H	0x85	/* I2S Output master volume control */
953969f617SJames Courtier-Dutton /* 86 - 87: Not used */
963969f617SJames Courtier-Dutton #define P17V_I2S_CHANNEL_SWAP_PHASE_INVERSE	0x88	/* I2S out mono channel swap
973969f617SJames Courtier-Dutton 							 * and phase inverse */
983969f617SJames Courtier-Dutton #define P17V_SPDIF_CHANNEL_SWAP_PHASE_INVERSE	0x89	/* SPDIF out mono channel swap
993969f617SJames Courtier-Dutton 							 * and phase inverse */
1003969f617SJames Courtier-Dutton /* 8A: Not used */
1013969f617SJames Courtier-Dutton #define P17V_SRP_P17V_ESR		0x8B	/* SRP_P17V estimated sample rate and rate lock */
1023969f617SJames Courtier-Dutton #define P17V_SRP_REC_ESR		0x8C	/* SRP_REC estimated sample rate and rate lock */
1033969f617SJames Courtier-Dutton #define P17V_SRP_BYPASS			0x8D	/* srps channel bypass and srps bypass */
1043969f617SJames Courtier-Dutton /* 8E - 92: Not used */
1053969f617SJames Courtier-Dutton #define P17V_I2S_SRC_SEL		0x93	/* I2SIN mode sel */
1063969f617SJames Courtier-Dutton 
1073969f617SJames Courtier-Dutton 
1083969f617SJames Courtier-Dutton 
1093969f617SJames Courtier-Dutton 
1103969f617SJames Courtier-Dutton 
1113969f617SJames Courtier-Dutton 
112