opl3              290 include/sound/opl3.h 	void (*command) (struct snd_opl3 * opl3, unsigned short cmd, unsigned char val);
opl3              341 include/sound/opl3.h int snd_opl3_init(struct snd_opl3 *opl3);
opl3              346 include/sound/opl3.h 		    struct snd_opl3 ** opl3);
opl3              347 include/sound/opl3.h int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev);
opl3              348 include/sound/opl3.h int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device,
opl3              357 include/sound/opl3.h void snd_opl3_reset(struct snd_opl3 * opl3);
opl3              362 include/sound/opl3.h int snd_opl3_load_patch(struct snd_opl3 *opl3,
opl3              367 include/sound/opl3.h struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank,
opl3              369 include/sound/opl3.h void snd_opl3_clear_patches(struct snd_opl3 *opl3);
opl3              372 include/sound/opl3.h static inline void snd_opl3_clear_patches(struct snd_opl3 *opl3) {}
opl3               17 include/sound/opl4.h 			   struct snd_opl3 **opl3, struct snd_opl4 **opl4);
opl3               67 sound/drivers/opl3/opl3_drums.c static void snd_opl3_drum_voice_set(struct snd_opl3 *opl3,
opl3               76 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->am_vib);
opl3               80 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->ksl_level);
opl3               84 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->attack_decay);
opl3               88 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->sustain_release);
opl3               92 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->feedback_connection);
opl3               96 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->wave_select);
opl3              102 sound/drivers/opl3/opl3_drums.c static void snd_opl3_drum_note_set(struct snd_opl3 *opl3,
opl3              110 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->fnum);
opl3              114 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, data->octave_f);
opl3              120 sound/drivers/opl3/opl3_drums.c static void snd_opl3_drum_vol_set(struct snd_opl3 *opl3,
opl3              133 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              143 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              149 sound/drivers/opl3/opl3_drums.c void snd_opl3_load_drums(struct snd_opl3 *opl3)
opl3              151 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_voice_set(opl3, &bass_op0);
opl3              152 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_voice_set(opl3, &bass_op1);
opl3              153 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_note_set(opl3, &bass_note);
opl3              155 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_voice_set(opl3, &hihat);
opl3              157 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_voice_set(opl3, &snare);
opl3              158 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_note_set(opl3, &snare_note);
opl3              160 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_voice_set(opl3, &tomtom);
opl3              161 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_note_set(opl3, &tomtom_note);
opl3              163 sound/drivers/opl3/opl3_drums.c 	snd_opl3_drum_voice_set(opl3, &cymbal);
opl3              169 sound/drivers/opl3/opl3_drums.c void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off,
opl3              175 sound/drivers/opl3/opl3_drums.c 	if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE))
opl3              203 sound/drivers/opl3/opl3_drums.c 		snd_opl3_drum_vol_set(opl3, drum_voice, vel, chan);
opl3              204 sound/drivers/opl3/opl3_drums.c 		opl3->drum_reg |= drum_mask;
opl3              206 sound/drivers/opl3/opl3_drums.c 		opl3->drum_reg &= ~drum_mask;
opl3              208 sound/drivers/opl3/opl3_drums.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION,
opl3              209 sound/drivers/opl3/opl3_drums.c 			 opl3->drum_reg);
opl3               26 sound/drivers/opl3/opl3_lib.c static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
opl3               36 sound/drivers/opl3/opl3_lib.c 	port = (cmd & OPL3_RIGHT) ? opl3->r_port : opl3->l_port;
opl3               38 sound/drivers/opl3/opl3_lib.c 	spin_lock_irqsave(&opl3->reg_lock, flags);
opl3               46 sound/drivers/opl3/opl3_lib.c 	spin_unlock_irqrestore(&opl3->reg_lock, flags);
opl3               49 sound/drivers/opl3/opl3_lib.c static void snd_opl3_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
opl3               59 sound/drivers/opl3/opl3_lib.c 	port = (cmd & OPL3_RIGHT) ? opl3->r_port : opl3->l_port;
opl3               61 sound/drivers/opl3/opl3_lib.c 	spin_lock_irqsave(&opl3->reg_lock, flags);
opl3               64 sound/drivers/opl3/opl3_lib.c 	inb(opl3->l_port);
opl3               65 sound/drivers/opl3/opl3_lib.c 	inb(opl3->l_port);
opl3               68 sound/drivers/opl3/opl3_lib.c 	inb(opl3->l_port);
opl3               69 sound/drivers/opl3/opl3_lib.c 	inb(opl3->l_port);
opl3               71 sound/drivers/opl3/opl3_lib.c 	spin_unlock_irqrestore(&opl3->reg_lock, flags);
opl3               74 sound/drivers/opl3/opl3_lib.c static int snd_opl3_detect(struct snd_opl3 * opl3)
opl3               90 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, OPL3_TIMER1_MASK | OPL3_TIMER2_MASK);
opl3               92 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, OPL3_IRQ_RESET);
opl3               93 sound/drivers/opl3/opl3_lib.c 	signature = stat1 = inb(opl3->l_port);	/* Status register */
opl3               99 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER1, 0xff);
opl3              101 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, OPL3_TIMER2_MASK | OPL3_TIMER1_START);
opl3              105 sound/drivers/opl3/opl3_lib.c 	stat2 = inb(opl3->l_port);
opl3              107 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, OPL3_TIMER1_MASK | OPL3_TIMER2_MASK);
opl3              109 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, OPL3_IRQ_RESET);
opl3              117 sound/drivers/opl3/opl3_lib.c 	if (opl3->hardware != OPL3_HW_AUTO)
opl3              122 sound/drivers/opl3/opl3_lib.c 		opl3->hardware = OPL3_HW_OPL2;
opl3              128 sound/drivers/opl3/opl3_lib.c 		if (snd_BUG_ON(!opl3->r_port))
opl3              130 sound/drivers/opl3/opl3_lib.c 		opl3->hardware = OPL3_HW_OPL3;
opl3              148 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              150 sound/drivers/opl3/opl3_lib.c 	opl3 = snd_timer_chip(timer);
opl3              151 sound/drivers/opl3/opl3_lib.c 	spin_lock_irqsave(&opl3->timer_lock, flags);
opl3              153 sound/drivers/opl3/opl3_lib.c 	tmp = (opl3->timer_enable | OPL3_TIMER1_START) & ~OPL3_TIMER1_MASK;
opl3              154 sound/drivers/opl3/opl3_lib.c 	opl3->timer_enable = tmp;
opl3              155 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER1, 256 - ticks);	/* timer 1 count */
opl3              156 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp);	/* enable timer 1 IRQ */
opl3              157 sound/drivers/opl3/opl3_lib.c 	spin_unlock_irqrestore(&opl3->timer_lock, flags);
opl3              165 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              167 sound/drivers/opl3/opl3_lib.c 	opl3 = snd_timer_chip(timer);
opl3              168 sound/drivers/opl3/opl3_lib.c 	spin_lock_irqsave(&opl3->timer_lock, flags);
opl3              169 sound/drivers/opl3/opl3_lib.c 	tmp = (opl3->timer_enable | OPL3_TIMER1_MASK) & ~OPL3_TIMER1_START;
opl3              170 sound/drivers/opl3/opl3_lib.c 	opl3->timer_enable = tmp;
opl3              171 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp);	/* disable timer #1 */
opl3              172 sound/drivers/opl3/opl3_lib.c 	spin_unlock_irqrestore(&opl3->timer_lock, flags);
opl3              185 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              187 sound/drivers/opl3/opl3_lib.c 	opl3 = snd_timer_chip(timer);
opl3              188 sound/drivers/opl3/opl3_lib.c 	spin_lock_irqsave(&opl3->timer_lock, flags);
opl3              190 sound/drivers/opl3/opl3_lib.c 	tmp = (opl3->timer_enable | OPL3_TIMER2_START) & ~OPL3_TIMER2_MASK;
opl3              191 sound/drivers/opl3/opl3_lib.c 	opl3->timer_enable = tmp;
opl3              192 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER2, 256 - ticks);	/* timer 1 count */
opl3              193 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp);	/* enable timer 1 IRQ */
opl3              194 sound/drivers/opl3/opl3_lib.c 	spin_unlock_irqrestore(&opl3->timer_lock, flags);
opl3              202 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              204 sound/drivers/opl3/opl3_lib.c 	opl3 = snd_timer_chip(timer);
opl3              205 sound/drivers/opl3/opl3_lib.c 	spin_lock_irqsave(&opl3->timer_lock, flags);
opl3              206 sound/drivers/opl3/opl3_lib.c 	tmp = (opl3->timer_enable | OPL3_TIMER2_MASK) & ~OPL3_TIMER2_START;
opl3              207 sound/drivers/opl3/opl3_lib.c 	opl3->timer_enable = tmp;
opl3              208 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp);	/* disable timer #1 */
opl3              209 sound/drivers/opl3/opl3_lib.c 	spin_unlock_irqrestore(&opl3->timer_lock, flags);
opl3              235 sound/drivers/opl3/opl3_lib.c static int snd_opl3_timer1_init(struct snd_opl3 * opl3, int timer_no)
opl3              243 sound/drivers/opl3/opl3_lib.c 	tid.card = opl3->card->number;
opl3              246 sound/drivers/opl3/opl3_lib.c 	if ((err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer)) >= 0) {
opl3              248 sound/drivers/opl3/opl3_lib.c 		timer->private_data = opl3;
opl3              251 sound/drivers/opl3/opl3_lib.c 	opl3->timer1 = timer;
opl3              255 sound/drivers/opl3/opl3_lib.c static int snd_opl3_timer2_init(struct snd_opl3 * opl3, int timer_no)
opl3              263 sound/drivers/opl3/opl3_lib.c 	tid.card = opl3->card->number;
opl3              266 sound/drivers/opl3/opl3_lib.c 	if ((err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer)) >= 0) {
opl3              268 sound/drivers/opl3/opl3_lib.c 		timer->private_data = opl3;
opl3              271 sound/drivers/opl3/opl3_lib.c 	opl3->timer2 = timer;
opl3              282 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              288 sound/drivers/opl3/opl3_lib.c 	opl3 = hw->private_data;
opl3              289 sound/drivers/opl3/opl3_lib.c 	status = inb(opl3->l_port);
opl3              297 sound/drivers/opl3/opl3_lib.c 		timer = opl3->timer1;
opl3              301 sound/drivers/opl3/opl3_lib.c 		timer = opl3->timer2;
opl3              312 sound/drivers/opl3/opl3_lib.c static int snd_opl3_free(struct snd_opl3 *opl3)
opl3              314 sound/drivers/opl3/opl3_lib.c 	if (snd_BUG_ON(!opl3))
opl3              316 sound/drivers/opl3/opl3_lib.c 	if (opl3->private_free)
opl3              317 sound/drivers/opl3/opl3_lib.c 		opl3->private_free(opl3);
opl3              318 sound/drivers/opl3/opl3_lib.c 	snd_opl3_clear_patches(opl3);
opl3              319 sound/drivers/opl3/opl3_lib.c 	release_and_free_resource(opl3->res_l_port);
opl3              320 sound/drivers/opl3/opl3_lib.c 	release_and_free_resource(opl3->res_r_port);
opl3              321 sound/drivers/opl3/opl3_lib.c 	kfree(opl3);
opl3              327 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3 = device->device_data;
opl3              328 sound/drivers/opl3/opl3_lib.c 	return snd_opl3_free(opl3);
opl3              338 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              342 sound/drivers/opl3/opl3_lib.c 	opl3 = kzalloc(sizeof(*opl3), GFP_KERNEL);
opl3              343 sound/drivers/opl3/opl3_lib.c 	if (!opl3)
opl3              346 sound/drivers/opl3/opl3_lib.c 	opl3->card = card;
opl3              347 sound/drivers/opl3/opl3_lib.c 	opl3->hardware = hardware;
opl3              348 sound/drivers/opl3/opl3_lib.c 	spin_lock_init(&opl3->reg_lock);
opl3              349 sound/drivers/opl3/opl3_lib.c 	spin_lock_init(&opl3->timer_lock);
opl3              351 sound/drivers/opl3/opl3_lib.c 	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops)) < 0) {
opl3              352 sound/drivers/opl3/opl3_lib.c 		snd_opl3_free(opl3);
opl3              356 sound/drivers/opl3/opl3_lib.c 	*ropl3 = opl3;
opl3              362 sound/drivers/opl3/opl3_lib.c int snd_opl3_init(struct snd_opl3 *opl3)
opl3              364 sound/drivers/opl3/opl3_lib.c 	if (! opl3->command) {
opl3              369 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TEST, OPL3_ENABLE_WAVE_SELECT);
opl3              371 sound/drivers/opl3/opl3_lib.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION, 0x00);
opl3              373 sound/drivers/opl3/opl3_lib.c 	switch (opl3->hardware & OPL3_HW_MASK) {
opl3              375 sound/drivers/opl3/opl3_lib.c 		opl3->max_voices = MAX_OPL2_VOICES;
opl3              379 sound/drivers/opl3/opl3_lib.c 		opl3->max_voices = MAX_OPL3_VOICES;
opl3              381 sound/drivers/opl3/opl3_lib.c 		opl3->command(opl3, OPL3_RIGHT | OPL3_REG_MODE, OPL3_OPL3_ENABLE);
opl3              395 sound/drivers/opl3/opl3_lib.c 	struct snd_opl3 *opl3;
opl3              399 sound/drivers/opl3/opl3_lib.c 	if ((err = snd_opl3_new(card, hardware, &opl3)) < 0)
opl3              402 sound/drivers/opl3/opl3_lib.c 		if ((opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)")) == NULL) {
opl3              404 sound/drivers/opl3/opl3_lib.c 			snd_device_free(card, opl3);
opl3              408 sound/drivers/opl3/opl3_lib.c 		    (opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)")) == NULL) {
opl3              410 sound/drivers/opl3/opl3_lib.c 			snd_device_free(card, opl3);
opl3              414 sound/drivers/opl3/opl3_lib.c 	opl3->l_port = l_port;
opl3              415 sound/drivers/opl3/opl3_lib.c 	opl3->r_port = r_port;
opl3              417 sound/drivers/opl3/opl3_lib.c 	switch (opl3->hardware) {
opl3              422 sound/drivers/opl3/opl3_lib.c 		opl3->command = &snd_opl3_command;
opl3              425 sound/drivers/opl3/opl3_lib.c 		opl3->command = &snd_opl2_command;
opl3              426 sound/drivers/opl3/opl3_lib.c 		if ((err = snd_opl3_detect(opl3)) < 0) {
opl3              428 sound/drivers/opl3/opl3_lib.c 				   opl3->l_port, opl3->r_port);
opl3              429 sound/drivers/opl3/opl3_lib.c 			snd_device_free(card, opl3);
opl3              433 sound/drivers/opl3/opl3_lib.c 		switch (opl3->hardware & OPL3_HW_MASK) {
opl3              436 sound/drivers/opl3/opl3_lib.c 			opl3->command = &snd_opl3_command;
opl3              440 sound/drivers/opl3/opl3_lib.c 	snd_opl3_init(opl3);
opl3              442 sound/drivers/opl3/opl3_lib.c 	*ropl3 = opl3;
opl3              448 sound/drivers/opl3/opl3_lib.c int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev)
opl3              453 sound/drivers/opl3/opl3_lib.c 		if ((err = snd_opl3_timer1_init(opl3, timer1_dev)) < 0)
opl3              456 sound/drivers/opl3/opl3_lib.c 		if ((err = snd_opl3_timer2_init(opl3, timer2_dev)) < 0) {
opl3              457 sound/drivers/opl3/opl3_lib.c 			snd_device_free(opl3->card, opl3->timer1);
opl3              458 sound/drivers/opl3/opl3_lib.c 			opl3->timer1 = NULL;
opl3              467 sound/drivers/opl3/opl3_lib.c int snd_opl3_hwdep_new(struct snd_opl3 * opl3,
opl3              472 sound/drivers/opl3/opl3_lib.c 	struct snd_card *card = opl3->card;
opl3              481 sound/drivers/opl3/opl3_lib.c 		snd_device_free(card, opl3);
opl3              484 sound/drivers/opl3/opl3_lib.c 	hw->private_data = opl3;
opl3              491 sound/drivers/opl3/opl3_lib.c 	switch (opl3->hardware & OPL3_HW_MASK) {
opl3              512 sound/drivers/opl3/opl3_lib.c 	opl3->hwdep = hw;
opl3              513 sound/drivers/opl3/opl3_lib.c 	opl3->seq_dev_num = seq_device;
opl3              516 sound/drivers/opl3/opl3_lib.c 			       sizeof(struct snd_opl3 *), &opl3->seq_dev) >= 0) {
opl3              517 sound/drivers/opl3/opl3_lib.c 		strcpy(opl3->seq_dev->name, hw->name);
opl3              518 sound/drivers/opl3/opl3_lib.c 		*(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3;
opl3              110 sound/drivers/opl3/opl3_midi.c static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) {
opl3              114 sound/drivers/opl3/opl3_midi.c 	printk(KERN_DEBUG "time %.5i: %s [%.2i]: ", opl3->use_time, s, voice);
opl3              115 sound/drivers/opl3/opl3_midi.c 	for (i = 0; i < opl3->max_voices; i++)
opl3              116 sound/drivers/opl3/opl3_midi.c 		printk(KERN_CONT "%c", *(str + opl3->voices[i].state + 1));
opl3              124 sound/drivers/opl3/opl3_midi.c static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op,
opl3              155 sound/drivers/opl3/opl3_midi.c 	for (i = 0; i < opl3->max_voices; i++) {
opl3              156 sound/drivers/opl3/opl3_midi.c 		vp = &opl3->voices[i];
opl3              179 sound/drivers/opl3/opl3_midi.c 			vp2 = &opl3->voices[i + 3];
opl3              226 sound/drivers/opl3/opl3_midi.c 	struct snd_opl3 *opl3 = from_timer(opl3, t, tlist);
opl3              231 sound/drivers/opl3/opl3_midi.c 	spin_lock_irqsave(&opl3->voice_lock, flags);
opl3              232 sound/drivers/opl3/opl3_midi.c 	for (i = 0; i < opl3->max_voices; i++) {
opl3              233 sound/drivers/opl3/opl3_midi.c 		struct snd_opl3_voice *vp = &opl3->voices[i];
opl3              236 sound/drivers/opl3/opl3_midi.c 				snd_opl3_note_off_unsafe(opl3, vp->note, 0,
opl3              242 sound/drivers/opl3/opl3_midi.c 	spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              244 sound/drivers/opl3/opl3_midi.c 	spin_lock_irqsave(&opl3->sys_timer_lock, flags);
opl3              246 sound/drivers/opl3/opl3_midi.c 		mod_timer(&opl3->tlist, jiffies + 1);	/* invoke again */
opl3              248 sound/drivers/opl3/opl3_midi.c 		opl3->sys_timer_status = 0;
opl3              249 sound/drivers/opl3/opl3_midi.c 	spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
opl3              255 sound/drivers/opl3/opl3_midi.c static void snd_opl3_start_timer(struct snd_opl3 *opl3)
opl3              258 sound/drivers/opl3/opl3_midi.c 	spin_lock_irqsave(&opl3->sys_timer_lock, flags);
opl3              259 sound/drivers/opl3/opl3_midi.c 	if (! opl3->sys_timer_status) {
opl3              260 sound/drivers/opl3/opl3_midi.c 		mod_timer(&opl3->tlist, jiffies + 1);
opl3              261 sound/drivers/opl3/opl3_midi.c 		opl3->sys_timer_status = 1;
opl3              263 sound/drivers/opl3/opl3_midi.c 	spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
opl3              278 sound/drivers/opl3/opl3_midi.c 	struct snd_opl3 *opl3;
opl3              304 sound/drivers/opl3/opl3_midi.c 	opl3 = p;
opl3              313 sound/drivers/opl3/opl3_midi.c 	if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
opl3              332 sound/drivers/opl3/opl3_midi.c 	spin_lock_irqsave(&opl3->voice_lock, flags);
opl3              335 sound/drivers/opl3/opl3_midi.c 		snd_opl3_drum_switch(opl3, note, vel, 1, chan);
opl3              336 sound/drivers/opl3/opl3_midi.c 		spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              341 sound/drivers/opl3/opl3_midi.c 	patch = snd_opl3_find_patch(opl3, prg, bank, 0);
opl3              343 sound/drivers/opl3/opl3_midi.c 		spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              353 sound/drivers/opl3/opl3_midi.c 		if (opl3->hardware >= OPL3_HW_OPL3) {
opl3              359 sound/drivers/opl3/opl3_midi.c 		spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              368 sound/drivers/opl3/opl3_midi.c 	if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
opl3              369 sound/drivers/opl3/opl3_midi.c 		voice = opl3_get_voice(opl3, instr_4op, chan);
opl3              376 sound/drivers/opl3/opl3_midi.c 		spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              393 sound/drivers/opl3/opl3_midi.c 	vp = &opl3->voices[voice];
opl3              397 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              400 sound/drivers/opl3/opl3_midi.c 		vp2 = &opl3->voices[voice + 3];
opl3              405 sound/drivers/opl3/opl3_midi.c 			opl3->command(opl3, opl3_reg, reg_val);
opl3              411 sound/drivers/opl3/opl3_midi.c 		if ((opl3->connection_reg ^ connect_mask) & connect_mask) {
opl3              412 sound/drivers/opl3/opl3_midi.c 			opl3->connection_reg |= connect_mask;
opl3              415 sound/drivers/opl3/opl3_midi.c 			opl3->command(opl3, opl3_reg, opl3->connection_reg);
opl3              418 sound/drivers/opl3/opl3_midi.c 		if ((opl3->connection_reg ^ ~connect_mask) & connect_mask) {
opl3              419 sound/drivers/opl3/opl3_midi.c 			opl3->connection_reg &= ~connect_mask;
opl3              422 sound/drivers/opl3/opl3_midi.c 			opl3->command(opl3, opl3_reg, opl3->connection_reg);
opl3              428 sound/drivers/opl3/opl3_midi.c 		   opl3->connection_reg);
opl3              469 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              474 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              479 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              484 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              489 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              501 sound/drivers/opl3/opl3_midi.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              514 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, opl3_reg, reg_val);
opl3              534 sound/drivers/opl3/opl3_midi.c 	opl3->command(opl3, opl3_reg, fnum);
opl3              536 sound/drivers/opl3/opl3_midi.c 	opl3->voices[voice].keyon_reg = blocknum;
opl3              546 sound/drivers/opl3/opl3_midi.c 	opl3->command(opl3, opl3_reg, blocknum);
opl3              550 sound/drivers/opl3/opl3_midi.c 		opl3->voices[voice].note_off = jiffies +
opl3              552 sound/drivers/opl3/opl3_midi.c 		snd_opl3_start_timer(opl3);
opl3              553 sound/drivers/opl3/opl3_midi.c 		opl3->voices[voice].note_off_check = 1;
opl3              555 sound/drivers/opl3/opl3_midi.c 		opl3->voices[voice].note_off_check = 0;
opl3              561 sound/drivers/opl3/opl3_midi.c 	vp->time = opl3->use_time++;
opl3              568 sound/drivers/opl3/opl3_midi.c 		vp2 = &opl3->voices[voice + 3];
opl3              569 sound/drivers/opl3/opl3_midi.c 		vp2->time = opl3->use_time++;
opl3              576 sound/drivers/opl3/opl3_midi.c 			vp2 = &opl3->voices[voice + 3];
opl3              577 sound/drivers/opl3/opl3_midi.c 			vp2->time = opl3->use_time++;
opl3              584 sound/drivers/opl3/opl3_midi.c 	debug_alloc(opl3, "note on ", voice);
opl3              602 sound/drivers/opl3/opl3_midi.c 	spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              605 sound/drivers/opl3/opl3_midi.c static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
opl3              616 sound/drivers/opl3/opl3_midi.c 	vp = &opl3->voices[voice];
opl3              633 sound/drivers/opl3/opl3_midi.c 	opl3->command(opl3, opl3_reg, vp->keyon_reg);
opl3              636 sound/drivers/opl3/opl3_midi.c 	vp->time = opl3->use_time++;
opl3              639 sound/drivers/opl3/opl3_midi.c 		vp2 = &opl3->voices[voice + 3];
opl3              641 sound/drivers/opl3/opl3_midi.c 		vp2->time = opl3->use_time++;
opl3              646 sound/drivers/opl3/opl3_midi.c 	debug_alloc(opl3, "note off", voice);
opl3              657 sound/drivers/opl3/opl3_midi.c   	struct snd_opl3 *opl3;
opl3              662 sound/drivers/opl3/opl3_midi.c 	opl3 = p;
opl3              669 sound/drivers/opl3/opl3_midi.c 	if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
opl3              671 sound/drivers/opl3/opl3_midi.c 			snd_opl3_drum_switch(opl3, note, vel, 0, chan);
opl3              676 sound/drivers/opl3/opl3_midi.c 		for (voice = 0; voice < opl3->max_voices; voice++) {
opl3              677 sound/drivers/opl3/opl3_midi.c 			vp = &opl3->voices[voice];
opl3              679 sound/drivers/opl3/opl3_midi.c 				snd_opl3_kill_voice(opl3, voice);
opl3              686 sound/drivers/opl3/opl3_midi.c 			snd_opl3_kill_voice(opl3, voice);
opl3              694 sound/drivers/opl3/opl3_midi.c 	struct snd_opl3 *opl3 = p;
opl3              697 sound/drivers/opl3/opl3_midi.c 	spin_lock_irqsave(&opl3->voice_lock, flags);
opl3              699 sound/drivers/opl3/opl3_midi.c 	spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              724 sound/drivers/opl3/opl3_midi.c static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
opl3              737 sound/drivers/opl3/opl3_midi.c 	vp = &opl3->voices[voice];
opl3              755 sound/drivers/opl3/opl3_midi.c 	opl3->command(opl3, opl3_reg, fnum);
opl3              764 sound/drivers/opl3/opl3_midi.c 	opl3->command(opl3, opl3_reg, blocknum);
opl3              766 sound/drivers/opl3/opl3_midi.c 	vp->time = opl3->use_time++;
opl3              772 sound/drivers/opl3/opl3_midi.c static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan)
opl3              779 sound/drivers/opl3/opl3_midi.c 	spin_lock_irqsave(&opl3->voice_lock, flags);
opl3              781 sound/drivers/opl3/opl3_midi.c 	if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
opl3              782 sound/drivers/opl3/opl3_midi.c 		for (voice = 0; voice < opl3->max_voices; voice++) {
opl3              783 sound/drivers/opl3/opl3_midi.c 			vp = &opl3->voices[voice];
opl3              785 sound/drivers/opl3/opl3_midi.c 				snd_opl3_update_pitch(opl3, voice);
opl3              792 sound/drivers/opl3/opl3_midi.c 			snd_opl3_update_pitch(opl3, voice);
opl3              795 sound/drivers/opl3/opl3_midi.c 	spin_unlock_irqrestore(&opl3->voice_lock, flags);
opl3              804 sound/drivers/opl3/opl3_midi.c   	struct snd_opl3 *opl3;
opl3              806 sound/drivers/opl3/opl3_midi.c 	opl3 = p;
opl3              815 sound/drivers/opl3/opl3_midi.c 			opl3->drum_reg |= OPL3_VIBRATO_DEPTH;
opl3              817 sound/drivers/opl3/opl3_midi.c 			opl3->drum_reg &= ~OPL3_VIBRATO_DEPTH;
opl3              818 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION,
opl3              819 sound/drivers/opl3/opl3_midi.c 				 opl3->drum_reg);
opl3              823 sound/drivers/opl3/opl3_midi.c 			opl3->drum_reg |= OPL3_TREMOLO_DEPTH;
opl3              825 sound/drivers/opl3/opl3_midi.c 			opl3->drum_reg &= ~OPL3_TREMOLO_DEPTH;
opl3              826 sound/drivers/opl3/opl3_midi.c 		opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION,
opl3              827 sound/drivers/opl3/opl3_midi.c 				 opl3->drum_reg);
opl3              830 sound/drivers/opl3/opl3_midi.c 		snd_opl3_pitch_ctrl(opl3, chan);
opl3               31 sound/drivers/opl3/opl3_oss.c 	struct snd_opl3 *opl3 = private_data;
opl3               34 sound/drivers/opl3/opl3_oss.c 		snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset);
opl3               42 sound/drivers/opl3/opl3_oss.c 	struct snd_opl3 *opl3 = private_data;
opl3               44 sound/drivers/opl3/opl3_oss.c 	snd_midi_channel_free_set(opl3->oss_chset);
opl3               47 sound/drivers/opl3/opl3_oss.c static int snd_opl3_oss_create_port(struct snd_opl3 * opl3)
opl3               53 sound/drivers/opl3/opl3_oss.c 	voices = (opl3->hardware < OPL3_HW_OPL3) ?
opl3               55 sound/drivers/opl3/opl3_oss.c 	opl3->oss_chset = snd_midi_channel_alloc_set(voices);
opl3               56 sound/drivers/opl3/opl3_oss.c 	if (opl3->oss_chset == NULL)
opl3               58 sound/drivers/opl3/opl3_oss.c 	opl3->oss_chset->private_data = opl3;
opl3               64 sound/drivers/opl3/opl3_oss.c 	callbacks.private_data = opl3;
opl3               66 sound/drivers/opl3/opl3_oss.c 	opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
opl3               69 sound/drivers/opl3/opl3_oss.c 	opl3->oss_chset->client = opl3->seq_client;
opl3               70 sound/drivers/opl3/opl3_oss.c 	opl3->oss_chset->port = snd_seq_event_port_attach(opl3->seq_client, &callbacks,
opl3               78 sound/drivers/opl3/opl3_oss.c 	if (opl3->oss_chset->port < 0) {
opl3               80 sound/drivers/opl3/opl3_oss.c 		port = opl3->oss_chset->port;
opl3               81 sound/drivers/opl3/opl3_oss.c 		snd_midi_channel_free_set(opl3->oss_chset);
opl3               90 sound/drivers/opl3/opl3_oss.c void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name)
opl3               95 sound/drivers/opl3/opl3_oss.c 	if (snd_seq_device_new(opl3->card, 0, SNDRV_SEQ_DEV_ID_OSS,
opl3               99 sound/drivers/opl3/opl3_oss.c 	opl3->oss_seq_dev = dev;
opl3              103 sound/drivers/opl3/opl3_oss.c 	if (opl3->hardware < OPL3_HW_OPL3) {
opl3              111 sound/drivers/opl3/opl3_oss.c 	arg->private_data = opl3;
opl3              113 sound/drivers/opl3/opl3_oss.c 	if (snd_opl3_oss_create_port(opl3)) {
opl3              115 sound/drivers/opl3/opl3_oss.c 		snd_device_register(opl3->card, dev);
opl3              120 sound/drivers/opl3/opl3_oss.c void snd_opl3_free_seq_oss(struct snd_opl3 *opl3)
opl3              122 sound/drivers/opl3/opl3_oss.c 	if (opl3->oss_seq_dev) {
opl3              124 sound/drivers/opl3/opl3_oss.c 		opl3->oss_seq_dev = NULL;
opl3              133 sound/drivers/opl3/opl3_oss.c 	struct snd_opl3 *opl3 = closure;
opl3              139 sound/drivers/opl3/opl3_oss.c 	if ((err = snd_opl3_synth_setup(opl3)) < 0)
opl3              143 sound/drivers/opl3/opl3_oss.c 	arg->private_data = opl3;
opl3              144 sound/drivers/opl3/opl3_oss.c 	arg->addr.client = opl3->oss_chset->client;
opl3              145 sound/drivers/opl3/opl3_oss.c 	arg->addr.port = opl3->oss_chset->port;
opl3              147 sound/drivers/opl3/opl3_oss.c 	if ((err = snd_opl3_synth_use_inc(opl3)) < 0)
opl3              150 sound/drivers/opl3/opl3_oss.c 	opl3->synth_mode = SNDRV_OPL3_MODE_SYNTH;
opl3              157 sound/drivers/opl3/opl3_oss.c 	struct snd_opl3 *opl3;
opl3              161 sound/drivers/opl3/opl3_oss.c 	opl3 = arg->private_data;
opl3              163 sound/drivers/opl3/opl3_oss.c 	snd_opl3_synth_cleanup(opl3);
opl3              165 sound/drivers/opl3/opl3_oss.c 	snd_opl3_synth_use_dec(opl3);
opl3              177 sound/drivers/opl3/opl3_oss.c 	struct snd_opl3 *opl3;
opl3              184 sound/drivers/opl3/opl3_oss.c 	opl3 = arg->private_data;
opl3              209 sound/drivers/opl3/opl3_oss.c 	err = snd_opl3_load_patch(opl3, sbi.channel, 127, type, name, NULL,
opl3               25 sound/drivers/opl3/opl3_seq.c int snd_opl3_synth_use_inc(struct snd_opl3 * opl3)
opl3               27 sound/drivers/opl3/opl3_seq.c 	if (!try_module_get(opl3->card->module))
opl3               33 sound/drivers/opl3/opl3_seq.c void snd_opl3_synth_use_dec(struct snd_opl3 * opl3)
opl3               35 sound/drivers/opl3/opl3_seq.c 	module_put(opl3->card->module);
opl3               38 sound/drivers/opl3/opl3_seq.c int snd_opl3_synth_setup(struct snd_opl3 * opl3)
opl3               41 sound/drivers/opl3/opl3_seq.c 	struct snd_hwdep *hwdep = opl3->hwdep;
opl3               51 sound/drivers/opl3/opl3_seq.c 	snd_opl3_reset(opl3);
opl3               54 sound/drivers/opl3/opl3_seq.c 		opl3->voices[idx].state = SNDRV_OPL3_ST_OFF;
opl3               55 sound/drivers/opl3/opl3_seq.c 		opl3->voices[idx].time = 0;
opl3               56 sound/drivers/opl3/opl3_seq.c 		opl3->voices[idx].keyon_reg = 0x00;
opl3               58 sound/drivers/opl3/opl3_seq.c 	opl3->use_time = 0;
opl3               59 sound/drivers/opl3/opl3_seq.c 	opl3->connection_reg = 0x00;
opl3               60 sound/drivers/opl3/opl3_seq.c 	if (opl3->hardware >= OPL3_HW_OPL3) {
opl3               62 sound/drivers/opl3/opl3_seq.c 		opl3->command(opl3, OPL3_RIGHT | OPL3_REG_CONNECTION_SELECT,
opl3               63 sound/drivers/opl3/opl3_seq.c 				 opl3->connection_reg);
opl3               64 sound/drivers/opl3/opl3_seq.c 		opl3->max_voices = MAX_OPL3_VOICES;
opl3               69 sound/drivers/opl3/opl3_seq.c void snd_opl3_synth_cleanup(struct snd_opl3 * opl3)
opl3               75 sound/drivers/opl3/opl3_seq.c 	spin_lock_irqsave(&opl3->sys_timer_lock, flags);
opl3               76 sound/drivers/opl3/opl3_seq.c 	if (opl3->sys_timer_status) {
opl3               77 sound/drivers/opl3/opl3_seq.c 		del_timer(&opl3->tlist);
opl3               78 sound/drivers/opl3/opl3_seq.c 		opl3->sys_timer_status = 0;
opl3               80 sound/drivers/opl3/opl3_seq.c 	spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
opl3               82 sound/drivers/opl3/opl3_seq.c 	snd_opl3_reset(opl3);
opl3               83 sound/drivers/opl3/opl3_seq.c 	hwdep = opl3->hwdep;
opl3               92 sound/drivers/opl3/opl3_seq.c 	struct snd_opl3 *opl3 = private_data;
opl3               95 sound/drivers/opl3/opl3_seq.c 	if ((err = snd_opl3_synth_setup(opl3)) < 0)
opl3              100 sound/drivers/opl3/opl3_seq.c 		opl3->voices[6].state = opl3->voices[7].state = 
opl3              101 sound/drivers/opl3/opl3_seq.c 			opl3->voices[8].state = SNDRV_OPL3_ST_NOT_AVAIL;
opl3              102 sound/drivers/opl3/opl3_seq.c 		snd_opl3_load_drums(opl3);
opl3              103 sound/drivers/opl3/opl3_seq.c 		opl3->drum_reg = OPL3_PERCUSSION_ENABLE;
opl3              104 sound/drivers/opl3/opl3_seq.c 		opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION, opl3->drum_reg);
opl3              106 sound/drivers/opl3/opl3_seq.c 		opl3->drum_reg = 0x00;
opl3              110 sound/drivers/opl3/opl3_seq.c 		if ((err = snd_opl3_synth_use_inc(opl3)) < 0)
opl3              113 sound/drivers/opl3/opl3_seq.c 	opl3->synth_mode = SNDRV_OPL3_MODE_SEQ;
opl3              119 sound/drivers/opl3/opl3_seq.c 	struct snd_opl3 *opl3 = private_data;
opl3              121 sound/drivers/opl3/opl3_seq.c 	snd_opl3_synth_cleanup(opl3);
opl3              124 sound/drivers/opl3/opl3_seq.c 		snd_opl3_synth_use_dec(opl3);
opl3              144 sound/drivers/opl3/opl3_seq.c 	struct snd_opl3 *opl3 = private_data;
opl3              146 sound/drivers/opl3/opl3_seq.c 	snd_midi_process_event(&opl3_ops, ev, opl3->chset);
opl3              154 sound/drivers/opl3/opl3_seq.c 	struct snd_opl3 *opl3 = private_data;
opl3              156 sound/drivers/opl3/opl3_seq.c 	snd_midi_channel_free_set(opl3->chset);
opl3              159 sound/drivers/opl3/opl3_seq.c static int snd_opl3_synth_create_port(struct snd_opl3 * opl3)
opl3              165 sound/drivers/opl3/opl3_seq.c 	voices = (opl3->hardware < OPL3_HW_OPL3) ?
opl3              167 sound/drivers/opl3/opl3_seq.c 	opl3->chset = snd_midi_channel_alloc_set(16);
opl3              168 sound/drivers/opl3/opl3_seq.c 	if (opl3->chset == NULL)
opl3              170 sound/drivers/opl3/opl3_seq.c 	opl3->chset->private_data = opl3;
opl3              178 sound/drivers/opl3/opl3_seq.c 	callbacks.private_data = opl3;
opl3              180 sound/drivers/opl3/opl3_seq.c 	opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
opl3              183 sound/drivers/opl3/opl3_seq.c 	opl3->chset->client = opl3->seq_client;
opl3              184 sound/drivers/opl3/opl3_seq.c 	opl3->chset->port = snd_seq_event_port_attach(opl3->seq_client, &callbacks,
opl3              194 sound/drivers/opl3/opl3_seq.c 	if (opl3->chset->port < 0) {
opl3              196 sound/drivers/opl3/opl3_seq.c 		port = opl3->chset->port;
opl3              197 sound/drivers/opl3/opl3_seq.c 		snd_midi_channel_free_set(opl3->chset);
opl3              208 sound/drivers/opl3/opl3_seq.c 	struct snd_opl3 *opl3;
opl3              213 sound/drivers/opl3/opl3_seq.c 	opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
opl3              214 sound/drivers/opl3/opl3_seq.c 	if (opl3 == NULL)
opl3              217 sound/drivers/opl3/opl3_seq.c 	spin_lock_init(&opl3->voice_lock);
opl3              219 sound/drivers/opl3/opl3_seq.c 	opl3->seq_client = -1;
opl3              222 sound/drivers/opl3/opl3_seq.c 	opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
opl3              224 sound/drivers/opl3/opl3_seq.c 	client = opl3->seq_client =
opl3              225 sound/drivers/opl3/opl3_seq.c 		snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num,
opl3              230 sound/drivers/opl3/opl3_seq.c 	if ((err = snd_opl3_synth_create_port(opl3)) < 0) {
opl3              232 sound/drivers/opl3/opl3_seq.c 		opl3->seq_client = -1;
opl3              237 sound/drivers/opl3/opl3_seq.c 	timer_setup(&opl3->tlist, snd_opl3_timer_func, 0);
opl3              238 sound/drivers/opl3/opl3_seq.c 	spin_lock_init(&opl3->sys_timer_lock);
opl3              239 sound/drivers/opl3/opl3_seq.c 	opl3->sys_timer_status = 0;
opl3              242 sound/drivers/opl3/opl3_seq.c 	snd_opl3_init_seq_oss(opl3, name);
opl3              250 sound/drivers/opl3/opl3_seq.c 	struct snd_opl3 *opl3;
opl3              252 sound/drivers/opl3/opl3_seq.c 	opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
opl3              253 sound/drivers/opl3/opl3_seq.c 	if (opl3 == NULL)
opl3              257 sound/drivers/opl3/opl3_seq.c 	snd_opl3_free_seq_oss(opl3);
opl3              259 sound/drivers/opl3/opl3_seq.c 	if (opl3->seq_client >= 0) {
opl3              260 sound/drivers/opl3/opl3_seq.c 		snd_seq_delete_kernel_client(opl3->seq_client);
opl3              261 sound/drivers/opl3/opl3_seq.c 		opl3->seq_client = -1;
opl3               60 sound/drivers/opl3/opl3_synth.c static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note);
opl3               61 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice);
opl3               62 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params);
opl3               63 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode);
opl3               64 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection);
opl3               82 sound/drivers/opl3/opl3_synth.c 	struct snd_opl3 *opl3 = hw->private_data;
opl3               85 sound/drivers/opl3/opl3_synth.c 	if (snd_BUG_ON(!opl3))
opl3               94 sound/drivers/opl3/opl3_synth.c 			info.fm_mode = opl3->fm_mode;
opl3               95 sound/drivers/opl3/opl3_synth.c 			info.rhythm = opl3->rhythm;
opl3              105 sound/drivers/opl3/opl3_synth.c 		snd_opl3_reset(opl3);
opl3              116 sound/drivers/opl3/opl3_synth.c 			return snd_opl3_play_note(opl3, &note);
opl3              127 sound/drivers/opl3/opl3_synth.c 			return snd_opl3_set_voice(opl3, &voice);
opl3              138 sound/drivers/opl3/opl3_synth.c 			return snd_opl3_set_params(opl3, &params);
opl3              145 sound/drivers/opl3/opl3_synth.c 		return snd_opl3_set_mode(opl3, (int) arg);
opl3              151 sound/drivers/opl3/opl3_synth.c 		return snd_opl3_set_connection(opl3, (int) arg);
opl3              155 sound/drivers/opl3/opl3_synth.c 		snd_opl3_clear_patches(opl3);
opl3              172 sound/drivers/opl3/opl3_synth.c 	struct snd_opl3 *opl3 = hw->private_data;
opl3              174 sound/drivers/opl3/opl3_synth.c 	snd_opl3_reset(opl3);
opl3              185 sound/drivers/opl3/opl3_synth.c 	struct snd_opl3 *opl3 = hw->private_data;
opl3              201 sound/drivers/opl3/opl3_synth.c 		err = snd_opl3_load_patch(opl3, inst.prog, inst.bank, type,
opl3              239 sound/drivers/opl3/opl3_synth.c int snd_opl3_load_patch(struct snd_opl3 *opl3,
opl3              248 sound/drivers/opl3/opl3_synth.c 	patch = snd_opl3_find_patch(opl3, prog, bank, 1);
opl3              302 sound/drivers/opl3/opl3_synth.c struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank,
opl3              309 sound/drivers/opl3/opl3_synth.c 	for (patch = opl3->patch_table[key]; patch; patch = patch->next) {
opl3              321 sound/drivers/opl3/opl3_synth.c 	patch->next = opl3->patch_table[key];
opl3              322 sound/drivers/opl3/opl3_synth.c 	opl3->patch_table[key] = patch;
opl3              330 sound/drivers/opl3/opl3_synth.c void snd_opl3_clear_patches(struct snd_opl3 *opl3)
opl3              335 sound/drivers/opl3/opl3_synth.c 		for (patch = opl3->patch_table[i]; patch; patch = next) {
opl3              340 sound/drivers/opl3/opl3_synth.c 	memset(opl3->patch_table, 0, sizeof(opl3->patch_table));
opl3              346 sound/drivers/opl3/opl3_synth.c void snd_opl3_reset(struct snd_opl3 * opl3)
opl3              355 sound/drivers/opl3/opl3_synth.c 	max_voices = (opl3->hardware < OPL3_HW_OPL3) ?
opl3              370 sound/drivers/opl3/opl3_synth.c 		opl3->command(opl3, opl3_reg, OPL3_TOTAL_LEVEL_MASK); /* Operator 1 volume */
opl3              372 sound/drivers/opl3/opl3_synth.c 		opl3->command(opl3, opl3_reg, OPL3_TOTAL_LEVEL_MASK); /* Operator 2 volume */
opl3              375 sound/drivers/opl3/opl3_synth.c 		opl3->command(opl3, opl3_reg, 0x00);	/* Note off */
opl3              378 sound/drivers/opl3/opl3_synth.c 	opl3->max_voices = MAX_OPL2_VOICES;
opl3              379 sound/drivers/opl3/opl3_synth.c 	opl3->fm_mode = SNDRV_DM_FM_MODE_OPL2;
opl3              381 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_TEST, OPL3_ENABLE_WAVE_SELECT);
opl3              382 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION, 0x00);	/* Melodic mode */
opl3              383 sound/drivers/opl3/opl3_synth.c 	opl3->rhythm = 0;
opl3              388 sound/drivers/opl3/opl3_synth.c static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note)
opl3              398 sound/drivers/opl3/opl3_synth.c 	if (note->voice >= ((opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) ?
opl3              416 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              429 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              435 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice)
opl3              449 sound/drivers/opl3/opl3_synth.c 	if (voice->voice >= ((opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) ?
opl3              486 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              495 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              504 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              513 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              521 sound/drivers/opl3/opl3_synth.c 	if (opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) {
opl3              529 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              534 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, opl3_reg, reg_val);
opl3              539 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params)
opl3              547 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_KBD_SPLIT, reg_val);
opl3              559 sound/drivers/opl3/opl3_synth.c 		opl3->rhythm = 1;
opl3              561 sound/drivers/opl3/opl3_synth.c 		opl3->rhythm = 0;
opl3              575 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION, reg_val);
opl3              579 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode)
opl3              581 sound/drivers/opl3/opl3_synth.c 	if ((mode == SNDRV_DM_FM_MODE_OPL3) && (opl3->hardware < OPL3_HW_OPL3))
opl3              584 sound/drivers/opl3/opl3_synth.c 	opl3->fm_mode = mode;
opl3              585 sound/drivers/opl3/opl3_synth.c 	if (opl3->hardware >= OPL3_HW_OPL3)
opl3              586 sound/drivers/opl3/opl3_synth.c 		opl3->command(opl3, OPL3_RIGHT | OPL3_REG_CONNECTION_SELECT, 0x00);	/* Clear 4-op connections */
opl3              591 sound/drivers/opl3/opl3_synth.c static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection)
opl3              596 sound/drivers/opl3/opl3_synth.c 	if (opl3->fm_mode != SNDRV_DM_FM_MODE_OPL3)
opl3              602 sound/drivers/opl3/opl3_synth.c 	opl3->command(opl3, OPL3_RIGHT | OPL3_REG_CONNECTION_SELECT, reg_val);
opl3               12 sound/drivers/opl3/opl3_voice.h int snd_opl3_synth_use_inc(struct snd_opl3 * opl3);
opl3               13 sound/drivers/opl3/opl3_voice.h void snd_opl3_synth_use_dec(struct snd_opl3 * opl3);
opl3               14 sound/drivers/opl3/opl3_voice.h int snd_opl3_synth_setup(struct snd_opl3 * opl3);
opl3               15 sound/drivers/opl3/opl3_voice.h void snd_opl3_synth_cleanup(struct snd_opl3 * opl3);
opl3               30 sound/drivers/opl3/opl3_voice.h void snd_opl3_load_drums(struct snd_opl3 *opl3);
opl3               31 sound/drivers/opl3/opl3_voice.h void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan);
opl3               35 sound/drivers/opl3/opl3_voice.h void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name);
opl3               36 sound/drivers/opl3/opl3_voice.h void snd_opl3_free_seq_oss(struct snd_opl3 *opl3);
opl3               38 sound/drivers/opl3/opl3_voice.h #define snd_opl3_init_seq_oss(opl3, name) /* NOP */
opl3               39 sound/drivers/opl3/opl3_voice.h #define snd_opl3_free_seq_oss(opl3) /* NOP */
opl3              185 sound/drivers/opl4/opl4_lib.c 	struct snd_opl3 *opl3;
opl3              227 sound/drivers/opl4/opl4_lib.c 	err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3);
opl3              246 sound/drivers/opl4/opl4_lib.c 		*ropl3 = opl3;
opl3              132 sound/isa/ad1816a/ad1816a.c 	struct snd_opl3 *opl3;
opl3              188 sound/isa/ad1816a/ad1816a.c 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
opl3              191 sound/isa/ad1816a/ad1816a.c 			error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3               54 sound/isa/adlib.c 	struct snd_opl3 *opl3;
opl3               75 sound/isa/adlib.c 	error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3);
opl3               81 sound/isa/adlib.c 	error = snd_opl3_hwdep_new(opl3, 0, 0, NULL);
opl3              182 sound/isa/als100.c 	struct snd_opl3 *opl3;
opl3              255 sound/isa/als100.c 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
opl3              259 sound/isa/als100.c 			if ((error = snd_opl3_timer_new(opl3, 0, 1)) < 0) {
opl3              263 sound/isa/als100.c 			if ((error = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3              173 sound/isa/azt2320.c 	struct snd_opl3 *opl3;
opl3              232 sound/isa/azt2320.c 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
opl3              236 sound/isa/azt2320.c 			if ((error = snd_opl3_timer_new(opl3, 1, 2)) < 0) {
opl3              240 sound/isa/azt2320.c 			if ((error = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3              221 sound/isa/cmi8328.c 	struct snd_opl3 *opl3;
opl3              359 sound/isa/cmi8328.c 	if (snd_opl3_create(card, 0x388, 0x38a, OPL3_HW_AUTO, 0, &opl3) < 0)
opl3              362 sound/isa/cmi8328.c 		if (snd_opl3_hwdep_new(opl3, 0, 1, NULL) < 0)
opl3              525 sound/isa/cmi8330.c 	struct snd_opl3 *opl3;
opl3              572 sound/isa/cmi8330.c 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
opl3              577 sound/isa/cmi8330.c 			err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3              372 sound/isa/cs423x/cs4236.c 	struct snd_opl3 *opl3;
opl3              427 sound/isa/cs423x/cs4236.c 				    OPL3_HW_OPL3_CS, 0, &opl3) < 0) {
opl3              430 sound/isa/cs423x/cs4236.c 			if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0)
opl3              125 sound/isa/es1688/es1688.c 	struct snd_opl3 *opl3;
opl3              147 sound/isa/es1688/es1688.c 				OPL3_HW_OPL3, 0, &opl3) < 0)
opl3              151 sound/isa/es1688/es1688.c 			error =	snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3             2112 sound/isa/es18xx.c 	struct snd_opl3 *opl3;
opl3             2145 sound/isa/es18xx.c 				    OPL3_HW_OPL3, 0, &opl3) < 0) {
opl3             2150 sound/isa/es18xx.c 			err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3              582 sound/isa/galaxy/galaxy.c 		struct snd_opl3 *opl3;
opl3              585 sound/isa/galaxy/galaxy.c 				      OPL3_HW_AUTO, 0, &opl3);
opl3              590 sound/isa/galaxy/galaxy.c 		err = snd_opl3_timer_new(opl3, 1, 2);
opl3              594 sound/isa/galaxy/galaxy.c 		err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3              227 sound/isa/gus/gusextreme.c 	struct snd_opl3 *opl3;
opl3              297 sound/isa/gus/gusextreme.c 			OPL3_HW_OPL3, 0, &opl3) < 0)
opl3              300 sound/isa/gus/gusextreme.c 		error = snd_opl3_hwdep_new(opl3, 0, 2, NULL);
opl3              640 sound/isa/opl3sa2.c 	struct snd_opl3 *opl3;
opl3              686 sound/isa/opl3sa2.c 					   OPL3_HW_OPL3, 0, &opl3)) < 0)
opl3              688 sound/isa/opl3sa2.c 		if ((err = snd_opl3_timer_new(opl3, 1, 2)) < 0)
opl3              690 sound/isa/opl3sa2.c 		if ((err = snd_opl3_hwdep_new(opl3, 0, 1, &chip->synth)) < 0)
opl3             1364 sound/isa/opti9xx/miro.c 		struct snd_opl3 *opl3 = NULL;
opl3             1368 sound/isa/opti9xx/miro.c 				    2, &opl3, &opl4) < 0)
opl3              900 sound/isa/opti9xx/opti92x-ad1848.c 		struct snd_opl3 *opl3 = NULL;
opl3              910 sound/isa/opti9xx/opti92x-ad1848.c 					    2, &opl3, &opl4) < 0) {
opl3              917 sound/isa/opti9xx/opti92x-ad1848.c 		if (!opl3 && snd_opl3_create(card, fm_port, fm_port + 2,
opl3              918 sound/isa/opti9xx/opti92x-ad1848.c 					     OPL3_HW_AUTO, 0, &opl3) < 0) {
opl3              922 sound/isa/opti9xx/opti92x-ad1848.c 		if (opl3) {
opl3              923 sound/isa/opti9xx/opti92x-ad1848.c 			error = snd_opl3_hwdep_new(opl3, 0, 1, &synth);
opl3              226 sound/isa/sb/jazz16.c 	struct snd_opl3 *opl3;
opl3              308 sound/isa/sb/jazz16.c 			      OPL3_HW_AUTO, 1, &opl3);
opl3              313 sound/isa/sb/jazz16.c 		err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3              331 sound/isa/sb/sb16.c 	struct snd_opl3 *opl3;
opl3              399 sound/isa/sb/sb16.c 				    &opl3) < 0) {
opl3              408 sound/isa/sb/sb16.c 			if ((err = snd_opl3_hwdep_new(opl3, 0, seqdev, &synth)) < 0)
opl3               87 sound/isa/sb/sb8.c 	struct snd_opl3 *opl3;
opl3              158 sound/isa/sb/sb8.c 					   &opl3)) < 0) {
opl3              164 sound/isa/sb/sb8.c 					   &opl3)) < 0) {
opl3              170 sound/isa/sb/sb8.c 		if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0)
opl3              544 sound/isa/sc6000.c 	struct snd_opl3 *opl3;
opl3              633 sound/isa/sc6000.c 			    OPL3_HW_AUTO, 0, &opl3) < 0) {
opl3              637 sound/isa/sc6000.c 		err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3              381 sound/isa/wavefront/wavefront.c 		struct snd_opl3 *opl3;
opl3              384 sound/isa/wavefront/wavefront.c 				      OPL3_HW_OPL3_CS, 0, &opl3);
opl3              390 sound/isa/wavefront/wavefront.c 		err = snd_opl3_hwdep_new(opl3, hw_dev, 1, NULL);
opl3              113 sound/pci/als300.c 	struct snd_opl3 *opl3;
opl3              844 sound/pci/als4000.c 	struct snd_opl3 *opl3;
opl3              942 sound/pci/als4000.c 			    OPL3_HW_AUTO, 1, &opl3) < 0) {
opl3              947 sound/pci/als4000.c 		if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3             2505 sound/pci/azt3328.c 	struct snd_opl3 *opl3;
opl3             2556 sound/pci/azt3328.c 			    OPL3_HW_AUTO, 1, &opl3) < 0) {
opl3             2562 sound/pci/azt3328.c 		err = snd_opl3_timer_new(opl3, 1, 2);
opl3             2565 sound/pci/azt3328.c 		err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
opl3             2568 sound/pci/azt3328.c 		opl3->private_data = chip;
opl3             2945 sound/pci/cmipci.c 	struct snd_opl3 *opl3;
opl3             2955 sound/pci/cmipci.c 				      OPL3_HW_OPL3, 1, &opl3);
opl3             2976 sound/pci/cmipci.c 				    OPL3_HW_OPL3, 0, &opl3) < 0) {
opl3             2983 sound/pci/cmipci.c 	if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3             1861 sound/pci/cs4281.c static void snd_cs4281_opl3_command(struct snd_opl3 *opl3, unsigned short cmd,
opl3             1865 sound/pci/cs4281.c 	struct cs4281 *chip = opl3->private_data;
opl3             1873 sound/pci/cs4281.c 	spin_lock_irqsave(&opl3->reg_lock, flags);
opl3             1881 sound/pci/cs4281.c 	spin_unlock_irqrestore(&opl3->reg_lock, flags);
opl3             1890 sound/pci/cs4281.c 	struct snd_opl3 *opl3;
opl3             1923 sound/pci/cs4281.c 	if ((err = snd_opl3_new(card, OPL3_HW_OPL3_CS4281, &opl3)) < 0) {
opl3             1927 sound/pci/cs4281.c 	opl3->private_data = chip;
opl3             1928 sound/pci/cs4281.c 	opl3->command = snd_cs4281_opl3_command;
opl3             1929 sound/pci/cs4281.c 	snd_opl3_init(opl3);
opl3             1930 sound/pci/cs4281.c 	if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3             1771 sound/pci/es1938.c 	struct snd_opl3 *opl3;
opl3             1816 sound/pci/es1938.c 			    OPL3_HW_OPL3, 1, &opl3) < 0) {
opl3             1820 sound/pci/es1938.c 	        if ((err = snd_opl3_timer_new(opl3, 0, 1)) < 0) {
opl3             1824 sound/pci/es1938.c 	        if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3             1308 sound/pci/fm801.c 	struct snd_opl3 *opl3;
opl3             1355 sound/pci/fm801.c 				   OPL3_HW_OPL3_FM801, 1, &opl3)) < 0) {
opl3             1359 sound/pci/fm801.c 	if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3              425 sound/pci/riptide/riptide.c 	struct snd_opl3 *opl3;
opl3             2105 sound/pci/riptide/riptide.c 				      OPL3_HW_RIPTIDE, 0, &chip->opl3);
opl3             2112 sound/pci/riptide/riptide.c 			err = snd_opl3_hwdep_new(chip->opl3, 0, 1, NULL);
opl3             1439 sound/pci/sonicvibes.c 	struct snd_opl3 *opl3;
opl3             1495 sound/pci/sonicvibes.c 				   OPL3_HW_OPL3_SV, 1, &opl3)) < 0) {
opl3             1499 sound/pci/sonicvibes.c 	if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
opl3              167 sound/pci/ymfpci/ymfpci.c 	struct snd_opl3 *opl3;
opl3              312 sound/pci/ymfpci/ymfpci.c 					   OPL3_HW_OPL3, 1, &opl3)) < 0) {
opl3              318 sound/pci/ymfpci/ymfpci.c 		} else if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {