Lines Matching full:apu

35  *	We only drive the APU/Wavecache as typical DACs and drive the
40 * Each APU can do a number of things, but we only really use
43 * is handed to the codec. One APU for mono, and a pair for stereo.
44 * When in stereo, the combination of smarts in the APU and Wavecache
49 * APU, through another rate converter APU, and then into memory via
72 * like the APU interface that is indirect registers gotten at through
296 /* APU Modes: reg 0x00, bit 4-7 */
319 /* APU Filtey Q Control */
397 /* APU Filter Control */
405 /* APU ATFP Type */
411 /* APU ATFP Flags */
426 /* APU use in the driver */
450 u8 apu[4]; member
520 /* APU states */
521 unsigned char apu[NR_APUS]; member
668 dev_dbg(chip->card->dev, "APU register select failed. (Timeout)\n"); in apu_index_set()
680 dev_dbg(chip->card->dev, "APU register set probably failed (Timeout)!\n"); in apu_data_set()
901 offset = apu_get_register(chip, es->apu[0], 5); in snd_es1968_get_dma_ptr()
908 static void snd_es1968_apu_set_freq(struct es1968 *chip, int apu, int freq) in snd_es1968_apu_set_freq() argument
910 apu_set_register(chip, apu, 2, in snd_es1968_apu_set_freq()
911 (apu_get_register(chip, apu, 2) & 0x00FF) | in snd_es1968_apu_set_freq()
913 apu_set_register(chip, apu, 3, freq >> 8); in snd_es1968_apu_set_freq()
917 static inline void snd_es1968_trigger_apu(struct es1968 *esm, int apu, int mode) in snd_es1968_trigger_apu() argument
919 /* set the APU mode */ in snd_es1968_trigger_apu()
920 __apu_set_register(esm, apu, 0, in snd_es1968_trigger_apu()
921 (__apu_get_register(esm, apu, 0) & 0xff0f) | in snd_es1968_trigger_apu()
928 __apu_set_register(chip, es->apu[0], 5, es->base[0]); in snd_es1968_pcm_start()
929 snd_es1968_trigger_apu(chip, es->apu[0], es->apu_mode[0]); in snd_es1968_pcm_start()
931 __apu_set_register(chip, es->apu[2], 5, es->base[2]); in snd_es1968_pcm_start()
932 snd_es1968_trigger_apu(chip, es->apu[2], es->apu_mode[2]); in snd_es1968_pcm_start()
935 __apu_set_register(chip, es->apu[1], 5, es->base[1]); in snd_es1968_pcm_start()
936 snd_es1968_trigger_apu(chip, es->apu[1], es->apu_mode[1]); in snd_es1968_pcm_start()
938 __apu_set_register(chip, es->apu[3], 5, es->base[3]); in snd_es1968_pcm_start()
939 snd_es1968_trigger_apu(chip, es->apu[3], es->apu_mode[3]); in snd_es1968_pcm_start()
948 snd_es1968_trigger_apu(chip, es->apu[0], 0); in snd_es1968_pcm_stop()
949 snd_es1968_trigger_apu(chip, es->apu[1], 0); in snd_es1968_pcm_stop()
951 snd_es1968_trigger_apu(chip, es->apu[2], 0); in snd_es1968_pcm_stop()
952 snd_es1968_trigger_apu(chip, es->apu[3], 0); in snd_es1968_pcm_stop()
971 wave_set_register(chip, es->apu[channel] << 3, tmpval); in snd_es1968_program_wavecache()
982 int channel, apu; in snd_es1968_playback_setup() local
993 apu = es->apu[channel]; in snd_es1968_playback_setup()
1017 apu_set_register(chip, apu, i, 0x0000); in snd_es1968_playback_setup()
1020 apu_set_register(chip, apu, 4, ((pa >> 16) & 0xFF) << 8); in snd_es1968_playback_setup()
1021 apu_set_register(chip, apu, 5, pa & 0xFFFF); in snd_es1968_playback_setup()
1022 apu_set_register(chip, apu, 6, (pa + size) & 0xFFFF); in snd_es1968_playback_setup()
1024 apu_set_register(chip, apu, 7, size); in snd_es1968_playback_setup()
1027 apu_set_register(chip, apu, 8, 0x0000); in snd_es1968_playback_setup()
1029 apu_set_register(chip, apu, 9, 0xD000); in snd_es1968_playback_setup()
1032 apu_set_register(chip, apu, 11, 0x0000); in snd_es1968_playback_setup()
1034 apu_set_register(chip, apu, 0, 0x400F); in snd_es1968_playback_setup()
1046 and not the APU Regs 4-5. */ in snd_es1968_playback_setup()
1047 apu_set_register(chip, apu, 10, in snd_es1968_playback_setup()
1051 apu_set_register(chip, apu, 10, 0x8F08); in snd_es1968_playback_setup()
1075 snd_es1968_apu_set_freq(chip, es->apu[0], freq); in snd_es1968_playback_setup()
1076 snd_es1968_apu_set_freq(chip, es->apu[1], freq); in snd_es1968_playback_setup()
1084 int i, apu = es->apu[channel]; in init_capture_apu() local
1100 /* Begin loading the APU */ in init_capture_apu()
1102 apu_set_register(chip, apu, i, 0x0000); in init_capture_apu()
1106 apu_set_register(chip, apu, 2, 0x8); in init_capture_apu()
1109 apu_set_register(chip, apu, 4, ((pa >> 16) & 0xFF) << 8); in init_capture_apu()
1110 apu_set_register(chip, apu, 5, pa & 0xFFFF); in init_capture_apu()
1111 apu_set_register(chip, apu, 6, (pa + bsize) & 0xFFFF); in init_capture_apu()
1112 apu_set_register(chip, apu, 7, bsize); in init_capture_apu()
1114 apu_set_register(chip, apu, 8, 0x00F0); in init_capture_apu()
1116 apu_set_register(chip, apu, 9, 0x0000); in init_capture_apu()
1118 apu_set_register(chip, apu, 10, 0x8F08); in init_capture_apu()
1120 apu_set_register(chip, apu, 11, route); in init_capture_apu()
1122 apu_set_register(chip, apu, 0, 0x400F); in init_capture_apu()
1134 /* APU assignments: in snd_es1968_capture_setup()
1140 /* data seems to flow from the codec, through an apu into in snd_es1968_capture_setup()
1141 the 'mixbuf' bit of page, then through the SRC apu in snd_es1968_capture_setup()
1149 /* SRC (left/mono); get input from inputing apu */ in snd_es1968_capture_setup()
1151 ESM_APU_SRCONVERTOR, es->apu[2]); in snd_es1968_capture_setup()
1161 ESM_APU_SRCONVERTOR, es->apu[3]); in snd_es1968_capture_setup()
1174 snd_es1968_apu_set_freq(chip, es->apu[0], freq); in snd_es1968_capture_setup()
1175 snd_es1968_apu_set_freq(chip, es->apu[1], freq); in snd_es1968_capture_setup()
1179 snd_es1968_apu_set_freq(chip, es->apu[2], freq); in snd_es1968_capture_setup()
1180 snd_es1968_apu_set_freq(chip, es->apu[3], freq); in snd_es1968_capture_setup()
1492 * allocate APU pair
1496 int apu; in snd_es1968_alloc_apu_pair() local
1498 for (apu = 0; apu < NR_APUS; apu += 2) { in snd_es1968_alloc_apu_pair()
1499 if (chip->apu[apu] == ESM_APU_FREE && in snd_es1968_alloc_apu_pair()
1500 chip->apu[apu + 1] == ESM_APU_FREE) { in snd_es1968_alloc_apu_pair()
1501 chip->apu[apu] = chip->apu[apu + 1] = type; in snd_es1968_alloc_apu_pair()
1502 return apu; in snd_es1968_alloc_apu_pair()
1509 * release APU pair
1511 static void snd_es1968_free_apu_pair(struct es1968 *chip, int apu) in snd_es1968_free_apu_pair() argument
1513 chip->apu[apu] = chip->apu[apu + 1] = ESM_APU_FREE; in snd_es1968_free_apu_pair()
1539 es->apu[0] = apu1; in snd_es1968_playback_open()
1540 es->apu[1] = apu1 + 1; in snd_es1968_playback_open()
1582 es->apu[0] = apu1; in snd_es1968_capture_open()
1583 es->apu[1] = apu1 + 1; in snd_es1968_capture_open()
1584 es->apu[2] = apu2; in snd_es1968_capture_open()
1585 es->apu[3] = apu2 + 1; in snd_es1968_capture_open()
1628 snd_es1968_free_apu_pair(chip, es->apu[0]); in snd_es1968_playback_close()
1646 snd_es1968_free_apu_pair(chip, es->apu[0]); in snd_es1968_capture_close()
1647 snd_es1968_free_apu_pair(chip, es->apu[2]); in snd_es1968_capture_close()
1681 int i, apu; in es1968_measure_clock() local
1690 /* search 2 APUs (although one apu is enough) */ in es1968_measure_clock()
1691 apu = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_PLAY); in es1968_measure_clock()
1692 if (apu < 0) { in es1968_measure_clock()
1693 dev_err(chip->card->dev, "Hmm, cannot find empty APU pair!?\n"); in es1968_measure_clock()
1701 snd_es1968_free_apu_pair(chip, apu); in es1968_measure_clock()
1707 wave_set_register(chip, apu << 3, (memory->buf.addr - 0x10) & 0xfff8); in es1968_measure_clock()
1712 /* initialize apu */ in es1968_measure_clock()
1714 apu_set_register(chip, apu, i, 0x0000); in es1968_measure_clock()
1716 apu_set_register(chip, apu, 0, 0x400f); in es1968_measure_clock()
1717 apu_set_register(chip, apu, 4, ((pa >> 16) & 0xff) << 8); in es1968_measure_clock()
1718 apu_set_register(chip, apu, 5, pa & 0xffff); in es1968_measure_clock()
1719 apu_set_register(chip, apu, 6, (pa + CLOCK_MEASURE_BUFSIZE/2) & 0xffff); in es1968_measure_clock()
1720 apu_set_register(chip, apu, 7, CLOCK_MEASURE_BUFSIZE/2); in es1968_measure_clock()
1721 apu_set_register(chip, apu, 8, 0x0000); in es1968_measure_clock()
1722 apu_set_register(chip, apu, 9, 0xD000); in es1968_measure_clock()
1723 apu_set_register(chip, apu, 10, 0x8F08); in es1968_measure_clock()
1724 apu_set_register(chip, apu, 11, 0x0000); in es1968_measure_clock()
1730 snd_es1968_apu_set_freq(chip, apu, ((unsigned int)48000 << 16) / chip->clock); /* 48000 Hz */ in es1968_measure_clock()
1733 chip->measure_apu = apu; in es1968_measure_clock()
1736 __apu_set_register(chip, apu, 5, pa & 0xffff); in es1968_measure_clock()
1737 snd_es1968_trigger_apu(chip, apu, ESM_APU_16BITLINEAR); in es1968_measure_clock()
1742 offset = __apu_get_register(chip, apu, 5); in es1968_measure_clock()
1744 snd_es1968_trigger_apu(chip, apu, 0); /* stop */ in es1968_measure_clock()
1768 snd_es1968_free_apu_pair(chip, apu); in es1968_measure_clock()
2332 /* Now clear the APU control ram */ in snd_es1968_chip_init()
2667 /* Clear Apu Map */ in snd_es1968_create()
2669 chip->apu[i] = ESM_APU_FREE; in snd_es1968_create()