aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/emu10k1.h
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2006-10-01 05:48:04 -0400
committerJaroslav Kysela <perex@suse.cz>2007-02-09 02:59:59 -0500
commit9f4bd5dde81b5cb94e4f52f2f05825aa0422f1ff (patch)
tree884d0016c361a555ab1bc95287e64a6c109a0609 /include/sound/emu10k1.h
parent5986a2ec35836a878350c54af4bd91b1de6abc59 (diff)
[ALSA] snd-emu10k1: Added support for emu1010, including E-Mu 1212m and E-Mu 1820m
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'include/sound/emu10k1.h')
-rw-r--r--include/sound/emu10k1.h315
1 files changed, 313 insertions, 2 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 3d3c1514cf71..396812eb668d 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 */
@@ -886,6 +914,280 @@
886#define A_HIWORD_RESULT_MASK 0x007ff000 914#define A_HIWORD_RESULT_MASK 0x007ff000
887#define A_HIWORD_OPA_MASK 0x000007ff 915#define A_HIWORD_OPA_MASK 0x000007ff
888 916
917/************************************************************************************************/
918/* EMU1010m HANA FPGA registers */
919/************************************************************************************************/
920#define EMU_HANA_DESTHI 0x00 /* 0000xxx 3 bits Link Destination */
921#define EMU_HANA_DESTLO 0x01 /* 00xxxxx 5 bits */
922#define EMU_HANA_SRCHI 0x02 /* 0000xxx 3 bits Link Source */
923#define EMU_HANA_SRCLO 0x03 /* 00xxxxx 5 bits */
924#define EMU_HANA_DOCK_PWR 0x04 /* 000000x 1 bits Audio Dock power */
925#define EMU_HANA_DOCK_PWR_ON 0x01 /* Audio Dock power on */
926#define EMU_HANA_WCLOCK 0x05 /* 0000xxx 3 bits Word Clock source select */
927 /* Must be written after power on to reset DLL */
928 /* One is unable to detect the Audio dock without this */
929#define EMU_HANA_WCLOCK_SRC_MASK 0x07
930#define EMU_HANA_WCLOCK_INT_48K 0x00
931#define EMU_HANA_WCLOCK_INT_44_1K 0x01
932#define EMU_HANA_WCLOCK_HANA_SPDIF_IN 0x02
933#define EMU_HANA_WCLOCK_HANA_ADAT_IN 0x03
934#define EMU_HANA_WCLOCK_SYNC_BNCN 0x04
935#define EMU_HANA_WCLOCK_2ND_HANA 0x05
936#define EMU_HANA_WCLOCK_SRC_RESERVED 0x06
937#define EMU_HANA_WCLOCK_OFF 0x07 /* For testing, forces fallback to DEFCLOCK */
938#define EMU_HANA_WCLOCK_MULT_MASK 0x18
939#define EMU_HANA_WCLOCK_1X 0x00
940#define EMU_HANA_WCLOCK_2X 0x08
941#define EMU_HANA_WCLOCK_4X 0x10
942#define EMU_HANA_WCLOCK_MULT_RESERVED 0x18
943
944#define EMU_HANA_DEFCLOCK 0x06 /* 000000x 1 bits Default Word Clock */
945#define EMU_HANA_DEFCLOCK_48K 0x00
946#define EMU_HANA_DEFCLOCK_44_1K 0x01
947
948#define EMU_HANA_UNMUTE 0x07 /* 000000x 1 bits Mute all audio outputs */
949#define EMU_MUTE 0x00
950#define EMU_UNMUTE 0x01
951
952#define EMU_HANA_FPGA_CONFIG 0x08 /* 00000xx 2 bits Config control of FPGAs */
953#define EMU_HANA_FPGA_CONFIG_AUDIODOCK 0x01 /* Set in order to program FPGA on Audio Dock */
954#define EMU_HANA_FPGA_CONFIG_HANA 0x02 /* Set in order to program FPGA on Hana */
955
956#define EMU_HANA_IRQ_ENABLE 0x09 /* 000xxxx 4 bits IRQ Enable */
957#define EMU_HANA_IRQ_WCLK_CHANGED 0x01
958#define EMU_HANA_IRQ_ADAT 0x02
959#define EMU_HANA_IRQ_DOCK 0x04
960#define EMU_HANA_IRQ_DOCK_LOST 0x08
961
962#define EMU_HANA_SPDIF_MODE 0x0a /* 00xxxxx 5 bits SPDIF MODE */
963#define EMU_HANA_SPDIF_MODE_TX_COMSUMER 0x00
964#define EMU_HANA_SPDIF_MODE_TX_PRO 0x01
965#define EMU_HANA_SPDIF_MODE_TX_NOCOPY 0x02
966#define EMU_HANA_SPDIF_MODE_RX_COMSUMER 0x00
967#define EMU_HANA_SPDIF_MODE_RX_PRO 0x04
968#define EMU_HANA_SPDIF_MODE_RX_NOCOPY 0x08
969#define EMU_HANA_SPDIF_MODE_RX_INVALID 0x10
970
971#define EMU_HANA_OPTICAL_TYPE 0x0b /* 00000xx 2 bits ADAT or SPDIF in/out */
972#define EMU_HANA_OPTICAL_IN_SPDIF 0x00
973#define EMU_HANA_OPTICAL_IN_ADAT 0x01
974#define EMU_HANA_OPTICAL_OUT_SPDIF 0x00
975#define EMU_HANA_OPTICAL_OUT_ADAT 0x02
976
977#define EMU_HANA_MIDI 0x0c /* 000000x 1 bit Control MIDI */
978#define EMU_HANA_MIDI_IN_FROM_HAMOA 0x00 /* HAMOA MIDI in to Alice 2 MIDI B */
979#define EMU_HANA_MIDI_IN_FROM_DOCK 0x01 /* Audio Dock MIDI in to Alice 2 MIDI B */
980
981#define EMU_HANA_DOCK_LEDS_1 0x0d /* 000xxxx 4 bit Audio Dock LEDs */
982#define EMU_HANA_DOCK_LEDS_1_MIDI1 0x01 /* MIDI 1 LED on */
983#define EMU_HANA_DOCK_LEDS_1_MIDI2 0x02 /* MIDI 2 LED on */
984#define EMU_HANA_DOCK_LEDS_1_SMPTE_IN 0x04 /* SMPTE IN LED on */
985#define EMU_HANA_DOCK_LEDS_1_SMPTE_OUT 0x08 /* SMPTE OUT LED on */
986
987#define EMU_HANA_DOCK_LEDS_2 0x0e /* 0xxxxxx 6 bit Audio Dock LEDs */
988#define EMU_HANA_DOCK_LEDS_2_44K 0x01 /* 44.1 kHz LED on */
989#define EMU_HANA_DOCK_LEDS_2_48K 0x02 /* 48 kHz LED on */
990#define EMU_HANA_DOCK_LEDS_2_96K 0x04 /* 96 kHz LED on */
991#define EMU_HANA_DOCK_LEDS_2_192K 0x08 /* 192 kHz LED on */
992#define EMU_HANA_DOCK_LEDS_2_LOCK 0x10 /* LOCK LED on */
993#define EMU_HANA_DOCK_LEDS_2_EXT 0x20 /* EXT LED on */
994
995#define EMU_HANA_DOCK_LEDS_3 0x0f /* 0xxxxxx 6 bit Audio Dock LEDs */
996#define EMU_HANA_DOCK_LEDS_3_CLIP_A 0x01 /* Mic A Clip LED on */
997#define EMU_HANA_DOCK_LEDS_3_CLIP_B 0x02 /* Mic B Clip LED on */
998#define EMU_HANA_DOCK_LEDS_3_SIGNAL_A 0x04 /* Signal A Clip LED on */
999#define EMU_HANA_DOCK_LEDS_3_SIGNAL_B 0x08 /* Signal B Clip LED on */
1000#define EMU_HANA_DOCK_LEDS_3_MANUAL_CLIP 0x10 /* Manual Clip detection */
1001#define EMU_HANA_DOCK_LEDS_3_MANUAL_SIGNAL 0x20 /* Manual Signal detection */
1002
1003#define EMU_HANA_DOCK_PADS 0x10 /* 0000xxx 3 bit Audio Dock ADC 14dB pads */
1004#define EMU_HANA_DOCK_PAD1 0x01 /* 14dB Attenuation on ADC 1 */
1005#define EMU_HANA_DOCK_PAD2 0x02 /* 14dB Attenuation on ADC 2 */
1006#define EMU_HANA_DOCK_PAD3 0x04 /* 14dB Attenuation on ADC 3 */
1007
1008#define EMU_HANA_DOCK_MISC 0x11 /* 0xxxxxx 6 bit Audio Dock misc bits */
1009#define EMU_HANA_DOCK_DAC1_MUTE 0x01 /* DAC 1 Mute */
1010#define EMU_HANA_DOCK_DAC2_MUTE 0x02 /* DAC 2 Mute */
1011#define EMU_HANA_DOCK_DAC3_MUTE 0x04 /* DAC 3 Mute */
1012#define EMU_HANA_DOCK_DAC4_MUTE 0x08 /* DAC 4 Mute */
1013#define EMU_HANA_DOCK_PHONES_192_DAC1 0x00 /* DAC 1 Headphones source at 192kHz */
1014#define EMU_HANA_DOCK_PHONES_192_DAC2 0x10 /* DAC 2 Headphones source at 192kHz */
1015#define EMU_HANA_DOCK_PHONES_192_DAC3 0x20 /* DAC 3 Headphones source at 192kHz */
1016#define EMU_HANA_DOCK_PHONES_192_DAC4 0x30 /* DAC 4 Headphones source at 192kHz */
1017
1018#define EMU_HANA_UNKNOWN12 0x12 /* 0xxxxxx 6 bit Unknown12 */
1019#define EMU_HANA_UNKNOWN13 0x13 /* 0xxxxxx 6 bit Unknown13 */
1020/* 0x14 - 0x1f Unused R/W registers */
1021#define EMU_HANA_IRQ_STATUS 0x20 /* 000xxxx 4 bits IRQ Status */
1022#if 0 /* Already defined for reg 0x09 IRQ_ENABLE */
1023#define EMU_HANA_IRQ_WCLK_CHANGED 0x01
1024#define EMU_HANA_IRQ_ADAT 0x02
1025#define EMU_HANA_IRQ_DOCK 0x04
1026#define EMU_HANA_IRQ_DOCK_LOST 0x08
1027#endif
1028
1029#define EMU_HANA_OPTION_CARDS 0x21 /* 000xxxx 4 bits Presence of option cards */
1030#define EMU_HANA_OPTION_HAMOA 0x01 /* HAMOA card present */
1031#define EMU_HANA_OPTION_SYNC 0x02 /* Sync card present */
1032#define EMU_HANA_OPTION_DOCK_ONLINE 0x04 /* Audio Dock online and FPGA configured */
1033#define EMU_HANA_OPTION_DOCK_OFFLINE 0x08 /* Audio Dock online and FPGA not configured */
1034
1035#define EMU_HANA_ID 0x22 /* 1010101 7 bits ID byte & 0x7f = 0x55 */
1036
1037#define EMU_HANA_MAJOR_REV 0x23 /* 0000xxx 3 bit Hana FPGA Major rev */
1038#define EMU_HANA_MINOR_REV 0x24 /* 0000xxx 3 bit Hana FPGA Minor rev */
1039
1040#define EMU_DOCK_MAJOR_REV 0x25 /* 0000xxx 3 bit Audio Dock FPGA Major rev */
1041#define EMU_DOCK_MINOR_REV 0x26 /* 0000xxx 3 bit Audio Dock FPGA Minor rev */
1042
1043#define EMU_DOCK_BOARD_ID 0x27 /* 00000xx 2 bits Audio Dock ID pins */
1044#define EMU_DOCK_BOARD_ID0 0x00 /* ID bit 0 */
1045#define EMU_DOCK_BOARD_ID1 0x03 /* ID bit 1 */
1046
1047#define EMU_HANA_WC_SPDIF_HI 0x28 /* 0xxxxxx 6 bit SPDIF IN Word clock, upper 6 bits */
1048#define EMU_HANA_WC_SPDIF_LO 0x29 /* 0xxxxxx 6 bit SPDIF IN Word clock, lower 6 bits */
1049
1050#define EMU_HANA_WC_ADAT_HI 0x2a /* 0xxxxxx 6 bit ADAT IN Word clock, upper 6 bits */
1051#define EMU_HANA_WC_ADAT_LO 0x2b /* 0xxxxxx 6 bit ADAT IN Word clock, lower 6 bits */
1052
1053#define EMU_HANA_WC_BNC_LO 0x2c /* 0xxxxxx 6 bit BNC IN Word clock, lower 6 bits */
1054#define EMU_HANA_WC_BNC_HI 0x2d /* 0xxxxxx 6 bit BNC IN Word clock, upper 6 bits */
1055
1056#define EMU_HANA2_WC_SPDIF_HI 0x2e /* 0xxxxxx 6 bit HANA2 SPDIF IN Word clock, upper 6 bits */
1057#define EMU_HANA2_WC_SPDIF_LO 0x2f /* 0xxxxxx 6 bit HANA2 SPDIF IN Word clock, lower 6 bits */
1058/* 0x30 - 0x3f Unused Read only registers */
1059
1060/************************************************************************************************/
1061/* EMU1010m HANA Destinations */
1062/************************************************************************************************/
1063#define EMU_DST_ALICE2_EMU32_0 0x000f /* 16 EMU32 channels to Alice2 +0 to +0xf */
1064#define EMU_DST_ALICE2_EMU32_1 0x0000 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1065#define EMU_DST_ALICE2_EMU32_2 0x0001 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1066#define EMU_DST_ALICE2_EMU32_3 0x0002 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1067#define EMU_DST_ALICE2_EMU32_4 0x0003 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1068#define EMU_DST_ALICE2_EMU32_5 0x0004 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1069#define EMU_DST_ALICE2_EMU32_6 0x0005 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1070#define EMU_DST_ALICE2_EMU32_7 0x0006 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1071#define EMU_DST_ALICE2_EMU32_8 0x0007 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1072#define EMU_DST_ALICE2_EMU32_9 0x0008 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1073#define EMU_DST_ALICE2_EMU32_A 0x0009 /* 16 EMU32 channels to Alice2 +0 to +0xf */
1074#define EMU_DST_ALICE2_EMU32_B 0x000a /* 16 EMU32 channels to Alice2 +0 to +0xf */
1075#define EMU_DST_ALICE2_EMU32_C 0x000b /* 16 EMU32 channels to Alice2 +0 to +0xf */
1076#define EMU_DST_ALICE2_EMU32_D 0x000c /* 16 EMU32 channels to Alice2 +0 to +0xf */
1077#define EMU_DST_ALICE2_EMU32_E 0x000d /* 16 EMU32 channels to Alice2 +0 to +0xf */
1078#define EMU_DST_ALICE2_EMU32_F 0x000e /* 16 EMU32 channels to Alice2 +0 to +0xf */
1079#define EMU_DST_DOCK_DAC1_LEFT1 0x0100 /* Audio Dock DAC1 Left, 1st or 48kHz only */
1080#define EMU_DST_DOCK_DAC1_LEFT2 0x0101 /* Audio Dock DAC1 Left, 2nd or 96kHz */
1081#define EMU_DST_DOCK_DAC1_LEFT3 0x0102 /* Audio Dock DAC1 Left, 3rd or 192kHz */
1082#define EMU_DST_DOCK_DAC1_LEFT4 0x0103 /* Audio Dock DAC1 Left, 4th or 192kHz */
1083#define EMU_DST_DOCK_DAC1_RIGHT1 0x0104 /* Audio Dock DAC1 Right, 1st or 48kHz only */
1084#define EMU_DST_DOCK_DAC1_RIGHT2 0x0105 /* Audio Dock DAC1 Right, 2nd or 96kHz */
1085#define EMU_DST_DOCK_DAC1_RIGHT3 0x0106 /* Audio Dock DAC1 Right, 3rd or 192kHz */
1086#define EMU_DST_DOCK_DAC1_RIGHT4 0x0107 /* Audio Dock DAC1 Right, 4th or 192kHz */
1087#define EMU_DST_DOCK_DAC2_LEFT1 0x0108 /* Audio Dock DAC2 Left, 1st or 48kHz only */
1088#define EMU_DST_DOCK_DAC2_LEFT2 0x0109 /* Audio Dock DAC2 Left, 2nd or 96kHz */
1089#define EMU_DST_DOCK_DAC2_LEFT3 0x010a /* Audio Dock DAC2 Left, 3rd or 192kHz */
1090#define EMU_DST_DOCK_DAC2_LEFT4 0x010b /* Audio Dock DAC2 Left, 4th or 192kHz */
1091#define EMU_DST_DOCK_DAC2_RIGHT1 0x010c /* Audio Dock DAC2 Right, 1st or 48kHz only */
1092#define EMU_DST_DOCK_DAC2_RIGHT2 0x010d /* Audio Dock DAC2 Right, 2nd or 96kHz */
1093#define EMU_DST_DOCK_DAC2_RIGHT3 0x010e /* Audio Dock DAC2 Right, 3rd or 192kHz */
1094#define EMU_DST_DOCK_DAC2_RIGHT4 0x010f /* Audio Dock DAC2 Right, 4th or 192kHz */
1095#define EMU_DST_DOCK_DAC3_LEFT1 0x0110 /* Audio Dock DAC1 Left, 1st or 48kHz only */
1096#define EMU_DST_DOCK_DAC3_LEFT2 0x0111 /* Audio Dock DAC1 Left, 2nd or 96kHz */
1097#define EMU_DST_DOCK_DAC3_LEFT3 0x0112 /* Audio Dock DAC1 Left, 3rd or 192kHz */
1098#define EMU_DST_DOCK_DAC3_LEFT4 0x0113 /* Audio Dock DAC1 Left, 4th or 192kHz */
1099#define EMU_DST_DOCK_PHONES_LEFT1 0x0112 /* Audio Dock PHONES Left, 1st or 48kHz only */
1100#define EMU_DST_DOCK_PHONES_LEFT2 0x0113 /* Audio Dock PHONES Left, 2nd or 96kHz */
1101#define EMU_DST_DOCK_DAC3_RIGHT1 0x0114 /* Audio Dock DAC1 Right, 1st or 48kHz only */
1102#define EMU_DST_DOCK_DAC3_RIGHT2 0x0115 /* Audio Dock DAC1 Right, 2nd or 96kHz */
1103#define EMU_DST_DOCK_DAC3_RIGHT3 0x0116 /* Audio Dock DAC1 Right, 3rd or 192kHz */
1104#define EMU_DST_DOCK_DAC3_RIGHT4 0x0117 /* Audio Dock DAC1 Right, 4th or 192kHz */
1105#define EMU_DST_DOCK_PHONES_RIGHT1 0x0116 /* Audio Dock PHONES Right, 1st or 48kHz only */
1106#define EMU_DST_DOCK_PHONES_RIGHT2 0x0117 /* Audio Dock PHONES Right, 2nd or 96kHz */
1107#define EMU_DST_DOCK_DAC4_LEFT1 0x0118 /* Audio Dock DAC2 Left, 1st or 48kHz only */
1108#define EMU_DST_DOCK_DAC4_LEFT2 0x0119 /* Audio Dock DAC2 Left, 2nd or 96kHz */
1109#define EMU_DST_DOCK_DAC4_LEFT3 0x011a /* Audio Dock DAC2 Left, 3rd or 192kHz */
1110#define EMU_DST_DOCK_DAC4_LEFT4 0x011b /* Audio Dock DAC2 Left, 4th or 192kHz */
1111#define EMU_DST_DOCK_SPDIF_LEFT1 0x011a /* Audio Dock SPDIF Left, 1st or 48kHz only */
1112#define EMU_DST_DOCK_SPDIF_LEFT2 0x011b /* Audio Dock SPDIF Left, 2nd or 96kHz */
1113#define EMU_DST_DOCK_DAC4_RIGHT1 0x011c /* Audio Dock DAC2 Right, 1st or 48kHz only */
1114#define EMU_DST_DOCK_DAC4_RIGHT2 0x011d /* Audio Dock DAC2 Right, 2nd or 96kHz */
1115#define EMU_DST_DOCK_DAC4_RIGHT3 0x011e /* Audio Dock DAC2 Right, 3rd or 192kHz */
1116#define EMU_DST_DOCK_DAC4_RIGHT4 0x011f /* Audio Dock DAC2 Right, 4th or 192kHz */
1117#define EMU_DST_DOCK_SPDIF_RIGHT1 0x011e /* Audio Dock SPDIF Right, 1st or 48kHz only */
1118#define EMU_DST_DOCK_SPDIF_RIGHT2 0x011f /* Audio Dock SPDIF Right, 2nd or 96kHz */
1119#define EMU_DST_HANA_SPDIF_LEFT1 0x0200 /* Hana SPDIF Left, 1st or 48kHz only */
1120#define EMU_DST_HANA_SPDIF_LEFT2 0x0202 /* Hana SPDIF Left, 2nd or 96kHz */
1121#define EMU_DST_HANA_SPDIF_RIGHT1 0x0201 /* Hana SPDIF Right, 1st or 48kHz only */
1122#define EMU_DST_HANA_SPDIF_RIGHT2 0x0203 /* Hana SPDIF Right, 2nd or 96kHz */
1123#define EMU_DST_HAMOA_DAC_LEFT1 0x0300 /* Hamoa DAC Left, 1st or 48kHz only */
1124#define EMU_DST_HAMOA_DAC_LEFT2 0x0302 /* Hamoa DAC Left, 2nd or 96kHz */
1125#define EMU_DST_HAMOA_DAC_LEFT3 0x0304 /* Hamoa DAC Left, 3rd or 192kHz */
1126#define EMU_DST_HAMOA_DAC_LEFT4 0x0306 /* Hamoa DAC Left, 4th or 192kHz */
1127#define EMU_DST_HAMOA_DAC_RIGHT1 0x0301 /* Hamoa DAC Right, 1st or 48kHz only */
1128#define EMU_DST_HAMOA_DAC_RIGHT2 0x0303 /* Hamoa DAC Right, 2nd or 96kHz */
1129#define EMU_DST_HAMOA_DAC_RIGHT3 0x0305 /* Hamoa DAC Right, 3rd or 192kHz */
1130#define EMU_DST_HAMOA_DAC_RIGHT4 0x0307 /* Hamoa DAC Right, 4th or 192kHz */
1131#define EMU_DST_HANA_ADAT 0x0400 /* Hana ADAT 8 channel out +0 to +7 */
1132#define EMU_DST_ALICE_I2S0_LEFT 0x0500 /* Alice2 I2S0 Left */
1133#define EMU_DST_ALICE_I2S0_RIGHT 0x0501 /* Alice2 I2S0 Right */
1134#define EMU_DST_ALICE_I2S1_LEFT 0x0600 /* Alice2 I2S1 Left */
1135#define EMU_DST_ALICE_I2S1_RIGHT 0x0601 /* Alice2 I2S1 Right */
1136#define EMU_DST_ALICE_I2S2_LEFT 0x0700 /* Alice2 I2S2 Left */
1137#define EMU_DST_ALICE_I2S2_RIGHT 0x0701 /* Alice2 I2S2 Right */
1138
1139/************************************************************************************************/
1140/* EMU1010m HANA Sources */
1141/************************************************************************************************/
1142#define EMU_SRC_SILENCE 0x0000 /* Silence */
1143#define EMU_SRC_DOCK_MIC_A1 0x0100 /* Audio Dock Mic A, 1st or 48kHz only */
1144#define EMU_SRC_DOCK_MIC_A2 0x0101 /* Audio Dock Mic A, 2nd or 96kHz */
1145#define EMU_SRC_DOCK_MIC_A3 0x0102 /* Audio Dock Mic A, 3rd or 192kHz */
1146#define EMU_SRC_DOCK_MIC_A4 0x0103 /* Audio Dock Mic A, 4th or 192kHz */
1147#define EMU_SRC_DOCK_MIC_B1 0x0104 /* Audio Dock Mic B, 1st or 48kHz only */
1148#define EMU_SRC_DOCK_MIC_B2 0x0105 /* Audio Dock Mic B, 2nd or 96kHz */
1149#define EMU_SRC_DOCK_MIC_B3 0x0106 /* Audio Dock Mic B, 3rd or 192kHz */
1150#define EMU_SRC_DOCK_MIC_B4 0x0107 /* Audio Dock Mic B, 4th or 192kHz */
1151#define EMU_SRC_DOCK_ADC1_LEFT1 0x0108 /* Audio Dock ADC1 Left, 1st or 48kHz only */
1152#define EMU_SRC_DOCK_ADC1_LEFT2 0x0109 /* Audio Dock ADC1 Left, 2nd or 96kHz */
1153#define EMU_SRC_DOCK_ADC1_LEFT3 0x010a /* Audio Dock ADC1 Left, 3rd or 192kHz */
1154#define EMU_SRC_DOCK_ADC1_LEFT4 0x010b /* Audio Dock ADC1 Left, 4th or 192kHz */
1155#define EMU_SRC_DOCK_ADC1_RIGHT1 0x010c /* Audio Dock ADC1 Right, 1st or 48kHz only */
1156#define EMU_SRC_DOCK_ADC1_RIGHT2 0x010d /* Audio Dock ADC1 Right, 2nd or 96kHz */
1157#define EMU_SRC_DOCK_ADC1_RIGHT3 0x010e /* Audio Dock ADC1 Right, 3rd or 192kHz */
1158#define EMU_SRC_DOCK_ADC1_RIGHT4 0x010f /* Audio Dock ADC1 Right, 4th or 192kHz */
1159#define EMU_SRC_DOCK_ADC2_LEFT1 0x0110 /* Audio Dock ADC2 Left, 1st or 48kHz only */
1160#define EMU_SRC_DOCK_ADC2_LEFT2 0x0111 /* Audio Dock ADC2 Left, 2nd or 96kHz */
1161#define EMU_SRC_DOCK_ADC2_LEFT3 0x0112 /* Audio Dock ADC2 Left, 3rd or 192kHz */
1162#define EMU_SRC_DOCK_ADC2_LEFT4 0x0113 /* Audio Dock ADC2 Left, 4th or 192kHz */
1163#define EMU_SRC_DOCK_ADC2_RIGHT1 0x0114 /* Audio Dock ADC2 Right, 1st or 48kHz only */
1164#define EMU_SRC_DOCK_ADC2_RIGHT2 0x0115 /* Audio Dock ADC2 Right, 2nd or 96kHz */
1165#define EMU_SRC_DOCK_ADC2_RIGHT3 0x0116 /* Audio Dock ADC2 Right, 3rd or 192kHz */
1166#define EMU_SRC_DOCK_ADC2_RIGHT4 0x0117 /* Audio Dock ADC2 Right, 4th or 192kHz */
1167#define EMU_SRC_DOCK_ADC3_LEFT1 0x0118 /* Audio Dock ADC3 Left, 1st or 48kHz only */
1168#define EMU_SRC_DOCK_ADC3_LEFT2 0x0119 /* Audio Dock ADC3 Left, 2nd or 96kHz */
1169#define EMU_SRC_DOCK_ADC3_LEFT3 0x011a /* Audio Dock ADC3 Left, 3rd or 192kHz */
1170#define EMU_SRC_DOCK_ADC3_LEFT4 0x011b /* Audio Dock ADC3 Left, 4th or 192kHz */
1171#define EMU_SRC_DOCK_ADC3_RIGHT1 0x011c /* Audio Dock ADC3 Right, 1st or 48kHz only */
1172#define EMU_SRC_DOCK_ADC3_RIGHT2 0x011d /* Audio Dock ADC3 Right, 2nd or 96kHz */
1173#define EMU_SRC_DOCK_ADC3_RIGHT3 0x011e /* Audio Dock ADC3 Right, 3rd or 192kHz */
1174#define EMU_SRC_DOCK_ADC3_RIGHT4 0x011f /* Audio Dock ADC3 Right, 4th or 192kHz */
1175#define EMU_SRC_HAMOA_ADC_LEFT1 0x0200 /* Hamoa ADC Left, 1st or 48kHz only */
1176#define EMU_SRC_HAMOA_ADC_LEFT2 0x0202 /* Hamoa ADC Left, 2nd or 96kHz */
1177#define EMU_SRC_HAMOA_ADC_LEFT3 0x0204 /* Hamoa ADC Left, 3rd or 192kHz */
1178#define EMU_SRC_HAMOA_ADC_LEFT4 0x0206 /* Hamoa ADC Left, 4th or 192kHz */
1179#define EMU_SRC_HAMOA_ADC_RIGHT1 0x0201 /* Hamoa ADC Right, 1st or 48kHz only */
1180#define EMU_SRC_HAMOA_ADC_RIGHT2 0x0203 /* Hamoa ADC Right, 2nd or 96kHz */
1181#define EMU_SRC_HAMOA_ADC_RIGHT3 0x0205 /* Hamoa ADC Right, 3rd or 192kHz */
1182#define EMU_SRC_HAMOA_ADC_RIGHT4 0x0207 /* Hamoa ADC Right, 4th or 192kHz */
1183#define EMU_SRC_ALICE_EMU32A 0x0300 /* Alice2 EMU32a 16 outputs. +0 to +0xf */
1184#define EMU_SRC_ALICE_EMU32B 0x0310 /* Alice2 EMU32b 16 outputs. +0 to +0xf */
1185#define EMU_SRC_HANA_ADAT 0x0400 /* Hana ADAT 8 channel in +0 to +7 */
1186#define EMU_SRC_HANA_SPDIF_LEFT1 0x0500 /* Hana SPDIF Left, 1st or 48kHz only */
1187#define EMU_SRC_HANA_SPDIF_LEFT2 0x0502 /* Hana SPDIF Left, 2nd or 96kHz */
1188#define EMU_SRC_HANA_SPDIF_RIGHT1 0x0501 /* Hana SPDIF Right, 1st or 48kHz only */
1189#define EMU_SRC_HANA_SPDIF_RIGHT2 0x0503 /* Hana SPDIF Right, 2nd or 96kHz */
1190/* 0x600 and 0x700 no used */
889 1191
890/* ------------------- STRUCTURES -------------------- */ 1192/* ------------------- STRUCTURES -------------------- */
891 1193
@@ -1063,7 +1365,7 @@ struct snd_emu_chip_details {
1063 unsigned char spdif_bug; /* Has Spdif phasing bug */ 1365 unsigned char spdif_bug; /* Has Spdif phasing bug */
1064 unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */ 1366 unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */
1065 unsigned char ecard; /* APS EEPROM */ 1367 unsigned char ecard; /* APS EEPROM */
1066 unsigned char emu1212m; /* EMU 1212m card */ 1368 unsigned char emu1010; /* EMU 1010m card */
1067 unsigned char spi_dac; /* SPI interface for DAC */ 1369 unsigned char spi_dac; /* SPI interface for DAC */
1068 unsigned char i2c_adc; /* I2C interface for ADC */ 1370 unsigned char i2c_adc; /* I2C interface for ADC */
1069 unsigned char adc_1361t; /* Use Philips 1361T ADC */ 1371 unsigned char adc_1361t; /* Use Philips 1361T ADC */
@@ -1072,6 +1374,11 @@ struct snd_emu_chip_details {
1072 const char *id; /* for backward compatibility - can be NULL if not needed */ 1374 const char *id; /* for backward compatibility - can be NULL if not needed */
1073}; 1375};
1074 1376
1377struct snd_emu1010 {
1378 unsigned int output_source[64];
1379 unsigned int input_source[64];
1380};
1381
1075struct snd_emu10k1 { 1382struct snd_emu10k1 {
1076 int irq; 1383 int irq;
1077 1384
@@ -1132,6 +1439,7 @@ struct snd_emu10k1 {
1132 int p16v_device_offset; 1439 int p16v_device_offset;
1133 u32 p16v_capture_source; 1440 u32 p16v_capture_source;
1134 u32 p16v_capture_channel; 1441 u32 p16v_capture_channel;
1442 struct snd_emu1010 emu1010;
1135 struct snd_emu10k1_pcm_mixer pcm_mixer[32]; 1443 struct snd_emu10k1_pcm_mixer pcm_mixer[32];
1136 struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK]; 1444 struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK];
1137 struct snd_kcontrol *ctl_send_routing; 1445 struct snd_kcontrol *ctl_send_routing;
@@ -1208,6 +1516,9 @@ 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); 1516unsigned 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); 1517void 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); 1518int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
1519int snd_emu1010_fpga_write(struct snd_emu10k1 * emu, int reg, int value);
1520int snd_emu1010_fpga_read(struct snd_emu10k1 * emu, int reg, int *value);
1521int 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); 1522unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
1212void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); 1523void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
1213void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb); 1524void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb);