aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/emu10k1.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/emu10k1.h')
-rw-r--r--include/sound/emu10k1.h418
1 files changed, 404 insertions, 14 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 3d3c1514cf71..eb7ce96ddf3a 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -188,7 +188,35 @@
188#define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */ 188#define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */
189 /* NOTE: The rest of the bits in this register */ 189 /* NOTE: The rest of the bits in this register */
190 /* _are_ relevant under Linux. */ 190 /* _are_ relevant under Linux. */
191#define HCFG_CODECFORMAT_MASK 0x00070000 /* CODEC format */ 191#define HCFG_PUSH_BUTTON_ENABLE 0x00100000 /* Enables Volume Inc/Dec and Mute functions */
192#define HCFG_BAUD_RATE 0x00080000 /* 0 = 48kHz, 1 = 44.1kHz */
193#define HCFG_EXPANDED_MEM 0x00040000 /* 1 = any 16M of 4G addr, 0 = 32M of 2G addr */
194#define HCFG_CODECFORMAT_MASK 0x00030000 /* CODEC format */
195
196/* Specific to Alice2, CA0102 */
197#define HCFG_CODECFORMAT_AC97_1 0x00000000 /* AC97 CODEC format -- Ver 1.03 */
198#define HCFG_CODECFORMAT_AC97_2 0x00010000 /* AC97 CODEC format -- Ver 2.1 */
199#define HCFG_AUTOMUTE_ASYNC 0x00008000 /* When set, the async sample rate convertors */
200 /* will automatically mute their output when */
201 /* they are not rate-locked to the external */
202 /* async audio source */
203#define HCFG_AUTOMUTE_SPDIF 0x00004000 /* When set, the async sample rate convertors */
204 /* will automatically mute their output when */
205 /* the SPDIF V-bit indicates invalid audio */
206#define HCFG_EMU32_SLAVE 0x00002000 /* 0 = Master, 1 = Slave. Slave for EMU1010 */
207#define HCFG_SLOW_RAMP 0x00001000 /* Increases Send Smoothing time constant */
208/* 0x00000800 not used on Alice2 */
209#define HCFG_PHASE_TRACK_MASK 0x00000700 /* When set, forces corresponding input to */
210 /* phase track the previous input. */
211 /* I2S0 can phase track the last S/PDIF input */
212#define HCFG_I2S_ASRC_ENABLE 0x00000070 /* When set, enables asynchronous sample rate */
213 /* conversion for the corresponding */
214 /* I2S format input */
215/* Rest of HCFG 0x0000000f same as below. LOCKSOUNDCACHE etc. */
216
217
218
219/* Older chips */
192#define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */ 220#define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */
193#define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */ 221#define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */
194#define HCFG_GPINPUT0 0x00004000 /* External pin112 */ 222#define HCFG_GPINPUT0 0x00004000 /* External pin112 */
@@ -432,6 +460,7 @@
432#define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */ 460#define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */
433#define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */ 461#define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */
434 462
463#define A_HR 0x0b /* High Resolution. 24bit playback from host to DSP. */
435#define MAPA 0x0c /* Cache map A */ 464#define MAPA 0x0c /* Cache map A */
436 465
437#define MAPB 0x0d /* Cache map B */ 466#define MAPB 0x0d /* Cache map B */
@@ -439,6 +468,8 @@
439#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */ 468#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */
440#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ 469#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */
441 470
471/* 0x0e, 0x0f: Not used */
472
442#define ENVVOL 0x10 /* Volume envelope register */ 473#define ENVVOL 0x10 /* Volume envelope register */
443#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ 474#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */
444 /* 0x8000-n == 666*n usec delay */ 475 /* 0x8000-n == 666*n usec delay */
@@ -527,7 +558,7 @@
527 /* NOTE: All channels contain internal variables; do */ 558 /* NOTE: All channels contain internal variables; do */
528 /* not write to these locations. */ 559 /* not write to these locations. */
529 560
530/* 1f something */ 561/* 0x1f: not used */
531 562
532#define CD0 0x20 /* Cache data 0 register */ 563#define CD0 0x20 /* Cache data 0 register */
533#define CD1 0x21 /* Cache data 1 register */ 564#define CD1 0x21 /* Cache data 1 register */
@@ -597,6 +628,8 @@
597#define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ 628#define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */
598#define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ 629#define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */
599 630
631#define A_TBLSZ ` 0x43 /* Effects Tank Internal Table Size. Only low byte or register used */
632
600#define TCBS 0x44 /* Tank cache buffer size register */ 633#define TCBS 0x44 /* Tank cache buffer size register */
601#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ 634#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */
602#define TCBS_BUFFSIZE_16K 0x00000000 635#define TCBS_BUFFSIZE_16K 0x00000000
@@ -617,7 +650,7 @@
617#define FXBA 0x47 /* FX Buffer Address */ 650#define FXBA 0x47 /* FX Buffer Address */
618#define FXBA_MASK 0xfffff000 /* 20 bit base address */ 651#define FXBA_MASK 0xfffff000 /* 20 bit base address */
619 652
620/* 0x48 something - word access, defaults to 3f */ 653#define A_HWM 0x48 /* High PCI Water Mark - word access, defaults to 3f */
621 654
622#define MICBS 0x49 /* Microphone buffer size register */ 655#define MICBS 0x49 /* Microphone buffer size register */
623 656
@@ -661,6 +694,18 @@
661#define ADCBS_BUFSIZE_57344 0x0000001e 694#define ADCBS_BUFSIZE_57344 0x0000001e
662#define ADCBS_BUFSIZE_65536 0x0000001f 695#define ADCBS_BUFSIZE_65536 0x0000001f
663 696
697/* Current Send B, A Amounts */
698#define A_CSBA 0x4c
699
700/* Current Send D, C Amounts */
701#define A_CSDC 0x4d
702
703/* Current Send F, E Amounts */
704#define A_CSFE 0x4e
705
706/* Current Send H, G Amounts */
707#define A_CSHG 0x4f
708
664 709
665#define CDCS 0x50 /* CD-ROM digital channel status register */ 710#define CDCS 0x50 /* CD-ROM digital channel status register */
666 711
@@ -668,6 +713,9 @@
668 713
669#define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ 714#define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */
670 715
716/* S/PDIF Input C Channel Status */
717#define A_SPSC 0x52
718
671#define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ 719#define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */
672 720
673#define A_DBG 0x53 721#define A_DBG 0x53
@@ -708,6 +756,8 @@
708#define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */ 756#define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */
709#define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */ 757#define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */
710 758
759/* 0x57: Not used */
760
711/* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */ 761/* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */
712#define CLIEL 0x58 /* Channel loop interrupt enable low register */ 762#define CLIEL 0x58 /* Channel loop interrupt enable low register */
713 763
@@ -733,6 +783,9 @@
733#define AC97SLOT_CNTR 0x10 /* Center enable */ 783#define AC97SLOT_CNTR 0x10 /* Center enable */
734#define AC97SLOT_LFE 0x20 /* LFE enable */ 784#define AC97SLOT_LFE 0x20 /* LFE enable */
735 785
786/* PCB Revision */
787#define A_PCB 0x5f
788
736// NOTE: 0x60,61,62: 64-bit 789// NOTE: 0x60,61,62: 64-bit
737#define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */ 790#define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */
738 791
@@ -780,9 +833,18 @@
780 833
781#define HLIPH 0x69 /* Channel half loop interrupt pending high register */ 834#define HLIPH 0x69 /* Channel half loop interrupt pending high register */
782 835
783// 0x6a,6b,6c used for some recording 836/* S/PDIF Host Record Index (bypasses SRC) */
784// 0x6d unused 837#define A_SPRI 0x6a
785// 0x6e,6f - tanktable base / offset 838/* S/PDIF Host Record Address */
839#define A_SPRA 0x6b
840/* S/PDIF Host Record Control */
841#define A_SPRC 0x6c
842/* Delayed Interrupt Counter & Enable */
843#define A_DICE 0x6d
844/* Tank Table Base */
845#define A_TTB 0x6e
846/* Tank Delay Offset */
847#define A_TDOF 0x6f
786 848
787/* This is the MPU port on the card (via the game port) */ 849/* This is the MPU port on the card (via the game port) */
788#define A_MUDATA1 0x70 850#define A_MUDATA1 0x70
@@ -800,6 +862,7 @@
800#define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */ 862#define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */
801#define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */ 863#define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */
802 864
865/* Extended Hardware Control */
803#define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */ 866#define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */
804#define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */ 867#define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */
805#define A_SAMPLE_RATE_NOT_USED 0x0ffc111e /* Bits that are not used and cannot be set. */ 868#define A_SAMPLE_RATE_NOT_USED 0x0ffc111e /* Bits that are not used and cannot be set. */
@@ -822,8 +885,20 @@
822#define A_PCM_96000 0x00004000 885#define A_PCM_96000 0x00004000
823#define A_PCM_44100 0x00008000 886#define A_PCM_44100 0x00008000
824 887
825/* 0x77,0x78,0x79 "something i2s-related" - default to 0x01080000 on my audigy 2 ZS --rlrevell */ 888/* I2S0 Sample Rate Tracker Status */
826/* 0x7a, 0x7b - lookup tables */ 889#define A_SRT3 0x77
890
891/* I2S1 Sample Rate Tracker Status */
892#define A_SRT4 0x78
893
894/* I2S2 Sample Rate Tracker Status */
895#define A_SRT5 0x79
896/* - default to 0x01080000 on my audigy 2 ZS --rlrevell */
897
898/* Tank Table DMA Address */
899#define A_TTDA 0x7a
900/* Tank Table DMA Data */
901#define A_TTDD 0x7b
827 902
828#define A_FXRT2 0x7c 903#define A_FXRT2 0x7c
829#define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */ 904#define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */
@@ -845,7 +920,7 @@
845#define A_FXRT_CHANNELC 0x003f0000 920#define A_FXRT_CHANNELC 0x003f0000
846#define A_FXRT_CHANNELD 0x3f000000 921#define A_FXRT_CHANNELD 0x3f000000
847 922
848 923/* 0x7f: Not used */
849/* Each FX general purpose register is 32 bits in length, all bits are used */ 924/* Each FX general purpose register is 32 bits in length, all bits are used */
850#define FXGPREGBASE 0x100 /* FX general purpose registers base */ 925#define FXGPREGBASE 0x100 /* FX general purpose registers base */
851#define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */ 926#define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */
@@ -886,6 +961,293 @@
886#define A_HIWORD_RESULT_MASK 0x007ff000 961#define A_HIWORD_RESULT_MASK 0x007ff000
887#define A_HIWORD_OPA_MASK 0x000007ff 962#define A_HIWORD_OPA_MASK 0x000007ff
888 963
964/************************************************************************************************/
965/* EMU1010m HANA FPGA registers */
966/************************************************************************************************/
967#define EMU_HANA_DESTHI 0x00 /* 0000xxx 3 bits Link Destination */
968#define EMU_HANA_DESTLO 0x01 /* 00xxxxx 5 bits */
969#define EMU_HANA_SRCHI 0x02 /* 0000xxx 3 bits Link Source */
970#define EMU_HANA_SRCLO 0x03 /* 00xxxxx 5 bits */
971#define EMU_HANA_DOCK_PWR 0x04 /* 000000x 1 bits Audio Dock power */
972#define EMU_HANA_DOCK_PWR_ON 0x01 /* Audio Dock power on */
973#define EMU_HANA_WCLOCK 0x05 /* 0000xxx 3 bits Word Clock source select */
974 /* Must be written after power on to reset DLL */
975 /* One is unable to detect the Audio dock without this */
976#define EMU_HANA_WCLOCK_SRC_MASK 0x07
977#define EMU_HANA_WCLOCK_INT_48K 0x00
978#define EMU_HANA_WCLOCK_INT_44_1K 0x01
979#define EMU_HANA_WCLOCK_HANA_SPDIF_IN 0x02
980#define EMU_HANA_WCLOCK_HANA_ADAT_IN 0x03
981#define EMU_HANA_WCLOCK_SYNC_BNCN 0x04
982#define EMU_HANA_WCLOCK_2ND_HANA 0x05
983#define EMU_HANA_WCLOCK_SRC_RESERVED 0x06
984#define EMU_HANA_WCLOCK_OFF 0x07 /* For testing, forces fallback to DEFCLOCK */
985#define EMU_HANA_WCLOCK_MULT_MASK 0x18
986#define EMU_HANA_WCLOCK_1X 0x00
987#define EMU_HANA_WCLOCK_2X 0x08
988#define EMU_HANA_WCLOCK_4X 0x10
989#define EMU_HANA_WCLOCK_MULT_RESERVED 0x18
990
991#define EMU_HANA_DEFCLOCK 0x06 /* 000000x 1 bits Default Word Clock */
992#define EMU_HANA_DEFCLOCK_48K 0x00
993#define EMU_HANA_DEFCLOCK_44_1K 0x01
994
995#define EMU_HANA_UNMUTE 0x07 /* 000000x 1 bits Mute all audio outputs */
996#define EMU_MUTE 0x00
997#define EMU_UNMUTE 0x01
998
999#define EMU_HANA_FPGA_CONFIG 0x08 /* 00000xx 2 bits Config control of FPGAs */
1000#define EMU_HANA_FPGA_CONFIG_AUDIODOCK 0x01 /* Set in order to program FPGA on Audio Dock */
1001#define EMU_HANA_FPGA_CONFIG_HANA 0x02 /* Set in order to program FPGA on Hana */
1002
1003#define EMU_HANA_IRQ_ENABLE 0x09 /* 000xxxx 4 bits IRQ Enable */
1004#define EMU_HANA_IRQ_WCLK_CHANGED 0x01
1005#define EMU_HANA_IRQ_ADAT 0x02
1006#define EMU_HANA_IRQ_DOCK 0x04
1007#define EMU_HANA_IRQ_DOCK_LOST 0x08
1008
1009#define EMU_HANA_SPDIF_MODE 0x0a /* 00xxxxx 5 bits SPDIF MODE */
1010#define EMU_HANA_SPDIF_MODE_TX_COMSUMER 0x00
1011#define EMU_HANA_SPDIF_MODE_TX_PRO 0x01
1012#define EMU_HANA_SPDIF_MODE_TX_NOCOPY 0x02
1013#define EMU_HANA_SPDIF_MODE_RX_COMSUMER 0x00
1014#define EMU_HANA_SPDIF_MODE_RX_PRO 0x04
1015#define EMU_HANA_SPDIF_MODE_RX_NOCOPY 0x08
1016#define EMU_HANA_SPDIF_MODE_RX_INVALID 0x10
1017
1018#define EMU_HANA_OPTICAL_TYPE 0x0b /* 00000xx 2 bits ADAT or SPDIF in/out */
1019#define EMU_HANA_OPTICAL_IN_SPDIF 0x00
1020#define EMU_HANA_OPTICAL_IN_ADAT 0x01
1021#define EMU_HANA_OPTICAL_OUT_SPDIF 0x00
1022#define EMU_HANA_OPTICAL_OUT_ADAT 0x02
1023
1024#define EMU_HANA_MIDI_IN 0x0c /* 000000x 1 bit Control MIDI */
1025#define EMU_HANA_MIDI_IN_FROM_HAMOA 0x00 /* HAMOA MIDI in to Alice 2 MIDI B */
1026#define EMU_HANA_MIDI_IN_FROM_DOCK 0x01 /* Audio Dock MIDI in to Alice 2 MIDI B */
1027
1028#define EMU_HANA_DOCK_LEDS_1 0x0d /* 000xxxx 4 bit Audio Dock LEDs */
1029#define EMU_HANA_DOCK_LEDS_1_MIDI1 0x01 /* MIDI 1 LED on */
1030#define EMU_HANA_DOCK_LEDS_1_MIDI2 0x02 /* MIDI 2 LED on */
1031#define EMU_HANA_DOCK_LEDS_1_SMPTE_IN 0x04 /* SMPTE IN LED on */
1032#define EMU_HANA_DOCK_LEDS_1_SMPTE_OUT 0x08 /* SMPTE OUT LED on */
1033
1034#define EMU_HANA_DOCK_LEDS_2 0x0e /* 0xxxxxx 6 bit Audio Dock LEDs */
1035#define EMU_HANA_DOCK_LEDS_2_44K 0x01 /* 44.1 kHz LED on */
1036#define EMU_HANA_DOCK_LEDS_2_48K 0x02 /* 48 kHz LED on */
1037#define EMU_HANA_DOCK_LEDS_2_96K 0x04 /* 96 kHz LED on */
1038#define EMU_HANA_DOCK_LEDS_2_192K 0x08 /* 192 kHz LED on */
1039#define EMU_HANA_DOCK_LEDS_2_LOCK 0x10 /* LOCK LED on */
1040#define EMU_HANA_DOCK_LEDS_2_EXT 0x20 /* EXT LED on */
1041
1042#define EMU_HANA_DOCK_LEDS_3 0x0f /* 0xxxxxx 6 bit Audio Dock LEDs */
1043#define EMU_HANA_DOCK_LEDS_3_CLIP_A 0x01 /* Mic A Clip LED on */
1044#define EMU_HANA_DOCK_LEDS_3_CLIP_B 0x02 /* Mic B Clip LED on */
1045#define EMU_HANA_DOCK_LEDS_3_SIGNAL_A 0x04 /* Signal A Clip LED on */
1046#define EMU_HANA_DOCK_LEDS_3_SIGNAL_B 0x08 /* Signal B Clip LED on */
1047#define EMU_HANA_DOCK_LEDS_3_MANUAL_CLIP 0x10 /* Manual Clip detection */
1048#define EMU_HANA_DOCK_LEDS_3_MANUAL_SIGNAL 0x20 /* Manual Signal detection */
1049
1050#define EMU_HANA_ADC_PADS 0x10 /* 0000xxx 3 bit Audio Dock ADC 14dB pads */
1051#define EMU_HANA_DOCK_ADC_PAD1 0x01 /* 14dB Attenuation on Audio Dock ADC 1 */
1052#define EMU_HANA_DOCK_ADC_PAD2 0x02 /* 14dB Attenuation on Audio Dock ADC 2 */
1053#define EMU_HANA_DOCK_ADC_PAD3 0x04 /* 14dB Attenuation on Audio Dock ADC 3 */
1054#define EMU_HANA_0202_ADC_PAD1 0x08 /* 14dB Attenuation on 0202 ADC 1 */
1055
1056#define EMU_HANA_DOCK_MISC 0x11 /* 0xxxxxx 6 bit Audio Dock misc bits */
1057#define EMU_HANA_DOCK_DAC1_MUTE 0x01 /* DAC 1 Mute */
1058#define EMU_HANA_DOCK_DAC2_MUTE 0x02 /* DAC 2 Mute */
1059#define EMU_HANA_DOCK_DAC3_MUTE 0x04 /* DAC 3 Mute */
1060#define EMU_HANA_DOCK_DAC4_MUTE 0x08 /* DAC 4 Mute */
1061#define EMU_HANA_DOCK_PHONES_192_DAC1 0x00 /* DAC 1 Headphones source at 192kHz */
1062#define EMU_HANA_DOCK_PHONES_192_DAC2 0x10 /* DAC 2 Headphones source at 192kHz */
1063#define EMU_HANA_DOCK_PHONES_192_DAC3 0x20 /* DAC 3 Headphones source at 192kHz */
1064#define EMU_HANA_DOCK_PHONES_192_DAC4 0x30 /* DAC 4 Headphones source at 192kHz */
1065
1066#define EMU_HANA_MIDI_OUT 0x12 /* 00xxxxx 5 bit Source for each MIDI out port */
1067#define EMU_HANA_MIDI_OUT_0202 0x01 /* 0202 MIDI from Alice 2. 0 = A, 1 = B */
1068#define EMU_HANA_MIDI_OUT_DOCK1 0x02 /* Audio Dock MIDI1 front, from Alice 2. 0 = A, 1 = B */
1069#define EMU_HANA_MIDI_OUT_DOCK2 0x04 /* Audio Dock MIDI2 rear, from Alice 2. 0 = A, 1 = B */
1070#define EMU_HANA_MIDI_OUT_SYNC2 0x08 /* Sync card. Not the actual MIDI out jack. 0 = A, 1 = B */
1071#define EMU_HANA_MIDI_OUT_LOOP 0x10 /* 0 = bits (3:0) normal. 1 = MIDI loopback enabled. */
1072
1073#define EMU_HANA_DAC_PADS 0x13 /* 00xxxxx 5 bit DAC 14dB attenuation pads */
1074#define EMU_HANA_DOCK_DAC_PAD1 0x01 /* 14dB Attenuation on AudioDock DAC 1. Left and Right */
1075#define EMU_HANA_DOCK_DAC_PAD2 0x02 /* 14dB Attenuation on AudioDock DAC 2. Left and Right */
1076#define EMU_HANA_DOCK_DAC_PAD3 0x04 /* 14dB Attenuation on AudioDock DAC 3. Left and Right */
1077#define EMU_HANA_DOCK_DAC_PAD4 0x08 /* 14dB Attenuation on AudioDock DAC 4. Left and Right */
1078#define EMU_HANA_0202_DAC_PAD1 0x10 /* 14dB Attenuation on 0202 DAC 1. Left and Right */
1079
1080/* 0x14 - 0x1f Unused R/W registers */
1081#define EMU_HANA_IRQ_STATUS 0x20 /* 000xxxx 4 bits IRQ Status */
1082#if 0 /* Already defined for reg 0x09 IRQ_ENABLE */
1083#define EMU_HANA_IRQ_WCLK_CHANGED 0x01
1084#define EMU_HANA_IRQ_ADAT 0x02
1085#define EMU_HANA_IRQ_DOCK 0x04
1086#define EMU_HANA_IRQ_DOCK_LOST 0x08
1087#endif
1088
1089#define EMU_HANA_OPTION_CARDS 0x21 /* 000xxxx 4 bits Presence of option cards */
1090#define EMU_HANA_OPTION_HAMOA 0x01 /* HAMOA card present */
1091#define EMU_HANA_OPTION_SYNC 0x02 /* Sync card present */
1092#define EMU_HANA_OPTION_DOCK_ONLINE 0x04 /* Audio Dock online and FPGA configured */
1093#define EMU_HANA_OPTION_DOCK_OFFLINE 0x08 /* Audio Dock online and FPGA not configured */
1094
1095#define EMU_HANA_ID 0x22 /* 1010101 7 bits ID byte & 0x7f = 0x55 */
1096
1097#define EMU_HANA_MAJOR_REV 0x23 /* 0000xxx 3 bit Hana FPGA Major rev */
1098#define EMU_HANA_MINOR_REV 0x24 /* 0000xxx 3 bit Hana FPGA Minor rev */
1099
1100#define EMU_DOCK_MAJOR_REV 0x25 /* 0000xxx 3 bit Audio Dock FPGA Major rev */
1101#define EMU_DOCK_MINOR_REV 0x26 /* 0000xxx 3 bit Audio Dock FPGA Minor rev */
1102
1103#define EMU_DOCK_BOARD_ID 0x27 /* 00000xx 2 bits Audio Dock ID pins */
1104#define EMU_DOCK_BOARD_ID0 0x00 /* ID bit 0 */
1105#define EMU_DOCK_BOARD_ID1 0x03 /* ID bit 1 */
1106
1107#define EMU_HANA_WC_SPDIF_HI 0x28 /* 0xxxxxx 6 bit SPDIF IN Word clock, upper 6 bits */
1108#define EMU_HANA_WC_SPDIF_LO 0x29 /* 0xxxxxx 6 bit SPDIF IN Word clock, lower 6 bits */
1109
1110#define EMU_HANA_WC_ADAT_HI 0x2a /* 0xxxxxx 6 bit ADAT IN Word clock, upper 6 bits */
1111#define EMU_HANA_WC_ADAT_LO 0x2b /* 0xxxxxx 6 bit ADAT IN Word clock, lower 6 bits */
1112
1113#define EMU_HANA_WC_BNC_LO 0x2c /* 0xxxxxx 6 bit BNC IN Word clock, lower 6 bits */
1114#define EMU_HANA_WC_BNC_HI 0x2d /* 0xxxxxx 6 bit BNC IN Word clock, upper 6 bits */
1115
1116#define EMU_HANA2_WC_SPDIF_HI 0x2e /* 0xxxxxx 6 bit HANA2 SPDIF IN Word clock, upper 6 bits */
1117#define EMU_HANA2_WC_SPDIF_LO 0x2f /* 0xxxxxx 6 bit HANA2 SPDIF IN Word clock, lower 6 bits */
1118/* 0x30 - 0x3f Unused Read only registers */
1119
1120/************************************************************************************************/
1121/* EMU1010m HANA Destinations */
1122/************************************************************************************************/
1123#define EMU_DST_ALICE2_EMU32_0 0x000f /* 16 EMU32 channels to Alice2 +0 to +0xf */
1124#define EMU_DST_ALICE2_EMU32_1 0x0000 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1125#define EMU_DST_ALICE2_EMU32_2 0x0001 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1126#define EMU_DST_ALICE2_EMU32_3 0x0002 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1127#define EMU_DST_ALICE2_EMU32_4 0x0003 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1128#define EMU_DST_ALICE2_EMU32_5 0x0004 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1129#define EMU_DST_ALICE2_EMU32_6 0x0005 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1130#define EMU_DST_ALICE2_EMU32_7 0x0006 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1131#define EMU_DST_ALICE2_EMU32_8 0x0007 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1132#define EMU_DST_ALICE2_EMU32_9 0x0008 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1133#define EMU_DST_ALICE2_EMU32_A 0x0009 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1134#define EMU_DST_ALICE2_EMU32_B 0x000a /* 16 EMU32 channels to Alice2 +0 to +0xf */
1135#define EMU_DST_ALICE2_EMU32_C 0x000b /* 16 EMU32 channels to Alice2 +0 to +0xf */
1136#define EMU_DST_ALICE2_EMU32_D 0x000c /* 16 EMU32 channels to Alice2 +0 to +0xf */
1137#define EMU_DST_ALICE2_EMU32_E 0x000d /* 16 EMU32 channels to Alice2 +0 to +0xf */
1138#define EMU_DST_ALICE2_EMU32_F 0x000e /* 16 EMU32 channels to Alice2 +0 to +0xf */
1139#define EMU_DST_DOCK_DAC1_LEFT1 0x0100 /* Audio Dock DAC1 Left, 1st or 48kHz only */
1140#define EMU_DST_DOCK_DAC1_LEFT2 0x0101 /* Audio Dock DAC1 Left, 2nd or 96kHz */
1141#define EMU_DST_DOCK_DAC1_LEFT3 0x0102 /* Audio Dock DAC1 Left, 3rd or 192kHz */
1142#define EMU_DST_DOCK_DAC1_LEFT4 0x0103 /* Audio Dock DAC1 Left, 4th or 192kHz */
1143#define EMU_DST_DOCK_DAC1_RIGHT1 0x0104 /* Audio Dock DAC1 Right, 1st or 48kHz only */
1144#define EMU_DST_DOCK_DAC1_RIGHT2 0x0105 /* Audio Dock DAC1 Right, 2nd or 96kHz */
1145#define EMU_DST_DOCK_DAC1_RIGHT3 0x0106 /* Audio Dock DAC1 Right, 3rd or 192kHz */
1146#define EMU_DST_DOCK_DAC1_RIGHT4 0x0107 /* Audio Dock DAC1 Right, 4th or 192kHz */
1147#define EMU_DST_DOCK_DAC2_LEFT1 0x0108 /* Audio Dock DAC2 Left, 1st or 48kHz only */
1148#define EMU_DST_DOCK_DAC2_LEFT2 0x0109 /* Audio Dock DAC2 Left, 2nd or 96kHz */
1149#define EMU_DST_DOCK_DAC2_LEFT3 0x010a /* Audio Dock DAC2 Left, 3rd or 192kHz */
1150#define EMU_DST_DOCK_DAC2_LEFT4 0x010b /* Audio Dock DAC2 Left, 4th or 192kHz */
1151#define EMU_DST_DOCK_DAC2_RIGHT1 0x010c /* Audio Dock DAC2 Right, 1st or 48kHz only */
1152#define EMU_DST_DOCK_DAC2_RIGHT2 0x010d /* Audio Dock DAC2 Right, 2nd or 96kHz */
1153#define EMU_DST_DOCK_DAC2_RIGHT3 0x010e /* Audio Dock DAC2 Right, 3rd or 192kHz */
1154#define EMU_DST_DOCK_DAC2_RIGHT4 0x010f /* Audio Dock DAC2 Right, 4th or 192kHz */
1155#define EMU_DST_DOCK_DAC3_LEFT1 0x0110 /* Audio Dock DAC1 Left, 1st or 48kHz only */
1156#define EMU_DST_DOCK_DAC3_LEFT2 0x0111 /* Audio Dock DAC1 Left, 2nd or 96kHz */
1157#define EMU_DST_DOCK_DAC3_LEFT3 0x0112 /* Audio Dock DAC1 Left, 3rd or 192kHz */
1158#define EMU_DST_DOCK_DAC3_LEFT4 0x0113 /* Audio Dock DAC1 Left, 4th or 192kHz */
1159#define EMU_DST_DOCK_PHONES_LEFT1 0x0112 /* Audio Dock PHONES Left, 1st or 48kHz only */
1160#define EMU_DST_DOCK_PHONES_LEFT2 0x0113 /* Audio Dock PHONES Left, 2nd or 96kHz */
1161#define EMU_DST_DOCK_DAC3_RIGHT1 0x0114 /* Audio Dock DAC1 Right, 1st or 48kHz only */
1162#define EMU_DST_DOCK_DAC3_RIGHT2 0x0115 /* Audio Dock DAC1 Right, 2nd or 96kHz */
1163#define EMU_DST_DOCK_DAC3_RIGHT3 0x0116 /* Audio Dock DAC1 Right, 3rd or 192kHz */
1164#define EMU_DST_DOCK_DAC3_RIGHT4 0x0117 /* Audio Dock DAC1 Right, 4th or 192kHz */
1165#define EMU_DST_DOCK_PHONES_RIGHT1 0x0116 /* Audio Dock PHONES Right, 1st or 48kHz only */
1166#define EMU_DST_DOCK_PHONES_RIGHT2 0x0117 /* Audio Dock PHONES Right, 2nd or 96kHz */
1167#define EMU_DST_DOCK_DAC4_LEFT1 0x0118 /* Audio Dock DAC2 Left, 1st or 48kHz only */
1168#define EMU_DST_DOCK_DAC4_LEFT2 0x0119 /* Audio Dock DAC2 Left, 2nd or 96kHz */
1169#define EMU_DST_DOCK_DAC4_LEFT3 0x011a /* Audio Dock DAC2 Left, 3rd or 192kHz */
1170#define EMU_DST_DOCK_DAC4_LEFT4 0x011b /* Audio Dock DAC2 Left, 4th or 192kHz */
1171#define EMU_DST_DOCK_SPDIF_LEFT1 0x011a /* Audio Dock SPDIF Left, 1st or 48kHz only */
1172#define EMU_DST_DOCK_SPDIF_LEFT2 0x011b /* Audio Dock SPDIF Left, 2nd or 96kHz */
1173#define EMU_DST_DOCK_DAC4_RIGHT1 0x011c /* Audio Dock DAC2 Right, 1st or 48kHz only */
1174#define EMU_DST_DOCK_DAC4_RIGHT2 0x011d /* Audio Dock DAC2 Right, 2nd or 96kHz */
1175#define EMU_DST_DOCK_DAC4_RIGHT3 0x011e /* Audio Dock DAC2 Right, 3rd or 192kHz */
1176#define EMU_DST_DOCK_DAC4_RIGHT4 0x011f /* Audio Dock DAC2 Right, 4th or 192kHz */
1177#define EMU_DST_DOCK_SPDIF_RIGHT1 0x011e /* Audio Dock SPDIF Right, 1st or 48kHz only */
1178#define EMU_DST_DOCK_SPDIF_RIGHT2 0x011f /* Audio Dock SPDIF Right, 2nd or 96kHz */
1179#define EMU_DST_HANA_SPDIF_LEFT1 0x0200 /* Hana SPDIF Left, 1st or 48kHz only */
1180#define EMU_DST_HANA_SPDIF_LEFT2 0x0202 /* Hana SPDIF Left, 2nd or 96kHz */
1181#define EMU_DST_HANA_SPDIF_RIGHT1 0x0201 /* Hana SPDIF Right, 1st or 48kHz only */
1182#define EMU_DST_HANA_SPDIF_RIGHT2 0x0203 /* Hana SPDIF Right, 2nd or 96kHz */
1183#define EMU_DST_HAMOA_DAC_LEFT1 0x0300 /* Hamoa DAC Left, 1st or 48kHz only */
1184#define EMU_DST_HAMOA_DAC_LEFT2 0x0302 /* Hamoa DAC Left, 2nd or 96kHz */
1185#define EMU_DST_HAMOA_DAC_LEFT3 0x0304 /* Hamoa DAC Left, 3rd or 192kHz */
1186#define EMU_DST_HAMOA_DAC_LEFT4 0x0306 /* Hamoa DAC Left, 4th or 192kHz */
1187#define EMU_DST_HAMOA_DAC_RIGHT1 0x0301 /* Hamoa DAC Right, 1st or 48kHz only */
1188#define EMU_DST_HAMOA_DAC_RIGHT2 0x0303 /* Hamoa DAC Right, 2nd or 96kHz */
1189#define EMU_DST_HAMOA_DAC_RIGHT3 0x0305 /* Hamoa DAC Right, 3rd or 192kHz */
1190#define EMU_DST_HAMOA_DAC_RIGHT4 0x0307 /* Hamoa DAC Right, 4th or 192kHz */
1191#define EMU_DST_HANA_ADAT 0x0400 /* Hana ADAT 8 channel out +0 to +7 */
1192#define EMU_DST_ALICE_I2S0_LEFT 0x0500 /* Alice2 I2S0 Left */
1193#define EMU_DST_ALICE_I2S0_RIGHT 0x0501 /* Alice2 I2S0 Right */
1194#define EMU_DST_ALICE_I2S1_LEFT 0x0600 /* Alice2 I2S1 Left */
1195#define EMU_DST_ALICE_I2S1_RIGHT 0x0601 /* Alice2 I2S1 Right */
1196#define EMU_DST_ALICE_I2S2_LEFT 0x0700 /* Alice2 I2S2 Left */
1197#define EMU_DST_ALICE_I2S2_RIGHT 0x0701 /* Alice2 I2S2 Right */
1198
1199/************************************************************************************************/
1200/* EMU1010m HANA Sources */
1201/************************************************************************************************/
1202#define EMU_SRC_SILENCE 0x0000 /* Silence */
1203#define EMU_SRC_DOCK_MIC_A1 0x0100 /* Audio Dock Mic A, 1st or 48kHz only */
1204#define EMU_SRC_DOCK_MIC_A2 0x0101 /* Audio Dock Mic A, 2nd or 96kHz */
1205#define EMU_SRC_DOCK_MIC_A3 0x0102 /* Audio Dock Mic A, 3rd or 192kHz */
1206#define EMU_SRC_DOCK_MIC_A4 0x0103 /* Audio Dock Mic A, 4th or 192kHz */
1207#define EMU_SRC_DOCK_MIC_B1 0x0104 /* Audio Dock Mic B, 1st or 48kHz only */
1208#define EMU_SRC_DOCK_MIC_B2 0x0105 /* Audio Dock Mic B, 2nd or 96kHz */
1209#define EMU_SRC_DOCK_MIC_B3 0x0106 /* Audio Dock Mic B, 3rd or 192kHz */
1210#define EMU_SRC_DOCK_MIC_B4 0x0107 /* Audio Dock Mic B, 4th or 192kHz */
1211#define EMU_SRC_DOCK_ADC1_LEFT1 0x0108 /* Audio Dock ADC1 Left, 1st or 48kHz only */
1212#define EMU_SRC_DOCK_ADC1_LEFT2 0x0109 /* Audio Dock ADC1 Left, 2nd or 96kHz */
1213#define EMU_SRC_DOCK_ADC1_LEFT3 0x010a /* Audio Dock ADC1 Left, 3rd or 192kHz */
1214#define EMU_SRC_DOCK_ADC1_LEFT4 0x010b /* Audio Dock ADC1 Left, 4th or 192kHz */
1215#define EMU_SRC_DOCK_ADC1_RIGHT1 0x010c /* Audio Dock ADC1 Right, 1st or 48kHz only */
1216#define EMU_SRC_DOCK_ADC1_RIGHT2 0x010d /* Audio Dock ADC1 Right, 2nd or 96kHz */
1217#define EMU_SRC_DOCK_ADC1_RIGHT3 0x010e /* Audio Dock ADC1 Right, 3rd or 192kHz */
1218#define EMU_SRC_DOCK_ADC1_RIGHT4 0x010f /* Audio Dock ADC1 Right, 4th or 192kHz */
1219#define EMU_SRC_DOCK_ADC2_LEFT1 0x0110 /* Audio Dock ADC2 Left, 1st or 48kHz only */
1220#define EMU_SRC_DOCK_ADC2_LEFT2 0x0111 /* Audio Dock ADC2 Left, 2nd or 96kHz */
1221#define EMU_SRC_DOCK_ADC2_LEFT3 0x0112 /* Audio Dock ADC2 Left, 3rd or 192kHz */
1222#define EMU_SRC_DOCK_ADC2_LEFT4 0x0113 /* Audio Dock ADC2 Left, 4th or 192kHz */
1223#define EMU_SRC_DOCK_ADC2_RIGHT1 0x0114 /* Audio Dock ADC2 Right, 1st or 48kHz only */
1224#define EMU_SRC_DOCK_ADC2_RIGHT2 0x0115 /* Audio Dock ADC2 Right, 2nd or 96kHz */
1225#define EMU_SRC_DOCK_ADC2_RIGHT3 0x0116 /* Audio Dock ADC2 Right, 3rd or 192kHz */
1226#define EMU_SRC_DOCK_ADC2_RIGHT4 0x0117 /* Audio Dock ADC2 Right, 4th or 192kHz */
1227#define EMU_SRC_DOCK_ADC3_LEFT1 0x0118 /* Audio Dock ADC3 Left, 1st or 48kHz only */
1228#define EMU_SRC_DOCK_ADC3_LEFT2 0x0119 /* Audio Dock ADC3 Left, 2nd or 96kHz */
1229#define EMU_SRC_DOCK_ADC3_LEFT3 0x011a /* Audio Dock ADC3 Left, 3rd or 192kHz */
1230#define EMU_SRC_DOCK_ADC3_LEFT4 0x011b /* Audio Dock ADC3 Left, 4th or 192kHz */
1231#define EMU_SRC_DOCK_ADC3_RIGHT1 0x011c /* Audio Dock ADC3 Right, 1st or 48kHz only */
1232#define EMU_SRC_DOCK_ADC3_RIGHT2 0x011d /* Audio Dock ADC3 Right, 2nd or 96kHz */
1233#define EMU_SRC_DOCK_ADC3_RIGHT3 0x011e /* Audio Dock ADC3 Right, 3rd or 192kHz */
1234#define EMU_SRC_DOCK_ADC3_RIGHT4 0x011f /* Audio Dock ADC3 Right, 4th or 192kHz */
1235#define EMU_SRC_HAMOA_ADC_LEFT1 0x0200 /* Hamoa ADC Left, 1st or 48kHz only */
1236#define EMU_SRC_HAMOA_ADC_LEFT2 0x0202 /* Hamoa ADC Left, 2nd or 96kHz */
1237#define EMU_SRC_HAMOA_ADC_LEFT3 0x0204 /* Hamoa ADC Left, 3rd or 192kHz */
1238#define EMU_SRC_HAMOA_ADC_LEFT4 0x0206 /* Hamoa ADC Left, 4th or 192kHz */
1239#define EMU_SRC_HAMOA_ADC_RIGHT1 0x0201 /* Hamoa ADC Right, 1st or 48kHz only */
1240#define EMU_SRC_HAMOA_ADC_RIGHT2 0x0203 /* Hamoa ADC Right, 2nd or 96kHz */
1241#define EMU_SRC_HAMOA_ADC_RIGHT3 0x0205 /* Hamoa ADC Right, 3rd or 192kHz */
1242#define EMU_SRC_HAMOA_ADC_RIGHT4 0x0207 /* Hamoa ADC Right, 4th or 192kHz */
1243#define EMU_SRC_ALICE_EMU32A 0x0300 /* Alice2 EMU32a 16 outputs. +0 to +0xf */
1244#define EMU_SRC_ALICE_EMU32B 0x0310 /* Alice2 EMU32b 16 outputs. +0 to +0xf */
1245#define EMU_SRC_HANA_ADAT 0x0400 /* Hana ADAT 8 channel in +0 to +7 */
1246#define EMU_SRC_HANA_SPDIF_LEFT1 0x0500 /* Hana SPDIF Left, 1st or 48kHz only */
1247#define EMU_SRC_HANA_SPDIF_LEFT2 0x0502 /* Hana SPDIF Left, 2nd or 96kHz */
1248#define EMU_SRC_HANA_SPDIF_RIGHT1 0x0501 /* Hana SPDIF Right, 1st or 48kHz only */
1249#define EMU_SRC_HANA_SPDIF_RIGHT2 0x0503 /* Hana SPDIF Right, 2nd or 96kHz */
1250/* 0x600 and 0x700 no used */
889 1251
890/* ------------------- STRUCTURES -------------------- */ 1252/* ------------------- STRUCTURES -------------------- */
891 1253
@@ -1063,7 +1425,7 @@ struct snd_emu_chip_details {
1063 unsigned char spdif_bug; /* Has Spdif phasing bug */ 1425 unsigned char spdif_bug; /* Has Spdif phasing bug */
1064 unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */ 1426 unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */
1065 unsigned char ecard; /* APS EEPROM */ 1427 unsigned char ecard; /* APS EEPROM */
1066 unsigned char emu1212m; /* EMU 1212m card */ 1428 unsigned char emu1010; /* EMU 1010m card */
1067 unsigned char spi_dac; /* SPI interface for DAC */ 1429 unsigned char spi_dac; /* SPI interface for DAC */
1068 unsigned char i2c_adc; /* I2C interface for ADC */ 1430 unsigned char i2c_adc; /* I2C interface for ADC */
1069 unsigned char adc_1361t; /* Use Philips 1361T ADC */ 1431 unsigned char adc_1361t; /* Use Philips 1361T ADC */
@@ -1072,6 +1434,14 @@ struct snd_emu_chip_details {
1072 const char *id; /* for backward compatibility - can be NULL if not needed */ 1434 const char *id; /* for backward compatibility - can be NULL if not needed */
1073}; 1435};
1074 1436
1437struct snd_emu1010 {
1438 unsigned int output_source[64];
1439 unsigned int input_source[64];
1440 unsigned int adc_pads; /* bit mask */
1441 unsigned int dac_pads; /* bit mask */
1442 unsigned int internal_clock; /* 44100 or 48000 */
1443};
1444
1075struct snd_emu10k1 { 1445struct snd_emu10k1 {
1076 int irq; 1446 int irq;
1077 1447
@@ -1079,6 +1449,7 @@ struct snd_emu10k1 {
1079 unsigned int tos_link: 1, /* tos link detected */ 1449 unsigned int tos_link: 1, /* tos link detected */
1080 rear_ac97: 1, /* rear channels are on AC'97 */ 1450 rear_ac97: 1, /* rear channels are on AC'97 */
1081 enable_ir: 1; 1451 enable_ir: 1;
1452 unsigned int support_tlv :1;
1082 /* Contains profile of card capabilities */ 1453 /* Contains profile of card capabilities */
1083 const struct snd_emu_chip_details *card_capabilities; 1454 const struct snd_emu_chip_details *card_capabilities;
1084 unsigned int audigy; /* is Audigy? */ 1455 unsigned int audigy; /* is Audigy? */
@@ -1104,6 +1475,8 @@ struct snd_emu10k1 {
1104 spinlock_t memblk_lock; 1475 spinlock_t memblk_lock;
1105 1476
1106 unsigned int spdif_bits[3]; /* s/pdif out setup */ 1477 unsigned int spdif_bits[3]; /* s/pdif out setup */
1478 unsigned int i2c_capture_source;
1479 u8 i2c_capture_volume[4][2];
1107 1480
1108 struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */ 1481 struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */
1109 int gpr_base; 1482 int gpr_base;
@@ -1132,6 +1505,7 @@ struct snd_emu10k1 {
1132 int p16v_device_offset; 1505 int p16v_device_offset;
1133 u32 p16v_capture_source; 1506 u32 p16v_capture_source;
1134 u32 p16v_capture_channel; 1507 u32 p16v_capture_channel;
1508 struct snd_emu1010 emu1010;
1135 struct snd_emu10k1_pcm_mixer pcm_mixer[32]; 1509 struct snd_emu10k1_pcm_mixer pcm_mixer[32];
1136 struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK]; 1510 struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK];
1137 struct snd_kcontrol *ctl_send_routing; 1511 struct snd_kcontrol *ctl_send_routing;
@@ -1208,6 +1582,10 @@ void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned i
1208unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); 1582unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
1209void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); 1583void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
1210int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data); 1584int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
1585int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
1586int snd_emu1010_fpga_write(struct snd_emu10k1 * emu, int reg, int value);
1587int snd_emu1010_fpga_read(struct snd_emu10k1 * emu, int reg, int *value);
1588int snd_emu1010_fpga_link_dst_src_write(struct snd_emu10k1 * emu, int dst, int src);
1211unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc); 1589unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
1212void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); 1590void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
1213void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb); 1591void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb);
@@ -1524,11 +1902,20 @@ struct snd_emu10k1_fx8010_control_gpr {
1524 unsigned int value[32]; /* initial values */ 1902 unsigned int value[32]; /* initial values */
1525 unsigned int min; /* minimum range */ 1903 unsigned int min; /* minimum range */
1526 unsigned int max; /* maximum range */ 1904 unsigned int max; /* maximum range */
1527 union {
1528 snd_kcontrol_tlv_rw_t *c;
1529 unsigned int *p;
1530 } tlv;
1531 unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ 1905 unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
1906 const unsigned int *tlv;
1907};
1908
1909/* old ABI without TLV support */
1910struct snd_emu10k1_fx8010_control_old_gpr {
1911 struct snd_ctl_elem_id id;
1912 unsigned int vcount;
1913 unsigned int count;
1914 unsigned short gpr[32];
1915 unsigned int value[32];
1916 unsigned int min;
1917 unsigned int max;
1918 unsigned int translation;
1532}; 1919};
1533 1920
1534struct snd_emu10k1_fx8010_code { 1921struct snd_emu10k1_fx8010_code {
@@ -1579,6 +1966,8 @@ struct snd_emu10k1_fx8010_pcm_rec {
1579 unsigned int res2; /* reserved */ 1966 unsigned int res2; /* reserved */
1580}; 1967};
1581 1968
1969#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
1970
1582#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) 1971#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info)
1583#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) 1972#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code)
1584#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) 1973#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
@@ -1587,6 +1976,7 @@ struct snd_emu10k1_fx8010_pcm_rec {
1587#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) 1976#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
1588#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) 1977#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
1589#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) 1978#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
1979#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int)
1590#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) 1980#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80)
1591#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) 1981#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81)
1592#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) 1982#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)