Lines Matching +full:0 +full:xa010

80 	u32 offset = 0;  in snd_cs46xx_codec_read()
84 return 0xffff; in snd_cs46xx_codec_read()
103 if ((tmp & ACCTL_VFRM) == 0) { in snd_cs46xx_codec_read()
104 dev_warn(chip->card->dev, "ACCTL_VFRM not set 0x%x\n", tmp); in snd_cs46xx_codec_read()
126 snd_cs46xx_pokeBA0(chip, BA0_ACCDA, 0); in snd_cs46xx_codec_read()
143 for (count = 0; count < 1000; count++) { in snd_cs46xx_codec_read()
157 "AC'97 read problem (ACCTL_DCV), reg = 0x%x\n", reg); in snd_cs46xx_codec_read()
158 result = 0xffff; in snd_cs46xx_codec_read()
165 for (count = 0; count < 100; count++) { in snd_cs46xx_codec_read()
177 "AC'97 read problem (ACSTS_VSTS), codec_index %d, reg = 0x%x\n", in snd_cs46xx_codec_read()
179 result = 0xffff; in snd_cs46xx_codec_read()
187 #if 0 in snd_cs46xx_codec_read()
189 "e) reg = 0x%x, val = 0x%x, BA0_ACCAD = 0x%x\n", reg, in snd_cs46xx_codec_read()
210 return 0xffff; in snd_cs46xx_ac97_read()
265 for (count = 0; count < 4000; count++) { in snd_cs46xx_codec_write()
279 "AC'97 write problem, codec_index = %d, reg = 0x%x, val = 0x%x\n", in snd_cs46xx_codec_write()
311 offset = offset & 0xffff; in snd_cs46xx_download()
319 while (len-- > 0) { in snd_cs46xx_download()
323 return 0; in snd_cs46xx_download()
334 while (len-- > 0) in memcpy_le32()
359 for (i = 0; i < module->nsegments; i++) in free_module_desc()
395 if (err < 0) in load_firmware()
411 fwlen = 0; in load_firmware()
420 for (i = 0; i < nums; i++) { in load_firmware()
440 for (i = 0; i < nums; i++) { in load_firmware()
458 return 0; in load_firmware()
474 offset = offset & 0xffff; in snd_cs46xx_clear_BA1()
482 while (len-- > 0) { in snd_cs46xx_clear_BA1()
483 writel(0, dst); in snd_cs46xx_clear_BA1()
486 return 0; in snd_cs46xx_clear_BA1()
507 if (err < 0) in load_firmware()
523 size = 0; in load_firmware()
524 for (i = 0; i < BA1_MEMORY_COUNT; i++) in load_firmware()
537 unsigned int offset = 0; in snd_cs46xx_download_image()
540 for (idx = 0; idx < BA1_MEMORY_COUNT; idx++) { in snd_cs46xx_download_image()
545 if (err < 0) in snd_cs46xx_download_image()
549 return 0; in snd_cs46xx_download_image()
574 for (idx = 0; idx < 8; idx++) { in snd_cs46xx_reset()
576 snd_cs46xx_poke(chip, BA1_TWPR, 0xFFFF); in snd_cs46xx_reset()
578 snd_cs46xx_poke(chip, BA1_DREG, 0); in snd_cs46xx_reset()
583 snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); in snd_cs46xx_reset()
588 u32 i, status = 0; in cs46xx_wait_for_fifo()
592 for(i = 0; i < 50; i++){ in cs46xx_wait_for_fifo()
607 return 0; in cs46xx_wait_for_fifo()
612 int idx, powerdown = 0; in snd_cs46xx_clear_serial_FIFOs()
630 snd_cs46xx_pokeBA0(chip, BA0_SERBWP, 0); in snd_cs46xx_clear_serial_FIFOs()
635 for (idx = 0; idx < 0xFF; idx++) { in snd_cs46xx_clear_serial_FIFOs()
673 snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); in snd_cs46xx_proc_start()
683 for (cnt = 0; cnt < 25; cnt++) { in snd_cs46xx_proc_start()
699 snd_cs46xx_poke(chip, BA1_SPCR, 0); in snd_cs46xx_proc_stop()
749 ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); in snd_cs46xx_set_play_sample_rate()
803 coeffIncr ^= 0xFFFFFFFF; in snd_cs46xx_set_capture_sample_rate()
823 ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); in snd_cs46xx_set_capture_sample_rate()
826 (((BA1_VARIDEC_BUF_1 + (initialDelay << 2)) << 16) & 0xFFFF0000) | 0x80); in snd_cs46xx_set_capture_sample_rate()
853 snd_cs46xx_poke(chip, BA1_CFG2, (0x00800000 | frameGroupLength)); in snd_cs46xx_set_capture_sample_rate()
854 snd_cs46xx_poke(chip, BA1_CCST, 0x0000FFFF); in snd_cs46xx_set_capture_sample_rate()
856 snd_cs46xx_poke(chip, (BA1_CSPB + 4), 0x0000FFFF); in snd_cs46xx_set_capture_sample_rate()
950 int result = 0; in snd_cs46xx_playback_trigger()
964 SCBVolumeCtrl) << 2, 0x80008000); in snd_cs46xx_playback_trigger()
977 tmp &= 0x0000ffff; in snd_cs46xx_playback_trigger()
988 SCBVolumeCtrl) << 2, 0xffffffff); in snd_cs46xx_playback_trigger()
996 tmp &= 0x0000ffff; in snd_cs46xx_playback_trigger()
1015 int result = 0; in snd_cs46xx_capture_trigger()
1022 tmp &= 0xffff0000; in snd_cs46xx_capture_trigger()
1028 tmp &= 0xffff0000; in snd_cs46xx_capture_trigger()
1074 return 0; in _cs46xx_adjust_sample_rate()
1147 if (err < 0) { in snd_cs46xx_playback_hw_params()
1176 return 0; in snd_cs46xx_playback_hw_params()
1196 return 0; in snd_cs46xx_playback_hw_free()
1214 pfie &= ~0x0000f03f; in snd_cs46xx_playback_prepare()
1218 pfie &= ~0x0000f03f; in snd_cs46xx_playback_prepare()
1225 pfie |= 0x00002000; in snd_cs46xx_playback_prepare()
1230 pfie |= 0x00001000; in snd_cs46xx_playback_prepare()
1234 pfie |= 0x00008000; in snd_cs46xx_playback_prepare()
1240 pfie |= 0x00004000; in snd_cs46xx_playback_prepare()
1243 memset(&cpcm->pcm_rec, 0, sizeof(cpcm->pcm_rec)); in snd_cs46xx_playback_prepare()
1250 tmp &= ~0x000003ff; in snd_cs46xx_playback_prepare()
1260 tmp &= ~0x000003ff; in snd_cs46xx_playback_prepare()
1267 return 0; in snd_cs46xx_playback_prepare()
1289 if (err < 0) in snd_cs46xx_capture_hw_params()
1294 return 0; in snd_cs46xx_capture_hw_params()
1306 return 0; in snd_cs46xx_capture_hw_free()
1316 memset(&chip->capt.pcm_rec, 0, sizeof(chip->capt.pcm_rec)); in snd_cs46xx_capture_prepare()
1321 return 0; in snd_cs46xx_capture_prepare()
1339 if ((status1 & 0x7fffffff) == 0) { in snd_cs46xx_interrupt()
1347 for (i = 0; i < DSP_MAX_PCM_CHANNELS; ++i) { in snd_cs46xx_interrupt()
1390 while ((snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_RBE) == 0) { in snd_cs46xx_interrupt()
1392 if ((chip->midcr & MIDCR_RIE) == 0) in snd_cs46xx_interrupt()
1396 while ((snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_TBF) == 0) { in snd_cs46xx_interrupt()
1397 if ((chip->midcr & MIDCR_TIE) == 0) in snd_cs46xx_interrupt()
1436 .fifo_size = 0,
1457 .fifo_size = 0,
1467 .mask = 0
1487 PAGE_SIZE, &cpcm->hw_buf) < 0) { in _cs46xx_playback_open_channel()
1503 snd_pcm_hw_constraint_list(runtime, 0, in _cs46xx_playback_open_channel()
1516 return 0; in _cs46xx_playback_open_channel()
1575 PAGE_SIZE, &chip->capt.hw_buf) < 0) in snd_cs46xx_capture_open()
1586 snd_pcm_hw_constraint_list(substream->runtime, 0, in snd_cs46xx_capture_open()
1590 return 0; in snd_cs46xx_capture_open()
1619 return 0; in snd_cs46xx_playback_close()
1630 return 0; in snd_cs46xx_capture_close()
1753 if (err < 0) in snd_cs46xx_pcm()
1762 pcm->info_flags = 0; in snd_cs46xx_pcm()
1770 return 0; in snd_cs46xx_pcm()
1780 err = snd_pcm_new(chip->card, "CS46xx - Rear", device, MAX_PLAYBACK_CHANNELS, 0, &pcm); in snd_cs46xx_pcm_rear()
1781 if (err < 0) in snd_cs46xx_pcm_rear()
1789 pcm->info_flags = 0; in snd_cs46xx_pcm_rear()
1797 return 0; in snd_cs46xx_pcm_rear()
1805 err = snd_pcm_new(chip->card, "CS46xx - Center LFE", device, MAX_PLAYBACK_CHANNELS, 0, &pcm); in snd_cs46xx_pcm_center_lfe()
1806 if (err < 0) in snd_cs46xx_pcm_center_lfe()
1814 pcm->info_flags = 0; in snd_cs46xx_pcm_center_lfe()
1822 return 0; in snd_cs46xx_pcm_center_lfe()
1830 err = snd_pcm_new(chip->card, "CS46xx - IEC958", device, 1, 0, &pcm); in snd_cs46xx_pcm_iec958()
1831 if (err < 0) in snd_cs46xx_pcm_iec958()
1839 pcm->info_flags = 0; in snd_cs46xx_pcm_iec958()
1847 return 0; in snd_cs46xx_pcm_iec958()
1875 uinfo->value.integer.min = 0; in snd_cs46xx_vol_info()
1876 uinfo->value.integer.max = 0x7fff; in snd_cs46xx_vol_info()
1877 return 0; in snd_cs46xx_vol_info()
1885 ucontrol->value.integer.value[0] = 0xffff - (val >> 16); in snd_cs46xx_vol_get()
1886 ucontrol->value.integer.value[1] = 0xffff - (val & 0xffff); in snd_cs46xx_vol_get()
1887 return 0; in snd_cs46xx_vol_get()
1894 unsigned int val = ((0xffff - ucontrol->value.integer.value[0]) << 16 | in snd_cs46xx_vol_put()
1895 (0xffff - ucontrol->value.integer.value[1])); in snd_cs46xx_vol_put()
1912 ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left; in snd_cs46xx_vol_dac_get()
1915 return 0; in snd_cs46xx_vol_dac_get()
1921 int change = 0; in snd_cs46xx_vol_dac_put()
1923 if (chip->dsp_spos_instance->dac_volume_right != ucontrol->value.integer.value[0] || in snd_cs46xx_vol_dac_put()
1926 ucontrol->value.integer.value[0], in snd_cs46xx_vol_dac_put()
1934 #if 0
1939 ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_input_volume_left;
1941 return 0;
1947 int change = 0;
1949 if (chip->dsp_spos_instance->spdif_input_volume_left != ucontrol->value.integer.value[0] ||
1952 ucontrol->value.integer.value[0],
1970 …ucontrol->value.integer.value[0] = (chip->dsp_spos_instance->spdif_status_out & DSP_SPDIF_STATUS_O… in snd_cs46xx_iec958_get()
1972 ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_status_in; in snd_cs46xx_iec958_get()
1974 return 0; in snd_cs46xx_iec958_get()
1987 if (ucontrol->value.integer.value[0] && !change) in snd_cs46xx_iec958_put()
1989 else if (change && !ucontrol->value.integer.value[0]) in snd_cs46xx_iec958_put()
1997 if (ucontrol->value.integer.value[0] && !change) { in snd_cs46xx_iec958_put()
2001 else if (change && !ucontrol->value.integer.value[0]) in snd_cs46xx_iec958_put()
2021 ucontrol->value.integer.value[0] = 1; in snd_cs46xx_adc_capture_get()
2023 ucontrol->value.integer.value[0] = 0; in snd_cs46xx_adc_capture_get()
2025 return 0; in snd_cs46xx_adc_capture_get()
2033 int change = 0; in snd_cs46xx_adc_capture_put()
2035 if (ucontrol->value.integer.value[0] && !ins->adc_input) { in snd_cs46xx_adc_capture_put()
2038 } else if (!ucontrol->value.integer.value[0] && ins->adc_input) { in snd_cs46xx_adc_capture_put()
2052 ucontrol->value.integer.value[0] = 1; in snd_cs46xx_pcm_capture_get()
2054 ucontrol->value.integer.value[0] = 0; in snd_cs46xx_pcm_capture_get()
2056 return 0; in snd_cs46xx_pcm_capture_get()
2065 int change = 0; in snd_cs46xx_pcm_capture_put()
2067 if (ucontrol->value.integer.value[0] && !ins->pcm_input) { in snd_cs46xx_pcm_capture_put()
2070 } else if (!ucontrol->value.integer.value[0] && ins->pcm_input) { in snd_cs46xx_pcm_capture_put()
2086 ucontrol->value.integer.value[0] = 1; in snd_herc_spdif_select_get()
2088 ucontrol->value.integer.value[0] = 0; in snd_herc_spdif_select_get()
2090 return 0; in snd_herc_spdif_select_get()
2094 * Game Theatre XP card - EGPIO[0] is used to select SPDIF input optical or coaxial.
2103 if (ucontrol->value.integer.value[0]) { in snd_herc_spdif_select_put()
2125 return 0; in snd_cs46xx_spdif_info()
2135 ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_default >> 24) & 0xff); in snd_cs46xx_spdif_default_get()
2136 ucontrol->value.iec958.status[1] = _wrap_all_bits((ins->spdif_csuv_default >> 16) & 0xff); in snd_cs46xx_spdif_default_get()
2137 ucontrol->value.iec958.status[2] = 0; in snd_cs46xx_spdif_default_get()
2138 ucontrol->value.iec958.status[3] = _wrap_all_bits((ins->spdif_csuv_default) & 0xff); in snd_cs46xx_spdif_default_get()
2141 return 0; in snd_cs46xx_spdif_default_get()
2153 val = ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[0]) << 24) | in snd_cs46xx_spdif_default_put()
2174 ucontrol->value.iec958.status[0] = 0xff; in snd_cs46xx_spdif_mask_get()
2175 ucontrol->value.iec958.status[1] = 0xff; in snd_cs46xx_spdif_mask_get()
2176 ucontrol->value.iec958.status[2] = 0x00; in snd_cs46xx_spdif_mask_get()
2177 ucontrol->value.iec958.status[3] = 0xff; in snd_cs46xx_spdif_mask_get()
2178 return 0; in snd_cs46xx_spdif_mask_get()
2188 ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_stream >> 24) & 0xff); in snd_cs46xx_spdif_stream_get()
2189 ucontrol->value.iec958.status[1] = _wrap_all_bits((ins->spdif_csuv_stream >> 16) & 0xff); in snd_cs46xx_spdif_stream_get()
2190 ucontrol->value.iec958.status[2] = 0; in snd_cs46xx_spdif_stream_get()
2191 ucontrol->value.iec958.status[3] = _wrap_all_bits((ins->spdif_csuv_stream) & 0xff); in snd_cs46xx_spdif_stream_get()
2194 return 0; in snd_cs46xx_spdif_stream_get()
2206 val = ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[0]) << 24) | in snd_cs46xx_spdif_stream_put()
2251 .private_value = (VARIDECIMATE_SCB_ADDR + 0xE) << 2,
2285 #if 0
2293 .private_value = (ASYNCRX_SCB_ADDR + 0xE) << 2,
2329 ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1; in snd_cs46xx_front_dup_get()
2330 return 0; in snd_cs46xx_front_dup_get()
2338 AC97_CSR_ACMODE, 0x200, in snd_cs46xx_front_dup_put()
2339 ucontrol->value.integer.value[0] ? 0 : 0x200); in snd_cs46xx_front_dup_put()
2370 snd_ac97_write(ac97, AC97_RESET, 0); in snd_cs46xx_codec_reset()
2374 dev_dbg(ac97->bus->card->dev, "CODEC1 mode %04x\n", 0x0); in snd_cs46xx_codec_reset()
2375 snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x0); in snd_cs46xx_codec_reset()
2377 dev_dbg(ac97->bus->card->dev, "CODEC2 mode %04x\n", 0x3); in snd_cs46xx_codec_reset()
2378 snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x3); in snd_cs46xx_codec_reset()
2398 if (ext_mid != 0xffff && (ext_mid & 1) != 0) in snd_cs46xx_codec_reset()
2402 snd_ac97_write(ac97, AC97_REC_GAIN, 0x8a05); in snd_cs46xx_codec_reset()
2404 if (err == 0x8a05) in snd_cs46xx_codec_reset()
2420 memset(&ac97, 0, sizeof(ac97)); in cs46xx_detect_codec()
2428 snd_cs46xx_codec_write(chip, AC97_RESET, 0, codec); in cs46xx_detect_codec()
2430 if (snd_cs46xx_codec_read(chip, AC97_RESET, codec) & 0x8000) { in cs46xx_detect_codec()
2437 snd_cs46xx_codec_write(chip, AC97_MASTER, 0x8000, codec); in cs46xx_detect_codec()
2438 for (idx = 0; idx < 100; ++idx) { in cs46xx_detect_codec()
2439 if (snd_cs46xx_codec_read(chip, AC97_MASTER, codec) == 0x8000) { in cs46xx_detect_codec()
2464 chip->nr_ac97_codecs = 0; in snd_cs46xx_mixer()
2466 err = snd_ac97_bus(card, 0, &ops, chip, &chip->ac97_bus); in snd_cs46xx_mixer()
2467 if (err < 0) in snd_cs46xx_mixer()
2470 if (cs46xx_detect_codec(chip, CS46XX_PRIMARY_CODEC_INDEX) < 0) in snd_cs46xx_mixer()
2482 for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) { in snd_cs46xx_mixer()
2488 if (err < 0) in snd_cs46xx_mixer()
2493 memset(&id, 0, sizeof(id)); in snd_cs46xx_mixer()
2500 unsigned int id2 = chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]->id & 0xffff; in snd_cs46xx_mixer()
2501 if ((id2 & 0xfff0) == 0x5920) { /* CS4294 and CS4298 */ in snd_cs46xx_mixer()
2503 if (err < 0) in snd_cs46xx_mixer()
2506 AC97_CSR_ACMODE, 0x200); in snd_cs46xx_mixer()
2519 return 0; in snd_cs46xx_mixer()
2548 return 0; in snd_cs46xx_midi_input_open()
2566 return 0; in snd_cs46xx_midi_input_close()
2585 return 0; in snd_cs46xx_midi_output_open()
2603 return 0; in snd_cs46xx_midi_output_close()
2613 if ((chip->midcr & MIDCR_RIE) == 0) { in snd_cs46xx_midi_input_trigger()
2634 if ((chip->midcr & MIDCR_TIE) == 0) { in snd_cs46xx_midi_output_trigger()
2638 (snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_TBF) == 0) { in snd_cs46xx_midi_output_trigger()
2676 if (err < 0) in snd_cs46xx_midi()
2684 return 0; in snd_cs46xx_midi()
2700 snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); in snd_cs46xx_gameport_trigger()
2708 return 0; in snd_cs46xx_gameport_read()
2718 return 0; in snd_cs46xx_gameport_cooked_read()
2724 *buttons = (~jst >> 4) & 0x0F; in snd_cs46xx_gameport_cooked_read()
2726 axes[0] = ((js1 & JSC1_Y1V_MASK) >> JSC1_Y1V_SHIFT) & 0xFFFF; in snd_cs46xx_gameport_cooked_read()
2727 axes[1] = ((js1 & JSC1_X1V_MASK) >> JSC1_X1V_SHIFT) & 0xFFFF; in snd_cs46xx_gameport_cooked_read()
2728 axes[2] = ((js2 & JSC2_Y2V_MASK) >> JSC2_Y2V_SHIFT) & 0xFFFF; in snd_cs46xx_gameport_cooked_read()
2729 axes[3] = ((js2 & JSC2_X2V_MASK) >> JSC2_X2V_SHIFT) & 0xFFFF; in snd_cs46xx_gameport_cooked_read()
2731 for(jst=0;jst<4;++jst) in snd_cs46xx_gameport_cooked_read()
2732 if(axes[jst]==0xFFFF) axes[jst] = -1; in snd_cs46xx_gameport_cooked_read()
2733 return 0; in snd_cs46xx_gameport_cooked_read()
2740 return 0; in snd_cs46xx_gameport_open()
2742 return 0; in snd_cs46xx_gameport_open()
2746 return 0; in snd_cs46xx_gameport_open()
2770 snd_cs46xx_pokeBA0(chip, BA0_JSIO, 0xFF); // ? in snd_cs46xx_gameport()
2775 return 0; in snd_cs46xx_gameport()
2816 for (idx = 0; idx < 5; idx++) { in snd_cs46xx_proc_init()
2829 return 0; in snd_cs46xx_proc_init()
2837 return 0; in snd_cs46xx_proc_done()
2852 tmp &= ~0x0000f03f; in snd_cs46xx_hw_stop()
2853 tmp |= 0x00000010; in snd_cs46xx_hw_stop()
2857 tmp &= ~0x0000003f; in snd_cs46xx_hw_stop()
2858 tmp |= 0x00000011; in snd_cs46xx_hw_stop()
2865 snd_cs46xx_poke(chip, BA1_PCTL, tmp & 0x0000ffff); in snd_cs46xx_hw_stop()
2871 snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); in snd_cs46xx_hw_stop()
2883 snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, 0); in snd_cs46xx_hw_stop()
2921 for (idx = 0; idx < CS46XX_DSP_MODULES; idx++) in snd_cs46xx_free()
2940 snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, 0); in snd_cs46xx_chip_init()
2941 snd_cs46xx_pokeBA0(chip, BA0_SERMC1, 0); in snd_cs46xx_chip_init()
2961 snd_cs46xx_pokeBA0(chip, BA0_ACCTL, 0); in snd_cs46xx_chip_init()
2963 snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, 0); in snd_cs46xx_chip_init()
3000 snd_cs46xx_pokeBA0(chip, BA0_PLLM, 0x3a); in snd_cs46xx_chip_init()
3031 /* snd_cs46xx_pokeBA0(chip, BA0_SERBSP, 0); */ in snd_cs46xx_chip_init()
3044 snd_cs46xx_pokeBA0(chip, BA0_SERC3, 0); in snd_cs46xx_chip_init()
3045 snd_cs46xx_pokeBA0(chip, BA0_SERC4, 0); in snd_cs46xx_chip_init()
3046 snd_cs46xx_pokeBA0(chip, BA0_SERC5, 0); in snd_cs46xx_chip_init()
3057 while (timeout-- > 0) { in snd_cs46xx_chip_init()
3077 for (count = 0; count < 150; count++) { in snd_cs46xx_chip_init()
3109 while (timeout-- > 0) { in snd_cs46xx_chip_init()
3152 /* snd_cs46xx_pokeBA0(chip, BA0_AC97_POWERDOWN, 0x300); */ in snd_cs46xx_chip_init()
3161 return 0; in snd_cs46xx_chip_init()
3175 tmp &= ~0x0000f03f; in cs46xx_enable_stream_irqs()
3179 tmp &= ~0x0000003f; in cs46xx_enable_stream_irqs()
3180 tmp |= 0x00000001; in cs46xx_enable_stream_irqs()
3200 for (i = 0; i < CS46XX_DSP_MODULES; i++) { in snd_cs46xx_start_dsp()
3202 if (err < 0) { in snd_cs46xx_start_dsp()
3208 if (err < 0) { in snd_cs46xx_start_dsp()
3215 if (cs46xx_dsp_scb_and_task_init(chip) < 0) in snd_cs46xx_start_dsp()
3219 if (err < 0) in snd_cs46xx_start_dsp()
3224 if (err < 0) { in snd_cs46xx_start_dsp()
3233 chip->play_ctl = tmp & 0xffff0000; in snd_cs46xx_start_dsp()
3234 snd_cs46xx_poke(chip, BA1_PCTL, tmp & 0x0000ffff); in snd_cs46xx_start_dsp()
3241 chip->capt.ctl = tmp & 0x0000ffff; in snd_cs46xx_start_dsp()
3242 snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); in snd_cs46xx_start_dsp()
3254 /* set the attenuation to 0dB */ in snd_cs46xx_start_dsp()
3255 snd_cs46xx_poke(chip, BA1_PVOL, 0x80008000); in snd_cs46xx_start_dsp()
3256 snd_cs46xx_poke(chip, BA1_CVOL, 0x80008000); in snd_cs46xx_start_dsp()
3259 return 0; in snd_cs46xx_start_dsp()
3275 u32 idx, valid_slots,tmp,powerdown = 0; in voyetra_setup_eapd_slot()
3304 modem_power &=0xFEFF; in voyetra_setup_eapd_slot()
3316 pin_config &=0x27F; in voyetra_setup_eapd_slot()
3328 logic_type &=0x27F; in voyetra_setup_eapd_slot()
3334 valid_slots |= 0x200; in voyetra_setup_eapd_slot()
3346 for(idx = 0x90; idx <= 0x9F; idx++) { in voyetra_setup_eapd_slot()
3351 * the left. 0x1800 corresponds to bits 7 and 8. in voyetra_setup_eapd_slot()
3353 snd_cs46xx_pokeBA0(chip, BA0_SERBWP, 0x1800); in voyetra_setup_eapd_slot()
3387 return 0; in voyetra_setup_eapd_slot()
3411 val |= 0x8000; in amp_voyetra()
3414 val &= ~0x8000; in amp_voyetra()
3489 for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { in hercules_mixer_init()
3494 if (err < 0) { in hercules_mixer_init()
3505 #if 0
3516 snd_cs46xx_codec_write(chip, 0x4C,
3517 snd_cs46xx_codec_read(chip, 0x4C) & 0xFE7F);
3518 snd_cs46xx_codec_write(chip, 0x4E,
3519 snd_cs46xx_codec_read(chip, 0x4E) | 0x0180);
3521 snd_cs46xx_codec_write(chip, 0x54,
3522 snd_cs46xx_codec_read(chip, 0x54) & ~0x0180);
3524 snd_cs46xx_codec_write(chip, 0x54,
3525 snd_cs46xx_codec_read(chip, 0x54) | 0x0180);
3550 nval = control = inw(chip->acpi_port + 0x10); in clkrun_hack()
3554 nval |= 0x2000; in clkrun_hack()
3556 nval &= ~0x2000; in clkrun_hack()
3558 outw(nval, chip->acpi_port + 0x10); in clkrun_hack()
3570 chip->acpi_port = 0; in clkrun_init()
3578 pci_read_config_byte(pdev, 0x41, &pp); in clkrun_init()
3601 .vendor = 0x1489,
3602 .id = 0x7001,
3607 .vendor = 0x5053,
3608 .id = 0x3357,
3614 .vendor = 0x1071,
3615 .id = 0x6003,
3621 .vendor = 0x14af, /* Guillemot Corporation */
3622 .id = 0x0050,
3628 .vendor = 0x1681,
3629 .id = 0x0050,
3635 .vendor = 0x1681,
3636 .id = 0x0051,
3643 .vendor = 0x1681,
3644 .id = 0x0052,
3650 .vendor = 0x1681,
3651 .id = 0x0053,
3657 .vendor = 0x1681,
3658 .id = 0x0054,
3665 .vendor = 0x1681,
3666 .id = 0xa010,
3670 .vendor = 0x1681,
3671 .id = 0xa011,
3676 .vendor = 0x153b,
3677 .id = 0x112e,
3681 .vendor = 0x153b,
3682 .id = 0x1136,
3688 .id = 0x0132,
3695 .id = 0x0153,
3702 .id = 0x1010,
3736 for (i = 0; i < ARRAY_SIZE(saved_regs); i++) in snd_cs46xx_suspend()
3746 return 0; in snd_cs46xx_suspend()
3760 chip->amplifier = 0; in snd_cs46xx_resume()
3769 for (i = 0; i < ARRAY_SIZE(saved_regs); i++) in snd_cs46xx_resume()
3775 #if 0 in snd_cs46xx_resume()
3793 chip->capt.ctl = tmp & 0x0000ffff; in snd_cs46xx_resume()
3794 snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); in snd_cs46xx_resume()
3810 chip->in_suspend = 0; in snd_cs46xx_resume()
3812 return 0; in snd_cs46xx_resume()
3834 if (err < 0) in snd_cs46xx_create()
3846 if (err < 0) in snd_cs46xx_create()
3848 chip->ba0_addr = pci_resource_start(pci, 0); in snd_cs46xx_create()
3850 if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 || in snd_cs46xx_create()
3851 chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) { in snd_cs46xx_create()
3853 "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", in snd_cs46xx_create()
3887 for (cp = &cards[0]; cp->name; cp++) { in snd_cs46xx_create()
3924 for (idx = 0; idx < 5; idx++) { in snd_cs46xx_create()
3951 if (err < 0) in snd_cs46xx_create()
3966 return 0; in snd_cs46xx_create()