Lines Matching +full:0 +full:x00d00000

60 	snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0);  in snd_emu10k1_voice_init()
61 snd_emu10k1_ptr_write(emu, IP, ch, 0); in snd_emu10k1_voice_init()
62 snd_emu10k1_ptr_write(emu, VTFT, ch, 0xffff); in snd_emu10k1_voice_init()
63 snd_emu10k1_ptr_write(emu, CVCF, ch, 0xffff); in snd_emu10k1_voice_init()
64 snd_emu10k1_ptr_write(emu, PTRX, ch, 0); in snd_emu10k1_voice_init()
65 snd_emu10k1_ptr_write(emu, CPF, ch, 0); in snd_emu10k1_voice_init()
66 snd_emu10k1_ptr_write(emu, CCR, ch, 0); in snd_emu10k1_voice_init()
68 snd_emu10k1_ptr_write(emu, PSST, ch, 0); in snd_emu10k1_voice_init()
69 snd_emu10k1_ptr_write(emu, DSL, ch, 0x10); in snd_emu10k1_voice_init()
70 snd_emu10k1_ptr_write(emu, CCCA, ch, 0); in snd_emu10k1_voice_init()
71 snd_emu10k1_ptr_write(emu, Z1, ch, 0); in snd_emu10k1_voice_init()
72 snd_emu10k1_ptr_write(emu, Z2, ch, 0); in snd_emu10k1_voice_init()
73 snd_emu10k1_ptr_write(emu, FXRT, ch, 0x32100000); in snd_emu10k1_voice_init()
75 snd_emu10k1_ptr_write(emu, ATKHLDM, ch, 0); in snd_emu10k1_voice_init()
76 snd_emu10k1_ptr_write(emu, DCYSUSM, ch, 0); in snd_emu10k1_voice_init()
77 snd_emu10k1_ptr_write(emu, IFATN, ch, 0xffff); in snd_emu10k1_voice_init()
78 snd_emu10k1_ptr_write(emu, PEFE, ch, 0); in snd_emu10k1_voice_init()
79 snd_emu10k1_ptr_write(emu, FMMOD, ch, 0); in snd_emu10k1_voice_init()
82 snd_emu10k1_ptr_write(emu, TEMPENV, ch, 0); in snd_emu10k1_voice_init()
85 snd_emu10k1_ptr_write(emu, LFOVAL2, ch, 0); in snd_emu10k1_voice_init()
86 snd_emu10k1_ptr_write(emu, LFOVAL1, ch, 0); in snd_emu10k1_voice_init()
87 snd_emu10k1_ptr_write(emu, ATKHLDV, ch, 0); in snd_emu10k1_voice_init()
88 snd_emu10k1_ptr_write(emu, ENVVOL, ch, 0); in snd_emu10k1_voice_init()
89 snd_emu10k1_ptr_write(emu, ENVVAL, ch, 0); in snd_emu10k1_voice_init()
93 snd_emu10k1_ptr_write(emu, 0x4c, ch, 0); /* ?? */ in snd_emu10k1_voice_init()
94 snd_emu10k1_ptr_write(emu, 0x4d, ch, 0); /* ?? */ in snd_emu10k1_voice_init()
95 snd_emu10k1_ptr_write(emu, 0x4e, ch, 0); /* ?? */ in snd_emu10k1_voice_init()
96 snd_emu10k1_ptr_write(emu, 0x4f, ch, 0); /* ?? */ in snd_emu10k1_voice_init()
97 snd_emu10k1_ptr_write(emu, A_FXRT1, ch, 0x03020100); in snd_emu10k1_voice_init()
98 snd_emu10k1_ptr_write(emu, A_FXRT2, ch, 0x3f3f3f3f); in snd_emu10k1_voice_init()
99 snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, ch, 0); in snd_emu10k1_voice_init()
104 0x00ff,
105 0x02ff,
106 0x0400,
107 0x0520,
108 0x0600,
109 0x08ff,
110 0x0aff,
111 0x0cff,
112 0x0eff,
113 0x10ff,
114 0x1200,
115 0x1400,
116 0x1480,
117 0x1800,
118 0x1aff,
119 0x1cff,
120 0x1e00,
121 0x0530,
122 0x0602,
123 0x0622,
124 0x1400,
128 { 0x17, 0x00 }, /* Reset */
129 { 0x07, 0x00 }, /* Timeout */
130 { 0x0b, 0x22 }, /* Interface control */
131 { 0x0c, 0x22 }, /* Master mode control */
132 { 0x0d, 0x08 }, /* Powerdown control */
133 { 0x0e, 0xcf }, /* Attenuation Left 0x01 = -103dB, 0xff = 24dB */
134 { 0x0f, 0xcf }, /* Attenuation Right 0.5dB steps */
135 { 0x10, 0x7b }, /* ALC Control 1 */
136 { 0x11, 0x00 }, /* ALC Control 2 */
137 { 0x12, 0x32 }, /* ALC Control 3 */
138 { 0x13, 0x00 }, /* Noise gate control */
139 { 0x14, 0xa6 }, /* Limiter control */
140 { 0x15, ADC_MUX_2 }, /* ADC Mixer control. Mic for A2ZS Notebook */
154 snd_emu10k1_ptr_write(emu, MICBS, 0, ADCBS_BUFSIZE_NONE); in snd_emu10k1_init()
155 snd_emu10k1_ptr_write(emu, MICBA, 0, 0); in snd_emu10k1_init()
156 snd_emu10k1_ptr_write(emu, FXBS, 0, ADCBS_BUFSIZE_NONE); in snd_emu10k1_init()
157 snd_emu10k1_ptr_write(emu, FXBA, 0, 0); in snd_emu10k1_init()
158 snd_emu10k1_ptr_write(emu, ADCBS, 0, ADCBS_BUFSIZE_NONE); in snd_emu10k1_init()
159 snd_emu10k1_ptr_write(emu, ADCBA, 0, 0); in snd_emu10k1_init()
162 outl(0, emu->port + INTE); in snd_emu10k1_init()
163 snd_emu10k1_ptr_write(emu, CLIEL, 0, 0); in snd_emu10k1_init()
164 snd_emu10k1_ptr_write(emu, CLIEH, 0, 0); in snd_emu10k1_init()
165 snd_emu10k1_ptr_write(emu, SOLEL, 0, 0); in snd_emu10k1_init()
166 snd_emu10k1_ptr_write(emu, SOLEH, 0, 0); in snd_emu10k1_init()
170 snd_emu10k1_ptr_write(emu, SPBYPASS, 0, SPBYPASS_FORMAT); in snd_emu10k1_init()
172 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_REAR_RIGHT | in snd_emu10k1_init()
177 for (ch = 0; ch < NUM_G; ch++) in snd_emu10k1_init()
180 snd_emu10k1_ptr_write(emu, SPCS0, 0, emu->spdif_bits[0]); in snd_emu10k1_init()
181 snd_emu10k1_ptr_write(emu, SPCS1, 0, emu->spdif_bits[1]); in snd_emu10k1_init()
182 snd_emu10k1_ptr_write(emu, SPCS2, 0, emu->spdif_bits[2]); in snd_emu10k1_init()
187 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0); in snd_emu10k1_init()
188 tmp &= 0xfffff1ff; in snd_emu10k1_init()
189 tmp |= (0x2<<9); in snd_emu10k1_init()
190 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp); in snd_emu10k1_init()
193 snd_emu10k1_ptr20_write(emu, SRCSel, 0, 0x14); in snd_emu10k1_init()
195 /* Use 0xFFFFFFFF to enable P16V sounds. */ in snd_emu10k1_init()
196 snd_emu10k1_ptr20_write(emu, SRCMULTI_ENABLE, 0, 0xFFFFFFFF); in snd_emu10k1_init()
199 outl(0x0201, emu->port + HCFG2); in snd_emu10k1_init()
201 snd_emu10k1_ptr20_write(emu, CAPTURE_P16V_SOURCE, 0, 0x78e4); in snd_emu10k1_init()
207 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0); in snd_emu10k1_init()
208 tmp &= 0xfffff1ff; in snd_emu10k1_init()
209 tmp |= (0x2<<9); in snd_emu10k1_init()
210 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp); in snd_emu10k1_init()
213 outl(0x600000, emu->port + 0x20); in snd_emu10k1_init()
214 outl(0x14, emu->port + 0x24); in snd_emu10k1_init()
217 outl(0x7b0000, emu->port + 0x20); in snd_emu10k1_init()
218 outl(0xFF000000, emu->port + 0x24); in snd_emu10k1_init()
224 outl(0x7a0000, emu->port + 0x20); in snd_emu10k1_init()
225 outl(0xFF000000, emu->port + 0x24); in snd_emu10k1_init()
226 tmp = inl(emu->port + A_IOCFG) & ~0x8; /* Clear bit 3 */ in snd_emu10k1_init()
233 for (n = 0; n < size; n++) in snd_emu10k1_init()
236 snd_emu10k1_ptr20_write(emu, 0x60, 0, 0x10); in snd_emu10k1_init()
247 outl(0x76, emu->port + A_IOCFG); /* Windows uses 0x3f76 */ in snd_emu10k1_init()
252 snd_emu10k1_ptr20_write(emu, P17V_I2S_SRC_SEL, 0, 0x2020205f); in snd_emu10k1_init()
254 outl(tmp | 0x4, emu->port + A_IOCFG); /* Set bit 2 for mic input */ in snd_emu10k1_init()
257 for (n = 0; n < size; n++) in snd_emu10k1_init()
258 snd_emu10k1_i2c_write(emu, i2c_adc_init[n][0], i2c_adc_init[n][1]); in snd_emu10k1_init()
259 for (n = 0; n < 4; n++) { in snd_emu10k1_init()
260 emu->i2c_capture_volume[n][0] = 0xcf; in snd_emu10k1_init()
261 emu->i2c_capture_volume[n][1] = 0xcf; in snd_emu10k1_init()
266 snd_emu10k1_ptr_write(emu, PTB, 0, emu->ptb_pages.addr); in snd_emu10k1_init()
267 snd_emu10k1_ptr_write(emu, TCB, 0, 0); /* taken from original driver */ in snd_emu10k1_init()
268 snd_emu10k1_ptr_write(emu, TCBS, 0, 4); /* taken from original driver */ in snd_emu10k1_init()
271 for (ch = 0; ch < NUM_G; ch++) { in snd_emu10k1_init()
282 * Mute Disable Audio = 0 in snd_emu10k1_init()
284 * Lock Sound Memory = 0 in snd_emu10k1_init()
297 } else if (emu->model == 0x20 || in snd_emu10k1_init()
298 emu->model == 0xc400 || in snd_emu10k1_init()
299 (emu->model == 0x21 && emu->revision < 6)) in snd_emu10k1_init()
336 if (emu->address_mode == 0) { in snd_emu10k1_init()
341 return 0; in snd_emu10k1_init()
357 outl(inl(emu->port + A_IOCFG) & ~0x44, emu->port + A_IOCFG); in snd_emu10k1_audio_enable()
363 outl(inl(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG); in snd_emu10k1_audio_enable()
366 outl(inl(emu->port + A_IOCFG) | 0x0060, emu->port + A_IOCFG); in snd_emu10k1_audio_enable()
369 outl(inl(emu->port + A_IOCFG) | 0x0080, emu->port + A_IOCFG); in snd_emu10k1_audio_enable()
373 #if 0 in snd_emu10k1_audio_enable()
378 emu->tos_link = 0; in snd_emu10k1_audio_enable()
381 outl(tmp|0x800, emu->port + HCFG); in snd_emu10k1_audio_enable()
383 if (tmp != (inl(emu->port + HCFG) & ~0x800)) { in snd_emu10k1_audio_enable()
398 outl(0, emu->port + INTE); in snd_emu10k1_done()
403 for (ch = 0; ch < NUM_G; ch++) in snd_emu10k1_done()
404 snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0); in snd_emu10k1_done()
405 for (ch = 0; ch < NUM_G; ch++) { in snd_emu10k1_done()
406 snd_emu10k1_ptr_write(emu, VTFT, ch, 0); in snd_emu10k1_done()
407 snd_emu10k1_ptr_write(emu, CVCF, ch, 0); in snd_emu10k1_done()
408 snd_emu10k1_ptr_write(emu, PTRX, ch, 0); in snd_emu10k1_done()
409 snd_emu10k1_ptr_write(emu, CPF, ch, 0); in snd_emu10k1_done()
413 snd_emu10k1_ptr_write(emu, MICBS, 0, 0); in snd_emu10k1_done()
414 snd_emu10k1_ptr_write(emu, MICBA, 0, 0); in snd_emu10k1_done()
415 snd_emu10k1_ptr_write(emu, FXBS, 0, 0); in snd_emu10k1_done()
416 snd_emu10k1_ptr_write(emu, FXBA, 0, 0); in snd_emu10k1_done()
417 snd_emu10k1_ptr_write(emu, FXWC, 0, 0); in snd_emu10k1_done()
418 snd_emu10k1_ptr_write(emu, ADCBS, 0, ADCBS_BUFSIZE_NONE); in snd_emu10k1_done()
419 snd_emu10k1_ptr_write(emu, ADCBA, 0, 0); in snd_emu10k1_done()
420 snd_emu10k1_ptr_write(emu, TCBS, 0, TCBS_BUFFSIZE_16K); in snd_emu10k1_done()
421 snd_emu10k1_ptr_write(emu, TCB, 0, 0); in snd_emu10k1_done()
423 snd_emu10k1_ptr_write(emu, A_DBG, 0, A_DBG_SINGLE_STEP); in snd_emu10k1_done()
425 snd_emu10k1_ptr_write(emu, DBG, 0, EMU10K1_DBG_SINGLE_STEP); in snd_emu10k1_done()
428 snd_emu10k1_ptr_write(emu, CLIEL, 0, 0); in snd_emu10k1_done()
429 snd_emu10k1_ptr_write(emu, CLIEH, 0, 0); in snd_emu10k1_done()
430 snd_emu10k1_ptr_write(emu, SOLEL, 0, 0); in snd_emu10k1_done()
431 snd_emu10k1_ptr_write(emu, SOLEH, 0, 0); in snd_emu10k1_done()
435 snd_emu10k1_ptr_write(emu, PTB, 0, 0); in snd_emu10k1_done()
437 return 0; in snd_emu10k1_done()
454 #define EC_AC3_DATA_SELN 0x0001L
455 #define EC_EE_DATA_SEL 0x0002L
456 #define EC_EE_CNTRL_SELN 0x0004L
457 #define EC_EECLK 0x0008L
458 #define EC_EECS 0x0010L
459 #define EC_EESDO 0x0020L
460 #define EC_TRIM_CSN 0x0040L
461 #define EC_TRIM_SCLK 0x0080L
462 #define EC_TRIM_SDATA 0x0100L
463 #define EC_TRIM_MUTEN 0x0200L
464 #define EC_ADCCAL 0x0400L
465 #define EC_ADCRSTN 0x0800L
466 #define EC_DACCAL 0x1000L
467 #define EC_DACMUTEN 0x2000L
468 #define EC_LEDN 0x4000L
472 #define EC_SPDIF0_SEL_MASK (0x3L << EC_SPDIF0_SEL_SHIFT)
473 #define EC_SPDIF1_SEL_MASK (0x7L << EC_SPDIF1_SEL_SHIFT)
476 #define EC_CURRENT_PROM_VERSION 0x01 /* Self-explanatory. This should
480 #define EC_EEPROM_SIZE 0x40 /* ECARD EEPROM has 64 16-bit words */
483 #define EC_PROM_VERSION_ADDR 0x20 /* Address of the current prom version */
484 #define EC_BOARDREV0_ADDR 0x21 /* LSW of board rev */
485 #define EC_BOARDREV1_ADDR 0x22 /* MSW of board rev */
487 #define EC_LAST_PROMFILE_ADDR 0x2f
489 #define EC_SERIALNUM_ADDR 0x30 /* First word of serial number. The
494 #define EC_CHECKSUM_ADDR 0x3f /* Location at which checksum is stored */
505 #define EC_DEFAULT_ADC_GAIN 0xC4C4
506 #define EC_DEFAULT_SPDIF0_SEL 0x0
507 #define EC_DEFAULT_SPDIF1_SEL 0x4
528 for (count = 0; count < EC_NUM_CONTROL_BITS; count++) { in snd_emu10k1_ecard_write()
531 data = ((value & 0x1) ? PULSEN_BIT : 0); in snd_emu10k1_ecard_write()
592 /* Step 0: Set the codec type in the hardware control register in snd_emu10k1_ecard_init()
620 return 0; in snd_emu10k1_ecard_init()
631 special_port = emu->port + 0x38; in snd_emu10k1_cardbus_init()
633 outl(0x00d00000, special_port); in snd_emu10k1_cardbus_init()
635 outl(0x00d00001, special_port); in snd_emu10k1_cardbus_init()
637 outl(0x00d0005f, special_port); in snd_emu10k1_cardbus_init()
639 outl(0x00d0007f, special_port); in snd_emu10k1_cardbus_init()
641 outl(0x0090007f, special_port); in snd_emu10k1_cardbus_init()
644 snd_emu10k1_ptr20_write(emu, TINA2_VOLUME, 0, 0xfefefefe); /* Defaults to 0x30303030 */ in snd_emu10k1_cardbus_init()
647 return 0; in snd_emu10k1_cardbus_init()
669 outl(0x00, emu->port + A_IOCFG); /* Set PGMN low for 1uS. */ in snd_emu1010_load_firmware_entry()
672 outl(0x80, emu->port + A_IOCFG); /* Leave bit 7 set during netlist setup. */ in snd_emu1010_load_firmware_entry()
675 for (n = 0; n < fw_entry->size; n++) { in snd_emu1010_load_firmware_entry()
677 for (i = 0; i < 8; i++) { in snd_emu1010_load_firmware_entry()
678 reg = 0x80; in snd_emu1010_load_firmware_entry()
679 if (value & 0x1) in snd_emu1010_load_firmware_entry()
680 reg = reg | 0x20; in snd_emu1010_load_firmware_entry()
684 outl(reg | 0x40, emu->port + A_IOCFG); in snd_emu1010_load_firmware_entry()
689 outl(0x10, emu->port + A_IOCFG); in snd_emu1010_load_firmware_entry()
693 return 0; in snd_emu1010_load_firmware_entry()
721 return 0; in snd_emu1010_load_firmware()
754 if (err < 0) in emu1010_firmware_work()
757 snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0); in emu1010_firmware_work()
760 "emu1010: EMU_HANA+DOCK_IRQ_STATUS = 0x%x\n", tmp); in emu1010_firmware_work()
761 /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ in emu1010_firmware_work()
764 "emu1010: EMU_HANA+DOCK_ID = 0x%x\n", tmp); in emu1010_firmware_work()
765 if ((tmp & 0x1f) != 0x15) { in emu1010_firmware_work()
768 "emu1010: Loading Audio Dock Firmware file failed, reg = 0x%x\n", in emu1010_firmware_work()
838 outl(0x0005a00c, emu->port + HCFG); in snd_emu10k1_emu1010_init()
843 outl(0x0005a004, emu->port + HCFG); in snd_emu10k1_emu1010_init()
847 outl(0x0005a000, emu->port + HCFG); in snd_emu10k1_emu1010_init()
851 outl(0x0005a000, emu->port + HCFG); in snd_emu10k1_emu1010_init()
854 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0); in snd_emu10k1_emu1010_init()
856 /* ID, should read & 0x7f = 0x55. (Bit 7 is the IRQ bit) */ in snd_emu10k1_emu1010_init()
858 dev_dbg(emu->card->dev, "reg1 = 0x%x\n", reg); in snd_emu10k1_emu1010_init()
859 if ((reg & 0x3f) == 0x15) { in snd_emu10k1_emu1010_init()
863 snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0x02); in snd_emu10k1_emu1010_init()
866 dev_dbg(emu->card->dev, "reg2 = 0x%x\n", reg); in snd_emu10k1_emu1010_init()
867 if ((reg & 0x3f) == 0x15) { in snd_emu10k1_emu1010_init()
873 dev_info(emu->card->dev, "emu1010: EMU_HANA_ID = 0x%x\n", reg); in snd_emu10k1_emu1010_init()
875 err = snd_emu1010_load_firmware(emu, 0, &emu->firmware); in snd_emu10k1_emu1010_init()
876 if (err < 0) { in snd_emu10k1_emu1010_init()
881 /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ in snd_emu10k1_emu1010_init()
883 if ((reg & 0x3f) != 0x15) { in snd_emu10k1_emu1010_init()
886 "emu1010: Loading Hana Firmware file failed, reg = 0x%x\n", in snd_emu10k1_emu1010_init()
899 dev_info(emu->card->dev, "emu1010: Card options = 0x%x\n", reg); in snd_emu10k1_emu1010_init()
901 dev_info(emu->card->dev, "emu1010: Card options = 0x%x\n", reg); in snd_emu10k1_emu1010_init()
904 /* 0 : SPDIF in snd_emu10k1_emu1010_init()
909 tmp = 0; in snd_emu10k1_emu1010_init()
910 tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : 0) | in snd_emu10k1_emu1010_init()
911 (emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : 0); in snd_emu10k1_emu1010_init()
915 snd_emu1010_fpga_write(emu, EMU_HANA_ADC_PADS, 0x00); in snd_emu10k1_emu1010_init()
916 emu->emu1010.adc_pads = 0x00; in snd_emu10k1_emu1010_init()
919 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_MISC, 0x30); in snd_emu10k1_emu1010_init()
920 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, 0x12); in snd_emu10k1_emu1010_init()
923 snd_emu1010_fpga_write(emu, EMU_HANA_DAC_PADS, 0x0f); in snd_emu10k1_emu1010_init()
924 emu->emu1010.dac_pads = 0x0f; in snd_emu10k1_emu1010_init()
926 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_MISC, 0x30); in snd_emu10k1_emu1010_init()
929 snd_emu1010_fpga_write(emu, EMU_HANA_SPDIF_MODE, 0x10); in snd_emu10k1_emu1010_init()
931 snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, 0x19); in snd_emu10k1_emu1010_init()
933 snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, 0x0c); in snd_emu10k1_emu1010_init()
935 /* snd_emu1010_fpga_write(emu, 0x09, 0x0f ); */ in snd_emu10k1_emu1010_init()
937 snd_emu1010_fpga_write(emu, EMU_HANA_IRQ_ENABLE, 0x00); in snd_emu10k1_emu1010_init()
940 dev_info(emu->card->dev, "emu1010: Card options3 = 0x%x\n", reg); in snd_emu10k1_emu1010_init()
942 snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, 0x00); in snd_emu10k1_emu1010_init()
947 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, 0x12); in snd_emu10k1_emu1010_init()
949 #if 0 in snd_emu10k1_emu1010_init()
960 #if 0 in snd_emu10k1_emu1010_init()
1019 #if 0 in snd_emu10k1_emu1010_init()
1046 for (i = 0; i < 0x20; i++) { in snd_emu10k1_emu1010_init()
1048 snd_emu1010_fpga_link_dst_src_write(emu, 0x0100 + i, EMU_SRC_SILENCE); in snd_emu10k1_emu1010_init()
1050 for (i = 0; i < 4; i++) { in snd_emu10k1_emu1010_init()
1052 snd_emu1010_fpga_link_dst_src_write(emu, 0x0200 + i, EMU_SRC_SILENCE); in snd_emu10k1_emu1010_init()
1054 for (i = 0; i < 7; i++) { in snd_emu10k1_emu1010_init()
1056 snd_emu1010_fpga_link_dst_src_write(emu, 0x0300 + i, EMU_SRC_SILENCE); in snd_emu10k1_emu1010_init()
1058 for (i = 0; i < 7; i++) { in snd_emu10k1_emu1010_init()
1074 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, 0x01); /* Unmute all */ in snd_emu10k1_emu1010_init()
1082 outl(0x0000a000, emu->port + HCFG); in snd_emu10k1_emu1010_init()
1087 outl(0x0000a001, emu->port + HCFG); in snd_emu10k1_emu1010_init()
1092 snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, 0x19); /* MIDI Route */ in snd_emu10k1_emu1010_init()
1093 snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, 0x0c); /* Unknown */ in snd_emu10k1_emu1010_init()
1094 snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, 0x19); /* MIDI Route */ in snd_emu10k1_emu1010_init()
1095 snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, 0x0c); /* Unknown */ in snd_emu10k1_emu1010_init()
1097 …snd_emu1010_fpga_write(emu, EMU_HANA_SPDIF_MODE, 0x10); /* SPDIF Format spdif (or 0x11 for aes/eb… in snd_emu10k1_emu1010_init()
1099 #if 0 in snd_emu10k1_emu1010_init()
1101 EMU_DST_HAMOA_DAC_LEFT1, EMU_SRC_ALICE_EMU32B + 2); /* ALICE2 bus 0xa2 */ in snd_emu10k1_emu1010_init()
1103 EMU_DST_HAMOA_DAC_RIGHT1, EMU_SRC_ALICE_EMU32B + 3); /* ALICE2 bus 0xa3 */ in snd_emu10k1_emu1010_init()
1105 EMU_DST_HANA_SPDIF_LEFT1, EMU_SRC_ALICE_EMU32A + 2); /* ALICE2 bus 0xb2 */ in snd_emu10k1_emu1010_init()
1107 EMU_DST_HANA_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); /* ALICE2 bus 0xb3 */ in snd_emu10k1_emu1010_init()
1112 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1114 EMU_DST_DOCK_DAC1_LEFT1, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1115 emu->emu1010.output_source[0] = 17; in snd_emu10k1_emu1010_init()
1131 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1133 EMU_DST_MANA_DAC_LEFT, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1139 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1141 EMU_DST_DOCK_DAC1_LEFT1, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1142 emu->emu1010.output_source[0] = 21; in snd_emu10k1_emu1010_init()
1164 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1166 EMU_DST_DOCK_PHONES_LEFT1, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1171 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1173 EMU_DST_DOCK_SPDIF_LEFT1, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1178 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1180 EMU_DST_HANA_SPDIF_LEFT1, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1185 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1187 EMU_DST_HAMOA_DAC_LEFT1, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1192 /* ALICE2 bus 0xa0 */ in snd_emu10k1_emu1010_init()
1194 EMU_DST_HANA_ADAT, EMU_SRC_ALICE_EMU32A + 0); in snd_emu10k1_emu1010_init()
1219 /* snd_emu1010_fpga_write(emu, EMU_HANA_OPTICAL_TYPE, 0x0); */ /* Output spdif */ in snd_emu10k1_emu1010_init()
1222 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, 0x0); /* Mute all */ in snd_emu10k1_emu1010_init()
1223 snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, 0x0); /* Default fallback clock 48kHz */ in snd_emu10k1_emu1010_init()
1228 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, 0x12); /* Set LEDs on Audio Dock */ in snd_emu10k1_emu1010_init()
1229 snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, 0x1); /* Unmute all */ in snd_emu10k1_emu1010_init()
1230 /* snd_emu1010_fpga_write(emu, 0x7, 0x0); */ /* Mute all */ in snd_emu10k1_emu1010_init()
1231 /* snd_emu1010_fpga_write(emu, 0x7, 0x1); */ /* Unmute all */ in snd_emu10k1_emu1010_init()
1232 /* snd_emu1010_fpga_write(emu, 0xe, 0x12); */ /* Set LEDs on Audio Dock */ in snd_emu10k1_emu1010_init()
1234 return 0; in snd_emu10k1_emu1010_init()
1250 snd_emu10k1_fx8010_tram_setup(emu, 0); in snd_emu10k1_free()
1256 snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0); in snd_emu10k1_free()
1282 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10241102,
1294 * 0: ?
1297 * 3: 0 - Digital Out, 1 - Line in
1312 * Digital Out/Line in switch using A_IOCFG bit 3 (0x08)
1313 * 0 - Digital Out
1328 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102,
1346 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102,
1369 * 0: Not Used
1370 * 1: 0 = Mute all the 7.1 channel out. 1 = unmute.
1371 * 2: Analog input 0 = line in, 1 = mic in
1373 * 4: Digital output 0 = off, 1 = on.
1378 * All bits 1 (0x3fxx) means nothing plugged in.
1379 * 8-9: 0 = Line in/Mic, 2 = Optical in, 3 = Nothing.
1380 * A-B: 0 = Headphones, 2 = Optical out, 3 = Nothing.
1382 * E-F: Always 0
1385 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102,
1395 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x42011102,
1405 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40041102,
1414 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102,
1423 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,
1431 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40021102,
1439 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40021102,
1447 {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40051102,
1455 {.vendor = 0x1102, .device = 0x0008,
1462 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20071102,
1472 /* The 0x20061102 does have SB0350 written on it
1473 * Just like 0x20021102
1475 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20061102,
1485 /* 0x20051102 also has SB0350 written on it, treated as Audigy 2 ZS by
1487 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20051102,
1497 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102,
1507 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102,
1525 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10071102,
1535 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102,
1545 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10031102,
1555 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102,
1566 {.vendor = 0x1102, .device = 0x0004, .revision = 0x04,
1574 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00531102,
1580 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00521102,
1587 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00511102,
1593 {.vendor = 0x1102, .device = 0x0004,
1599 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x100a1102,
1605 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x806b1102,
1611 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x806a1102,
1617 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80691102,
1626 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80661102,
1633 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80651102,
1639 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80641102,
1646 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102,
1654 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102,
1660 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80401102,
1665 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80321102,
1671 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80311102,
1677 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80281102,
1684 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80271102,
1690 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80261102,
1696 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80231102,
1702 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80221102,
1708 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x40011102,
1713 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x00211102,
1719 {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x00201102,
1725 {.vendor = 0x1102, .device = 0x0002,
1781 if (err < 0) in snd_emu10k1_create()
1806 "vendor = 0x%x, device = 0x%x, subsystem_vendor_id = 0x%x, subsystem_id = 0x%x\n", in snd_emu10k1_create()
1825 if (c->vendor == 0) { in snd_emu10k1_create()
1834 "vendor = 0x%x, device = 0x%x, subsystem = 0x%x. " in snd_emu10k1_create()
1835 "Forced to subsystem = 0x%x\n", c->name, in snd_emu10k1_create()
1839 "vendor = 0x%x, device = 0x%x, subsystem = 0x%x.\n", in snd_emu10k1_create()
1851 emu->address_mode = is_audigy ? 0 : 1; in snd_emu10k1_create()
1854 if (dma_set_mask_and_coherent(&pci->dev, emu->dma_mask) < 0) { in snd_emu10k1_create()
1856 "architecture does not support PCI busmaster DMA with mask 0x%lx\n", in snd_emu10k1_create()
1866 if (err < 0) in snd_emu10k1_create()
1868 emu->port = pci_resource_start(pci, 0); in snd_emu10k1_create()
1875 &emu->ptb_pages) < 0) in snd_emu10k1_create()
1889 &emu->silent_page) < 0) in snd_emu10k1_create()
1904 emu->fx8010.fxbus_mask = 0x303f; in snd_emu10k1_create()
1905 if (extin_mask == 0) in snd_emu10k1_create()
1906 extin_mask = 0x3fcf; in snd_emu10k1_create()
1907 if (extout_mask == 0) in snd_emu10k1_create()
1908 extout_mask = 0x7fff; in snd_emu10k1_create()
1915 if (err < 0) in snd_emu10k1_create()
1920 if (err < 0) in snd_emu10k1_create()
1924 if (err < 0) in snd_emu10k1_create()
1929 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, in snd_emu10k1_create()
1936 emu->fx8010.etram_pages.bytes = 0; in snd_emu10k1_create()
1946 * Init to 0x02109204 : in snd_emu10k1_create()
1947 * Clock accuracy = 0 (1000ppm) in snd_emu10k1_create()
1950 * Source Number = 0 (Unspecified) in snd_emu10k1_create()
1953 * Mode = 0 (Mode 0) in snd_emu10k1_create()
1954 * Emphasis = 0 (None) in snd_emu10k1_create()
1956 * AN = 0 (Audio data) in snd_emu10k1_create()
1957 * P = 0 (Consumer) in snd_emu10k1_create()
1959 emu->spdif_bits[0] = emu->spdif_bits[1] = in snd_emu10k1_create()
1962 SPCS_GENERATIONSTATUS | 0x00001200 | in snd_emu10k1_create()
1963 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT; in snd_emu10k1_create()
1966 memset(emu->silent_page.area, 0, emu->silent_page.bytes); in snd_emu10k1_create()
1969 for (idx = 0; idx < (emu->address_mode ? MAXPAGES1 : MAXPAGES0); idx++) in snd_emu10k1_create()
1973 for (idx = 0; idx < NUM_G; idx++) { in snd_emu10k1_create()
1978 err = snd_emu10k1_init(emu, enable_ir, 0); in snd_emu10k1_create()
1979 if (err < 0) in snd_emu10k1_create()
1983 if (err < 0) in snd_emu10k1_create()
1989 if (err < 0) in snd_emu10k1_create()
1996 return 0; in snd_emu10k1_create()
2007 0xff /* end */
2012 0xff /* end */
2025 if (snd_emu10k1_efx_alloc_pm_buffer(emu) < 0) in alloc_pm_buffer()
2028 snd_p16v_alloc_pm_buffer(emu) < 0) in alloc_pm_buffer()
2030 return 0; in alloc_pm_buffer()
2048 for (reg = saved_regs; *reg != 0xff; reg++) in snd_emu10k1_suspend_regs()
2049 for (i = 0; i < NUM_G; i++, val++) in snd_emu10k1_suspend_regs()
2052 for (reg = saved_regs_audigy; *reg != 0xff; reg++) in snd_emu10k1_suspend_regs()
2053 for (i = 0; i < NUM_G; i++, val++) in snd_emu10k1_suspend_regs()
2070 snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE); in snd_emu10k1_resume_init()
2088 for (reg = saved_regs; *reg != 0xff; reg++) in snd_emu10k1_resume_regs()
2089 for (i = 0; i < NUM_G; i++, val++) in snd_emu10k1_resume_regs()
2092 for (reg = saved_regs_audigy; *reg != 0xff; reg++) in snd_emu10k1_resume_regs()
2093 for (i = 0; i < NUM_G; i++, val++) in snd_emu10k1_resume_regs()