Lines Matching +full:adc +full:- +full:sample +full:- +full:hold +full:- +full:time
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
16 #include <sound/pcm-indirect.h>
25 /* ------------------- DEFINES -------------------- */
37 /* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */
55 #define PTR_CHANNELNUM_MASK 0x0000003f /* For each per-channel register, indicates the */
57 /* accessed. For non per-channel registers the */
79 #define IPR_SAMPLERATETRACKER 0x01000000 /* Sample rate tracker lock status change */
88 #define IPR_ADCBUFFULL 0x00008000 /* ADC buffer full */
89 #define IPR_ADCBUFHALFFULL 0x00004000 /* ADC buffer half full */
93 #define IPR_CDROMSTATUSCHANGE 0x00000400 /* CD-ROM channel status change */
106 #define INTE_VIRTUALSB_220 0x00000000 /* Capture at I/O base address 0x220-0x22f */
111 #define INTE_VIRTUALMPU_300 0x00000000 /* Capture at I/O base address 0x300-0x301 */
115 #define INTE_MASTERDMAENABLE 0x08000000 /* Master DMA emulation at 0x000-0x00f */
116 #define INTE_SLAVEDMAENABLE 0x04000000 /* Slave DMA emulation at 0x0c0-0x0df */
117 #define INTE_MASTERPICENABLE 0x02000000 /* Master PIC emulation at 0x020-0x021 */
118 #define INTE_SLAVEPICENABLE 0x01000000 /* Slave PIC emulation at 0x0a0-0x0a1 */
120 #define INTE_ADLIBENABLE 0x00400000 /* Enable AdLib emulation at 0x388-0x38b */
131 #define INTE_A_MIDITXENABLE2 0x00020000 /* Enable MIDI transmit-buffer-empty interrupts */
132 #define INTE_A_MIDIRXENABLE2 0x00010000 /* Enable MIDI receive-buffer-empty interrupts */
135 #define INTE_SAMPLERATETRACKER 0x00002000 /* Enable sample rate tracker interrupts */
143 #define INTE_ADCBUFENABLE 0x00000040 /* Enable ADC buffer interrupts */
148 #define INTE_MIDITXENABLE 0x00000002 /* Enable MIDI transmit-buffer-empty interrupts */
149 #define INTE_MIDIRXENABLE 0x00000001 /* Enable MIDI receive-buffer-empty interrupts */
152 #define WC_SAMPLECOUNTER_MASK 0x03FFFFC0 /* Sample periods elapsed since reset */
155 /* NOTE: Each channel takes 1/64th of a sample */
183 #define HCFG_CODECFORMAT_AC97_1 0x00000000 /* AC97 CODEC format -- Ver 1.03 */
184 #define HCFG_CODECFORMAT_AC97_2 0x00010000 /* AC97 CODEC format -- Ver 2.1 */
185 #define HCFG_AUTOMUTE_ASYNC 0x00008000 /* When set, the async sample rate convertors */
187 /* they are not rate-locked to the external */
189 #define HCFG_AUTOMUTE_SPDIF 0x00004000 /* When set, the async sample rate convertors */
191 /* the SPDIF V-bit indicates invalid audio */
193 #define HCFG_SLOW_RAMP 0x00001000 /* Increases Send Smoothing time constant */
198 #define HCFG_I2S_ASRC_ENABLE 0x00000070 /* When set, enables asynchronous sample rate */
206 #define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */
207 #define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */
217 /* the same async sample rate tracker (ZVIDEO) */
218 #define HCFG_AC3ENABLE_MASK 0x000000e0 /* AC3 async input control - Not implemented */
222 #define HCFG_AUTOMUTE 0x00000010 /* When set, the async sample rate convertors */
224 /* they are not rate-locked to the external */
237 #define HCFG_AUDIOENABLE 0x00000001 /* 0 = CODECs transmit zero-valued samples */
241 //For Audigy, MPU port move to 0x70-0x74 ptr register
264 #define A_IOCFG_DISABLE_AC97_FRONT 0x0080 /* turn off ac97 front -> front (10k2.1) */
282 /* of 1024 sample periods should be allowed */
284 #define TIMER_RATE_MASK 0x000003ff /* Timer interrupt rate in sample periods */
291 #define AC97ADDRESS_READY 0x80 /* Read-only bit, reflects CODEC READY signal */
317 /* 0x00000000 2-channel output. */
318 /* 0x00000200 8-channel output. */
325 * bit 8: Record 8-channel in phase.
326 * bit 9: Playback 8-channel in phase.
327 * bit 11-12: Playback mixer attenuation: 0=0dB, 1=-6dB, 2=-12dB, 3=Mute.
354 /* Emu10k1 pointer-offset register set, accessed through the PTR and DATA registers */
420 #define CCCA_8BITSELECT 0x01000000 /* 1 = Sound memory for this channel uses 8-bit samples */
434 #define CCR_LOOPFLAG 0x00000100 /* Set for a single sample period when a loop occurs */
464 /* 0x8000-n == 666*n usec delay */
466 #define ATKHLDV 0x11 /* Volume envelope hold and attack register */
468 #define ATKHLDV_HOLDTIME_MASK 0x00007f00 /* Envelope hold time (127-n == n*88.2msec) */
469 #define ATKHLDV_ATTACKTIME_MASK 0x0000007f /* Envelope attack time, log encoded */
478 #define DCYSUSV_DECAYTIME_MASK 0x0000007f /* Volume envelope decay time, log encoded */
483 /* 0x8000-n == 666*n usec delay */
487 /* 0x8000-n == 666*n usec delay */
489 #define ATKHLDM 0x15 /* Modulation envelope hold and attack register */
491 #define ATKHLDM_HOLDTIME 0x00007f00 /* Envelope hold time (127-n == n*42msec) */
492 #define ATKHLDM_ATTACKTIME 0x0000007f /* Envelope attack time, log encoded */
498 #define DCYSUSM_DECAYTIME_MASK 0x0000007f /* Envelope decay time, log encoded */
503 /* 0x8000-n == 666*n usec delay */
521 /* Signed 2's complement, +/- one octave peak extremes */
524 /* Signed 2's complement, +/- six octaves peak extremes */
528 /* Signed 2's complement, +/- one octave extremes */
530 /* Signed 2's complement, +/- three octave extremes */
535 /* Signed 2's complement, with +/- 12dB extremes */
541 /* Signed 2's complement, +/- one octave extremes */
546 #define TEMPENV_MASK 0x0000ffff /* 16-bit value */
569 /* 0x30-3f seem to be the same as 0x20-2f */
577 #define ADCCR 0x42 /* ADC sample rate/stereo control register */
585 #define A_ADCCR_SAMPLERATE_MASK 0x0000000F /* Audigy sample rate convertor output rate */
586 #define ADCCR_SAMPLERATE_MASK 0x00000007 /* Sample rate convertor output rate */
587 #define ADCCR_SAMPLERATE_48 0x00000000 /* 48kHz sample rate */
588 #define ADCCR_SAMPLERATE_44 0x00000001 /* 44.1kHz sample rate */
589 #define ADCCR_SAMPLERATE_32 0x00000002 /* 32kHz sample rate */
590 #define ADCCR_SAMPLERATE_24 0x00000003 /* 24kHz sample rate */
591 #define ADCCR_SAMPLERATE_22 0x00000004 /* 22.05kHz sample rate */
592 #define ADCCR_SAMPLERATE_16 0x00000005 /* 16kHz sample rate */
593 #define ADCCR_SAMPLERATE_11 0x00000006 /* 11.025kHz sample rate */
594 #define ADCCR_SAMPLERATE_8 0x00000007 /* 8kHz sample rate */
595 #define A_ADCCR_SAMPLERATE_12 0x00000006 /* 12kHz sample rate */
596 #define A_ADCCR_SAMPLERATE_11 0x00000007 /* 11.025kHz sample rate */
597 #define A_ADCCR_SAMPLERATE_8 0x00000008 /* 8kHz sample rate */
602 /* 0x20-0x3f) to host memory. This mode of recording */
636 #define ADCBA 0x46 /* ADC buffer address register */
642 #define A_HWM 0x48 /* High PCI Water Mark - word access, defaults to 3f */
646 #define ADCBS 0x4a /* ADC buffer size register */
650 /* register: 0x4c..4f: ffff-ffff current amounts, per-channel */
652 /* The following mask values define the size of the ADC, MIX and FX buffers in bytes */
699 #define CDCS 0x50 /* CD-ROM digital channel status register */
717 // NOTE: 0x54,55,56: 64-bit
728 #define SPCS_SAMPLERATEMASK 0x0f000000 /* Sample rate */
729 #define SPCS_SAMPLERATE_44 0x00000000 /* 44.1kHz sample rate */
730 #define SPCS_SAMPLERATE_48 0x02000000 /* 48kHz sample rate */
731 #define SPCS_SAMPLERATE_32 0x03000000 /* 32kHz sample rate */
738 #define SPCS_GENERATIONSTATUS 0x00008000 /* Originality flag (see IEC-958 spec) */
739 #define SPCS_CATEGORYCODEMASK 0x00007f00 /* Category code (see IEC-958 spec) */
740 #define SPCS_MODEMASK 0x000000c0 /* Mode (see IEC-958 spec) */
744 #define SPCS_COPYRIGHT 0x00000004 /* Copyright asserted flag -- do not modify */
746 #define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */
750 /* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */
766 /* bypass mode: 0 - DSP; 1 - SPDIF A, 2 - SPDIF B, 3 - SPDIF C */
767 #define SPBYPASS_FORMAT 0x00000f00 /* If 1, SPDIF XX uses 24 bit, if 0 - 20 bit */
778 // NOTE: 0x60,61,62: 64-bit
779 #define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */
781 #define GPSRCS 0x61 /* General Purpose SPDIF sample rate cvt status */
783 #define ZVSRCS 0x62 /* ZVideo sample rate converter status */
785 /* Assumes sample lock */
790 #define SRCS_RATELOCKED 0x01000000 /* Sample rate locked */
793 /* Note that these values can vary +/- by a small amount */
799 #define MICIDX_MASK 0x0000ffff /* 16-bit value */
802 #define ADCIDX 0x64 /* ADC recording buffer index register */
813 #define FXIDX_MASK 0x0000ffff /* 16-bit value */
816 /* The 32-bit HLIx and HLIPx registers all have one bit per channel control/status */
851 #define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */
852 #define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */
855 #define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */
856 #define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */
866 #define A_I2S_CAPTURE_48000 0x00000000 /* unclear if this sets the ADC rate as well. */
877 /* I2S0 Sample Rate Tracker Status */
880 /* I2S1 Sample Rate Tracker Status */
883 /* I2S2 Sample Rate Tracker Status */
885 /* - default to 0x01080000 on my audigy 2 ZS --rlrevell */
917 #define A_TANKMEMCTLREGBASE 0x100 /* Tank memory control registers base - only for Audigy */
918 #define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */
1039 #define EMU_HANA_ADC_PADS 0x10 /* 0000xxx 3 bit Audio Dock ADC 14dB pads */
1040 #define EMU_HANA_DOCK_ADC_PAD1 0x01 /* 14dB Attenuation on Audio Dock ADC 1 */
1041 #define EMU_HANA_DOCK_ADC_PAD2 0x02 /* 14dB Attenuation on Audio Dock ADC 2 */
1042 #define EMU_HANA_DOCK_ADC_PAD3 0x04 /* 14dB Attenuation on Audio Dock ADC 3 */
1043 #define EMU_HANA_0202_ADC_PAD1 0x08 /* 14dB Attenuation on 0202 ADC 1 */
1069 /* 0x14 - 0x1f Unused R/W registers */
1107 /* 0x30 - 0x3f Unused Read only registers */
1114 * 0x00, 0x00-0x0f: 16 EMU32 channels to Alice2
1115 * 0x01, 0x10-0x1f: 32 Elink channels to Audio Dock
1132 * 0x04, 0x00-0x07: Hana ADAT
1145 * 0x00, 0x00-0x0f: 16 EMU32A channels to Tina
1146 * 0x01, 0x10-0x1f: 32 EDI channels to Micro Dock
1155 * 0x01, 0x18-0x1f: Dock ADAT 0-7
1160 * 0x04, 0x00-0x07: Hana3 ADAT 0-7
1161 * 0x05, 0x00-0x0f: 16 EMU32B channels to Tina
1162 * 0x06-0x07: Not used
1166 * 0x00, 0x00-0x0f: 16 EMU32 channels to Alice2
1172 * 0x04-0x07: Not used
1176 * 0x00, 0x00-0x0f: 16 EMU32 channels to Alice2
1182 * 0x04-0x07: Not used
1186 * 0x00, 0x00-0x0f: 16 EMU32A channels to Tina2
1187 * 0x01, 0x10-0x1f: 32 EDI channels to Micro Dock
1196 * 0x01, 0x18-0x1f: Dock ADAT 0-7
1200 * 0x04, 0x00-0x0f: 16 EMU32B channels to Tina2
1201 * 0x05-0x07: Not used
1205 /* 32-bit destinations of signal in the Hana FPGA. Destinations are either
1207 * - 16 x EMU_DST_ALICE2_EMU32_X.
1209 /* EMU32 = 32-bit serial channel between Alice2 (audigy) and Hana (FPGA) */
1210 /* EMU_DST_ALICE2_EMU32_X - data channels from Hana to Alice2 used for capture.
1212 * setup of mixer control for each destination - see emumixer.c -
1313 * 0x00,0x00-0x1f: Silence
1314 * 0x01, 0x10-0x1f: 32 Elink channels from Audio Dock
1317 * 0x01, 0x08: Dock ADC 1 Left
1318 * 0x01, 0x0c: Dock ADC 1 Right
1319 * 0x01, 0x10: Dock ADC 2 Left
1320 * 0x01, 0x14: Dock ADC 2 Right
1321 * 0x01, 0x18: Dock ADC 3 Left
1322 * 0x01, 0x1c: Dock ADC 3 Right
1323 * 0x02, 0x00: Hana ADC Left
1324 * 0x02, 0x01: Hana ADC Right
1325 * 0x03, 0x00-0x0f: 16 inputs from Alice2 Emu32A output
1326 * 0x03, 0x10-0x1f: 16 inputs from Alice2 Emu32B output
1327 * 0x04, 0x00-0x07: Hana ADAT
1330 * 0x06-0x07: Not used
1337 * 0x00,0x00-0x1f: Silence
1338 * 0x01, 0x10-0x1f: 32 Elink channels from Audio Dock
1341 * 0x01, 0x08: Dock ADC 1 Left
1342 * 0x01, 0x0c: Dock ADC 1 Right
1343 * 0x01, 0x10: Dock ADC 2 Left
1345 * 0x01, 0x14: Dock ADC 2 Right
1347 * 0x01, 0x18-0x1f: Dock ADAT 0-7
1348 * 0x01, 0x18: Dock ADC 3 Left
1349 * 0x01, 0x1c: Dock ADC 3 Right
1350 * 0x02, 0x00: Hanoa ADC Left
1351 * 0x02, 0x01: Hanoa ADC Right
1352 * 0x03, 0x00-0x0f: 16 inputs from Tina Emu32A output
1353 * 0x03, 0x10-0x1f: 16 inputs from Tina Emu32B output
1354 * 0x04, 0x00-0x07: Hana3 ADAT
1357 * 0x06-0x07: Not used
1361 * 0x00,0x00-0x1f: Silence
1363 * 0x02, 0x00: ADC Left
1364 * 0x02, 0x01: ADC Right
1365 * 0x03, 0x00-0x0f: 16 inputs from Alice2 Emu32A output
1366 * 0x03, 0x10-0x1f: 16 inputs from Alice2 Emu32B output
1370 * 0x06-0x07: Not used
1374 * 0x00,0x00-0x1f: Silence
1376 * 0x02, 0x00: ADC Left
1377 * 0x02, 0x01: ADC Right
1378 * 0x03, 0x00-0x0f: 16 inputs from Alice2 Emu32A output
1379 * 0x03, 0x10-0x1f: 16 inputs from Alice2 Emu32B output
1383 * 0x06-0x07: Not used
1387 * 0x00,0x00-0x1f: Silence
1388 * 0x01, 0x10-0x1f: 32 Elink channels from Audio Dock
1391 * 0x01, 0x08: Dock ADC 1 Left
1392 * 0x01, 0x0c: Dock ADC 1 Right
1393 * 0x01, 0x10: Dock ADC 2 Left
1395 * 0x01, 0x14: Dock ADC 2 Right
1397 * 0x01, 0x18-0x1f: Dock ADAT 0-7
1398 * 0x01, 0x18: Dock ADC 3 Left
1399 * 0x01, 0x1c: Dock ADC 3 Right
1401 * 0x03, 0x00-0x0f: 16 inputs from Tina Emu32A output
1402 * 0x03, 0x10-0x1f: 16 inputs from Tina Emu32B output
1403 * 0x04-0x07: Not used
1407 /* 32-bit sources of signal in the Hana FPGA. The sources are routed to
1408 * destinations using mixer control for each destination - see emumixer.c
1410 * or outputs from Alice (audigy) - 16 x EMU_SRC_ALICE_EMU32A +
1446 #define EMU_SRC_HAMOA_ADC_LEFT1 0x0200 /* Hamoa ADC Left, 1st or 48kHz only */
1447 #define EMU_SRC_HAMOA_ADC_LEFT2 0x0202 /* Hamoa ADC Left, 2nd or 96kHz */
1448 #define EMU_SRC_HAMOA_ADC_LEFT3 0x0204 /* Hamoa ADC Left, 3rd or 192kHz */
1449 #define EMU_SRC_HAMOA_ADC_LEFT4 0x0206 /* Hamoa ADC Left, 4th or 192kHz */
1450 #define EMU_SRC_HAMOA_ADC_RIGHT1 0x0201 /* Hamoa ADC Right, 1st or 48kHz only */
1451 #define EMU_SRC_HAMOA_ADC_RIGHT2 0x0203 /* Hamoa ADC Right, 2nd or 96kHz */
1452 #define EMU_SRC_HAMOA_ADC_RIGHT3 0x0205 /* Hamoa ADC Right, 3rd or 192kHz */
1453 #define EMU_SRC_HAMOA_ADC_RIGHT4 0x0207 /* Hamoa ADC Right, 4th or 192kHz */
1476 /* ------------------- STRUCTURES -------------------- */
1556 …efine snd_emu10k1_memblk_offset(blk) (((blk)->mapped_page << PAGE_SHIFT) | ((blk)->mem.offset & (P…
1585 unsigned int channels; /* 16-bit channels count */
1654 unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */
1660 unsigned char i2c_adc; /* I2C interface for ADC */
1661 unsigned char adc_1361t; /* Use Philips 1361T ADC */
1665 const char *id; /* for backward compatibility - can be NULL if not needed */
1842 static inline unsigned int snd_emu10k1_wc(struct snd_emu10k1 *emu) { return (inl(emu->port + WC) >>… in snd_emu10k1_wc()