Lines Matching +full:hall +full:- +full:enable

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 1999-2000 Takashi Iwai <tiwai@suse.de>
38 spin_lock_irqsave(&emu->reg_lock, flags); in snd_emu8000_poke()
39 if (reg != emu->last_reg) { in snd_emu8000_poke()
41 emu->last_reg = reg; in snd_emu8000_poke()
44 spin_unlock_irqrestore(&emu->reg_lock, flags); in snd_emu8000_poke()
52 spin_lock_irqsave(&emu->reg_lock, flags); in snd_emu8000_peek()
53 if (reg != emu->last_reg) { in snd_emu8000_peek()
55 emu->last_reg = reg; in snd_emu8000_peek()
58 spin_unlock_irqrestore(&emu->reg_lock, flags); in snd_emu8000_peek()
66 spin_lock_irqsave(&emu->reg_lock, flags); in snd_emu8000_poke_dw()
67 if (reg != emu->last_reg) { in snd_emu8000_poke_dw()
69 emu->last_reg = reg; in snd_emu8000_poke_dw()
73 spin_unlock_irqrestore(&emu->reg_lock, flags); in snd_emu8000_poke_dw()
82 spin_lock_irqsave(&emu->reg_lock, flags); in snd_emu8000_peek_dw()
83 if (reg != emu->last_reg) { in snd_emu8000_peek_dw()
85 emu->last_reg = reg; in snd_emu8000_peek_dw()
89 spin_unlock_irqrestore(&emu->reg_lock, flags); in snd_emu8000_peek_dw()
156 return -ENODEV; in snd_emu8000_detect()
159 return -ENODEV; in snd_emu8000_detect()
161 return -ENODEV; in snd_emu8000_detect()
164 emu->port1); in snd_emu8000_detect()
370 if (emu->dram_checked) in size_dram()
443 pr_info("EMU8000 [0x%lx]: %d KiB on-board DRAM detected\n", in size_dram()
444 emu->port1, size/1024); in size_dram()
446 emu->mem_size = size; in size_dram()
447 emu->dram_checked = 1; in size_dram()
461 the reverb and chorus effects for Yamaha OPL-3 synthesizer */ in snd_emu8000_init_fm()
463 /* 31: FM left channel, 0xffffe0-0xffffe8 */ in snd_emu8000_init_fm()
466 EMU8000_CSL_WRITE(emu, 30, 0x00FFFFE8 | (emu->fm_chorus_depth << 24)); in snd_emu8000_init_fm()
467 EMU8000_PTRX_WRITE(emu, 30, (emu->fm_reverb_depth << 8)); in snd_emu8000_init_fm()
471 /* 32: FM right channel, 0xfffff0-0xfffff8 */ in snd_emu8000_init_fm()
474 EMU8000_CSL_WRITE(emu, 31, 0x00FFFFF8 | (emu->fm_chorus_depth << 24)); in snd_emu8000_init_fm()
475 EMU8000_PTRX_WRITE(emu, 31, (emu->fm_reverb_depth << 8)); in snd_emu8000_init_fm()
481 spin_lock_irqsave(&emu->reg_lock, flags); in snd_emu8000_init_fm()
486 spin_unlock_irqrestore(&emu->reg_lock, flags); in snd_emu8000_init_fm()
506 emu->last_reg = 0xffff; /* reset the last register index */ in snd_emu8000_init_hw()
537 /* enable audio */ in snd_emu8000_init_hw()
547 /*----------------------------------------------------------------
549 *----------------------------------------------------------------*/
552 {0xD26A, 0xD36A, 0x0000}, /* -12 dB */
553 {0xD25B, 0xD35B, 0x0000}, /* -8 */
554 {0xD24C, 0xD34C, 0x0000}, /* -6 */
555 {0xD23D, 0xD33D, 0x0000}, /* -4 */
556 {0xD21F, 0xD31F, 0x0000}, /* -2 */
567 {0x821E, 0xC26A, 0x031E, 0xC36A, 0x021E, 0xD208, 0x831E, 0xD308, 0x0001}, /* -12 dB */
583 * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB]
589 int bass = emu->bass_level; in snd_emu8000_update_equalizer()
590 int treble = emu->treble_level; in snd_emu8000_update_equalizer()
610 /*----------------------------------------------------------------
612 *----------------------------------------------------------------*/
630 unsigned short feedback; /* feedback level (0xE600-0xE6FF) */
631 unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */
632 unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */
633 unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */
634 unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */
656 return -EINVAL; in snd_emu8000_load_chorus_fx()
659 return -EFAULT; in snd_emu8000_load_chorus_fx()
668 int effect = emu->chorus_mode; in snd_emu8000_update_chorus_mode()
681 /*----------------------------------------------------------------
683 *----------------------------------------------------------------*/
727 {{ /* hall 1 */
733 {{ /* hall 2 */
784 return -EINVAL; in snd_emu8000_load_reverb_fx()
787 return -EFAULT; in snd_emu8000_load_reverb_fx()
796 int effect = emu->reverb_mode; in snd_emu8000_update_reverb_mode()
813 /*----------------------------------------------------------------
815 *----------------------------------------------------------------*/
822 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in mixer_bass_treble_info()
823 uinfo->count = 1; in mixer_bass_treble_info()
824 uinfo->value.integer.min = 0; in mixer_bass_treble_info()
825 uinfo->value.integer.max = 11; in mixer_bass_treble_info()
833 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->treble_level : emu->bass_level; in mixer_bass_treble_get()
844 val1 = ucontrol->value.integer.value[0] % 12; in mixer_bass_treble_put()
845 spin_lock_irqsave(&emu->control_lock, flags); in mixer_bass_treble_put()
846 if (kcontrol->private_value) { in mixer_bass_treble_put()
847 change = val1 != emu->treble_level; in mixer_bass_treble_put()
848 emu->treble_level = val1; in mixer_bass_treble_put()
850 change = val1 != emu->bass_level; in mixer_bass_treble_put()
851 emu->bass_level = val1; in mixer_bass_treble_put()
853 spin_unlock_irqrestore(&emu->control_lock, flags); in mixer_bass_treble_put()
861 .name = "Synth Tone Control - Bass",
871 .name = "Synth Tone Control - Treble",
883 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in mixer_chorus_reverb_info()
884 uinfo->count = 1; in mixer_chorus_reverb_info()
885 uinfo->value.integer.min = 0; in mixer_chorus_reverb_info()
886 …uinfo->value.integer.max = kcontrol->private_value ? (SNDRV_EMU8000_CHORUS_NUMBERS-1) : (SNDRV_EMU… in mixer_chorus_reverb_info()
894 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->chorus_mode : emu->reverb_mode; in mixer_chorus_reverb_get()
905 spin_lock_irqsave(&emu->control_lock, flags); in mixer_chorus_reverb_put()
906 if (kcontrol->private_value) { in mixer_chorus_reverb_put()
907 val1 = ucontrol->value.integer.value[0] % SNDRV_EMU8000_CHORUS_NUMBERS; in mixer_chorus_reverb_put()
908 change = val1 != emu->chorus_mode; in mixer_chorus_reverb_put()
909 emu->chorus_mode = val1; in mixer_chorus_reverb_put()
911 val1 = ucontrol->value.integer.value[0] % SNDRV_EMU8000_REVERB_NUMBERS; in mixer_chorus_reverb_put()
912 change = val1 != emu->reverb_mode; in mixer_chorus_reverb_put()
913 emu->reverb_mode = val1; in mixer_chorus_reverb_put()
915 spin_unlock_irqrestore(&emu->control_lock, flags); in mixer_chorus_reverb_put()
917 if (kcontrol->private_value) in mixer_chorus_reverb_put()
950 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in mixer_fm_depth_info()
951 uinfo->count = 1; in mixer_fm_depth_info()
952 uinfo->value.integer.min = 0; in mixer_fm_depth_info()
953 uinfo->value.integer.max = 255; in mixer_fm_depth_info()
961 …ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->fm_chorus_depth : emu->fm_reverb… in mixer_fm_depth_get()
972 val1 = ucontrol->value.integer.value[0] % 256; in mixer_fm_depth_put()
973 spin_lock_irqsave(&emu->control_lock, flags); in mixer_fm_depth_put()
974 if (kcontrol->private_value) { in mixer_fm_depth_put()
975 change = val1 != emu->fm_chorus_depth; in mixer_fm_depth_put()
976 emu->fm_chorus_depth = val1; in mixer_fm_depth_put()
978 change = val1 != emu->fm_reverb_depth; in mixer_fm_depth_put()
979 emu->fm_reverb_depth = val1; in mixer_fm_depth_put()
981 spin_unlock_irqrestore(&emu->control_lock, flags); in mixer_fm_depth_put()
1026 return -EINVAL; in snd_emu8000_create_mixer()
1028 spin_lock_init(&emu->control_lock); in snd_emu8000_create_mixer()
1030 memset(emu->controls, 0, sizeof(emu->controls)); in snd_emu8000_create_mixer()
1032 if ((err = snd_ctl_add(card, emu->controls[i] = snd_ctl_new1(mixer_defs[i], emu))) < 0) in snd_emu8000_create_mixer()
1039 down_write(&card->controls_rwsem); in snd_emu8000_create_mixer()
1040 if (emu->controls[i]) in snd_emu8000_create_mixer()
1041 snd_ctl_remove(card, emu->controls[i]); in snd_emu8000_create_mixer()
1042 up_write(&card->controls_rwsem); in snd_emu8000_create_mixer()
1053 release_and_free_resource(hw->res_port1); in snd_emu8000_free()
1054 release_and_free_resource(hw->res_port2); in snd_emu8000_free()
1055 release_and_free_resource(hw->res_port3); in snd_emu8000_free()
1064 struct snd_emu8000 *hw = device->device_data; in snd_emu8000_dev_free()
1090 return -ENOMEM; in snd_emu8000_new()
1091 spin_lock_init(&hw->reg_lock); in snd_emu8000_new()
1092 hw->index = index; in snd_emu8000_new()
1093 hw->port1 = port; in snd_emu8000_new()
1094 hw->port2 = port + 0x400; in snd_emu8000_new()
1095 hw->port3 = port + 0x800; in snd_emu8000_new()
1096 if (!(hw->res_port1 = request_region(hw->port1, 4, "Emu8000-1")) || in snd_emu8000_new()
1097 !(hw->res_port2 = request_region(hw->port2, 4, "Emu8000-2")) || in snd_emu8000_new()
1098 !(hw->res_port3 = request_region(hw->port3, 4, "Emu8000-3"))) { in snd_emu8000_new()
1099 …snd_printk(KERN_ERR "sbawe: can't grab ports 0x%lx, 0x%lx, 0x%lx\n", hw->port1, hw->port2, hw->por… in snd_emu8000_new()
1101 return -EBUSY; in snd_emu8000_new()
1103 hw->mem_size = 0; in snd_emu8000_new()
1104 hw->card = card; in snd_emu8000_new()
1105 hw->seq_ports = seq_ports; in snd_emu8000_new()
1106 hw->bass_level = 5; in snd_emu8000_new()
1107 hw->treble_level = 9; in snd_emu8000_new()
1108 hw->chorus_mode = 2; in snd_emu8000_new()
1109 hw->reverb_mode = 4; in snd_emu8000_new()
1110 hw->fm_chorus_depth = 0; in snd_emu8000_new()
1111 hw->fm_reverb_depth = 0; in snd_emu8000_new()
1115 return -ENODEV; in snd_emu8000_new()
1131 strcpy(awe->name, "EMU-8000"); in snd_emu8000_new()