opl4               17 include/sound/opl4.h 			   struct snd_opl3 **opl3, struct snd_opl4 **opl4);
opl4               19 sound/drivers/opl4/opl4_lib.c static inline void snd_opl4_wait(struct snd_opl4 *opl4)
opl4               22 sound/drivers/opl4/opl4_lib.c 	while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0)
opl4               26 sound/drivers/opl4/opl4_lib.c void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value)
opl4               28 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               29 sound/drivers/opl4/opl4_lib.c 	outb(reg, opl4->pcm_port);
opl4               31 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               32 sound/drivers/opl4/opl4_lib.c 	outb(value, opl4->pcm_port + 1);
opl4               37 sound/drivers/opl4/opl4_lib.c u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg)
opl4               39 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               40 sound/drivers/opl4/opl4_lib.c 	outb(reg, opl4->pcm_port);
opl4               42 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               43 sound/drivers/opl4/opl4_lib.c 	return inb(opl4->pcm_port + 1);
opl4               48 sound/drivers/opl4/opl4_lib.c void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size)
opl4               53 sound/drivers/opl4/opl4_lib.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4               55 sound/drivers/opl4/opl4_lib.c 	memcfg = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION);
opl4               56 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg | OPL4_MODE_BIT);
opl4               58 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_HIGH, offset >> 16);
opl4               59 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_MID, offset >> 8);
opl4               60 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_LOW, offset);
opl4               62 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               63 sound/drivers/opl4/opl4_lib.c 	outb(OPL4_REG_MEMORY_DATA, opl4->pcm_port);
opl4               64 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               65 sound/drivers/opl4/opl4_lib.c 	insb(opl4->pcm_port + 1, buf, size);
opl4               67 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg);
opl4               69 sound/drivers/opl4/opl4_lib.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4               74 sound/drivers/opl4/opl4_lib.c void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size)
opl4               79 sound/drivers/opl4/opl4_lib.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4               81 sound/drivers/opl4/opl4_lib.c 	memcfg = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION);
opl4               82 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg | OPL4_MODE_BIT);
opl4               84 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_HIGH, offset >> 16);
opl4               85 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_MID, offset >> 8);
opl4               86 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_LOW, offset);
opl4               88 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               89 sound/drivers/opl4/opl4_lib.c 	outb(OPL4_REG_MEMORY_DATA, opl4->pcm_port);
opl4               90 sound/drivers/opl4/opl4_lib.c 	snd_opl4_wait(opl4);
opl4               91 sound/drivers/opl4/opl4_lib.c 	outsb(opl4->pcm_port + 1, buf, size);
opl4               93 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg);
opl4               95 sound/drivers/opl4/opl4_lib.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              100 sound/drivers/opl4/opl4_lib.c static void snd_opl4_enable_opl4(struct snd_opl4 *opl4)
opl4              102 sound/drivers/opl4/opl4_lib.c 	outb(OPL3_REG_MODE, opl4->fm_port + 2);
opl4              103 sound/drivers/opl4/opl4_lib.c 	inb(opl4->fm_port);
opl4              104 sound/drivers/opl4/opl4_lib.c 	inb(opl4->fm_port);
opl4              105 sound/drivers/opl4/opl4_lib.c 	outb(OPL3_OPL3_ENABLE | OPL3_OPL4_ENABLE, opl4->fm_port + 3);
opl4              106 sound/drivers/opl4/opl4_lib.c 	inb(opl4->fm_port);
opl4              107 sound/drivers/opl4/opl4_lib.c 	inb(opl4->fm_port);
opl4              110 sound/drivers/opl4/opl4_lib.c static int snd_opl4_detect(struct snd_opl4 *opl4)
opl4              114 sound/drivers/opl4/opl4_lib.c 	snd_opl4_enable_opl4(opl4);
opl4              116 sound/drivers/opl4/opl4_lib.c 	id1 = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION);
opl4              120 sound/drivers/opl4/opl4_lib.c 		opl4->hardware = OPL3_HW_OPL4;
opl4              123 sound/drivers/opl4/opl4_lib.c 		opl4->hardware = OPL3_HW_OPL4_ML;
opl4              129 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MIX_CONTROL_FM, 0x00);
opl4              130 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MIX_CONTROL_PCM, 0xff);
opl4              131 sound/drivers/opl4/opl4_lib.c 	id1 = snd_opl4_read(opl4, OPL4_REG_MIX_CONTROL_FM);
opl4              132 sound/drivers/opl4/opl4_lib.c 	id2 = snd_opl4_read(opl4, OPL4_REG_MIX_CONTROL_PCM);
opl4              137 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MIX_CONTROL_FM, 0x3f);
opl4              138 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MIX_CONTROL_PCM, 0x3f);
opl4              139 sound/drivers/opl4/opl4_lib.c 	snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, 0x00);
opl4              146 sound/drivers/opl4/opl4_lib.c 	struct snd_opl4 *opl4 = seq_dev->private_data;
opl4              147 sound/drivers/opl4/opl4_lib.c 	opl4->seq_dev = NULL;
opl4              150 sound/drivers/opl4/opl4_lib.c static int snd_opl4_create_seq_dev(struct snd_opl4 *opl4, int seq_device)
opl4              152 sound/drivers/opl4/opl4_lib.c 	opl4->seq_dev_num = seq_device;
opl4              153 sound/drivers/opl4/opl4_lib.c 	if (snd_seq_device_new(opl4->card, seq_device, SNDRV_SEQ_DEV_ID_OPL4,
opl4              154 sound/drivers/opl4/opl4_lib.c 			       sizeof(struct snd_opl4 *), &opl4->seq_dev) >= 0) {
opl4              155 sound/drivers/opl4/opl4_lib.c 		strcpy(opl4->seq_dev->name, "OPL4 Wavetable");
opl4              156 sound/drivers/opl4/opl4_lib.c 		*(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(opl4->seq_dev) = opl4;
opl4              157 sound/drivers/opl4/opl4_lib.c 		opl4->seq_dev->private_data = opl4;
opl4              158 sound/drivers/opl4/opl4_lib.c 		opl4->seq_dev->private_free = snd_opl4_seq_dev_free;
opl4              164 sound/drivers/opl4/opl4_lib.c static void snd_opl4_free(struct snd_opl4 *opl4)
opl4              166 sound/drivers/opl4/opl4_lib.c 	snd_opl4_free_proc(opl4);
opl4              167 sound/drivers/opl4/opl4_lib.c 	release_and_free_resource(opl4->res_fm_port);
opl4              168 sound/drivers/opl4/opl4_lib.c 	release_and_free_resource(opl4->res_pcm_port);
opl4              169 sound/drivers/opl4/opl4_lib.c 	kfree(opl4);
opl4              174 sound/drivers/opl4/opl4_lib.c 	struct snd_opl4 *opl4 = device->device_data;
opl4              175 sound/drivers/opl4/opl4_lib.c 	snd_opl4_free(opl4);
opl4              184 sound/drivers/opl4/opl4_lib.c 	struct snd_opl4 *opl4;
opl4              196 sound/drivers/opl4/opl4_lib.c 	opl4 = kzalloc(sizeof(*opl4), GFP_KERNEL);
opl4              197 sound/drivers/opl4/opl4_lib.c 	if (!opl4)
opl4              200 sound/drivers/opl4/opl4_lib.c 	opl4->res_fm_port = request_region(fm_port, 8, "OPL4 FM");
opl4              201 sound/drivers/opl4/opl4_lib.c 	opl4->res_pcm_port = request_region(pcm_port, 8, "OPL4 PCM/MIX");
opl4              202 sound/drivers/opl4/opl4_lib.c 	if (!opl4->res_fm_port || !opl4->res_pcm_port) {
opl4              204 sound/drivers/opl4/opl4_lib.c 		snd_opl4_free(opl4);
opl4              208 sound/drivers/opl4/opl4_lib.c 	opl4->card = card;
opl4              209 sound/drivers/opl4/opl4_lib.c 	opl4->fm_port = fm_port;
opl4              210 sound/drivers/opl4/opl4_lib.c 	opl4->pcm_port = pcm_port;
opl4              211 sound/drivers/opl4/opl4_lib.c 	spin_lock_init(&opl4->reg_lock);
opl4              212 sound/drivers/opl4/opl4_lib.c 	mutex_init(&opl4->access_mutex);
opl4              214 sound/drivers/opl4/opl4_lib.c 	err = snd_opl4_detect(opl4);
opl4              216 sound/drivers/opl4/opl4_lib.c 		snd_opl4_free(opl4);
opl4              221 sound/drivers/opl4/opl4_lib.c 	err = snd_device_new(card, SNDRV_DEV_CODEC, opl4, &ops);
opl4              223 sound/drivers/opl4/opl4_lib.c 		snd_opl4_free(opl4);
opl4              227 sound/drivers/opl4/opl4_lib.c 	err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3);
opl4              229 sound/drivers/opl4/opl4_lib.c 		snd_device_free(card, opl4);
opl4              234 sound/drivers/opl4/opl4_lib.c 	snd_opl4_enable_opl4(opl4);
opl4              236 sound/drivers/opl4/opl4_lib.c 	snd_opl4_create_mixer(opl4);
opl4              237 sound/drivers/opl4/opl4_lib.c 	snd_opl4_create_proc(opl4);
opl4              240 sound/drivers/opl4/opl4_lib.c 	opl4->seq_client = -1;
opl4              241 sound/drivers/opl4/opl4_lib.c 	if (opl4->hardware < OPL3_HW_OPL4_ML)
opl4              242 sound/drivers/opl4/opl4_lib.c 		snd_opl4_create_seq_dev(opl4, seq_device);
opl4              248 sound/drivers/opl4/opl4_lib.c 		*ropl4 = opl4;
opl4              202 sound/drivers/opl4/opl4_local.h void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value);
opl4              203 sound/drivers/opl4/opl4_local.h u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg);
opl4              204 sound/drivers/opl4/opl4_local.h void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size);
opl4              205 sound/drivers/opl4/opl4_local.h void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size);
opl4              208 sound/drivers/opl4/opl4_local.h int snd_opl4_create_mixer(struct snd_opl4 *opl4);
opl4              212 sound/drivers/opl4/opl4_local.h int snd_opl4_create_proc(struct snd_opl4 *opl4);
opl4              213 sound/drivers/opl4/opl4_local.h void snd_opl4_free_proc(struct snd_opl4 *opl4);
opl4              215 sound/drivers/opl4/opl4_local.h static inline int snd_opl4_create_proc(struct snd_opl4 *opl4) { return 0; }
opl4              216 sound/drivers/opl4/opl4_local.h static inline void snd_opl4_free_proc(struct snd_opl4 *opl4) {}
opl4              223 sound/drivers/opl4/opl4_local.h void snd_opl4_synth_reset(struct snd_opl4 *opl4);
opl4              224 sound/drivers/opl4/opl4_local.h void snd_opl4_synth_shutdown(struct snd_opl4 *opl4);
opl4              232 sound/drivers/opl4/opl4_local.h int snd_yrw801_detect(struct snd_opl4 *opl4);
opl4               21 sound/drivers/opl4/opl4_mixer.c 	struct snd_opl4 *opl4 = snd_kcontrol_chip(kcontrol);
opl4               26 sound/drivers/opl4/opl4_mixer.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4               27 sound/drivers/opl4/opl4_mixer.c 	value = snd_opl4_read(opl4, reg);
opl4               28 sound/drivers/opl4/opl4_mixer.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4               36 sound/drivers/opl4/opl4_mixer.c 	struct snd_opl4 *opl4 = snd_kcontrol_chip(kcontrol);
opl4               43 sound/drivers/opl4/opl4_mixer.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4               44 sound/drivers/opl4/opl4_mixer.c 	old_value = snd_opl4_read(opl4, reg);
opl4               45 sound/drivers/opl4/opl4_mixer.c 	snd_opl4_write(opl4, reg, value);
opl4               46 sound/drivers/opl4/opl4_mixer.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4               69 sound/drivers/opl4/opl4_mixer.c int snd_opl4_create_mixer(struct snd_opl4 *opl4)
opl4               71 sound/drivers/opl4/opl4_mixer.c 	struct snd_card *card = opl4->card;
opl4               77 sound/drivers/opl4/opl4_mixer.c 		err = snd_ctl_add(card, snd_ctl_new1(&snd_opl4_controls[i], opl4));
opl4               15 sound/drivers/opl4/opl4_proc.c 	struct snd_opl4 *opl4 = entry->private_data;
opl4               17 sound/drivers/opl4/opl4_proc.c 	mutex_lock(&opl4->access_mutex);
opl4               18 sound/drivers/opl4/opl4_proc.c 	if (opl4->memory_access) {
opl4               19 sound/drivers/opl4/opl4_proc.c 		mutex_unlock(&opl4->access_mutex);
opl4               22 sound/drivers/opl4/opl4_proc.c 	opl4->memory_access++;
opl4               23 sound/drivers/opl4/opl4_proc.c 	mutex_unlock(&opl4->access_mutex);
opl4               30 sound/drivers/opl4/opl4_proc.c 	struct snd_opl4 *opl4 = entry->private_data;
opl4               32 sound/drivers/opl4/opl4_proc.c 	mutex_lock(&opl4->access_mutex);
opl4               33 sound/drivers/opl4/opl4_proc.c 	opl4->memory_access--;
opl4               34 sound/drivers/opl4/opl4_proc.c 	mutex_unlock(&opl4->access_mutex);
opl4               43 sound/drivers/opl4/opl4_proc.c 	struct snd_opl4 *opl4 = entry->private_data;
opl4               49 sound/drivers/opl4/opl4_proc.c 	snd_opl4_read_memory(opl4, buf, pos, count);
opl4               64 sound/drivers/opl4/opl4_proc.c 	struct snd_opl4 *opl4 = entry->private_data;
opl4               74 sound/drivers/opl4/opl4_proc.c 	snd_opl4_write_memory(opl4, buf, pos, count);
opl4               86 sound/drivers/opl4/opl4_proc.c int snd_opl4_create_proc(struct snd_opl4 *opl4)
opl4               90 sound/drivers/opl4/opl4_proc.c 	entry = snd_info_create_card_entry(opl4->card, "opl4-mem", opl4->card->proc_root);
opl4               92 sound/drivers/opl4/opl4_proc.c 		if (opl4->hardware < OPL3_HW_OPL4_ML) {
opl4              103 sound/drivers/opl4/opl4_proc.c 		entry->private_data = opl4;
opl4              105 sound/drivers/opl4/opl4_proc.c 	opl4->proc_entry = entry;
opl4              109 sound/drivers/opl4/opl4_proc.c void snd_opl4_free_proc(struct snd_opl4 *opl4)
opl4              111 sound/drivers/opl4/opl4_proc.c 	snd_info_free_entry(opl4->proc_entry);
opl4               49 sound/drivers/opl4/opl4_seq.c static int snd_opl4_seq_use_inc(struct snd_opl4 *opl4)
opl4               51 sound/drivers/opl4/opl4_seq.c 	if (!try_module_get(opl4->card->module))
opl4               56 sound/drivers/opl4/opl4_seq.c static void snd_opl4_seq_use_dec(struct snd_opl4 *opl4)
opl4               58 sound/drivers/opl4/opl4_seq.c 	module_put(opl4->card->module);
opl4               63 sound/drivers/opl4/opl4_seq.c 	struct snd_opl4 *opl4 = private_data;
opl4               66 sound/drivers/opl4/opl4_seq.c 	mutex_lock(&opl4->access_mutex);
opl4               68 sound/drivers/opl4/opl4_seq.c 	if (opl4->used) {
opl4               69 sound/drivers/opl4/opl4_seq.c 		mutex_unlock(&opl4->access_mutex);
opl4               72 sound/drivers/opl4/opl4_seq.c 	opl4->used++;
opl4               75 sound/drivers/opl4/opl4_seq.c 		err = snd_opl4_seq_use_inc(opl4);
opl4               77 sound/drivers/opl4/opl4_seq.c 			mutex_unlock(&opl4->access_mutex);
opl4               82 sound/drivers/opl4/opl4_seq.c 	mutex_unlock(&opl4->access_mutex);
opl4               84 sound/drivers/opl4/opl4_seq.c 	snd_opl4_synth_reset(opl4);
opl4               90 sound/drivers/opl4/opl4_seq.c 	struct snd_opl4 *opl4 = private_data;
opl4               92 sound/drivers/opl4/opl4_seq.c 	snd_opl4_synth_shutdown(opl4);
opl4               94 sound/drivers/opl4/opl4_seq.c 	mutex_lock(&opl4->access_mutex);
opl4               95 sound/drivers/opl4/opl4_seq.c 	opl4->used--;
opl4               96 sound/drivers/opl4/opl4_seq.c 	mutex_unlock(&opl4->access_mutex);
opl4               99 sound/drivers/opl4/opl4_seq.c 		snd_opl4_seq_use_dec(opl4);
opl4              114 sound/drivers/opl4/opl4_seq.c 	struct snd_opl4 *opl4 = private_data;
opl4              116 sound/drivers/opl4/opl4_seq.c 	snd_midi_process_event(&opl4_ops, ev, opl4->chset);
opl4              122 sound/drivers/opl4/opl4_seq.c 	struct snd_opl4 *opl4 = private_data;
opl4              124 sound/drivers/opl4/opl4_seq.c 	snd_midi_channel_free_set(opl4->chset);
opl4              130 sound/drivers/opl4/opl4_seq.c 	struct snd_opl4 *opl4;
opl4              134 sound/drivers/opl4/opl4_seq.c 	opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
opl4              135 sound/drivers/opl4/opl4_seq.c 	if (!opl4)
opl4              138 sound/drivers/opl4/opl4_seq.c 	if (snd_yrw801_detect(opl4) < 0)
opl4              141 sound/drivers/opl4/opl4_seq.c 	opl4->chset = snd_midi_channel_alloc_set(16);
opl4              142 sound/drivers/opl4/opl4_seq.c 	if (!opl4->chset)
opl4              144 sound/drivers/opl4/opl4_seq.c 	opl4->chset->private_data = opl4;
opl4              147 sound/drivers/opl4/opl4_seq.c 	client = snd_seq_create_kernel_client(opl4->card, opl4->seq_dev_num,
opl4              150 sound/drivers/opl4/opl4_seq.c 		snd_midi_channel_free_set(opl4->chset);
opl4              153 sound/drivers/opl4/opl4_seq.c 	opl4->seq_client = client;
opl4              154 sound/drivers/opl4/opl4_seq.c 	opl4->chset->client = client;
opl4              163 sound/drivers/opl4/opl4_seq.c 	pcallbacks.private_data = opl4;
opl4              165 sound/drivers/opl4/opl4_seq.c 	opl4->chset->port = snd_seq_event_port_attach(client, &pcallbacks,
opl4              174 sound/drivers/opl4/opl4_seq.c 	if (opl4->chset->port < 0) {
opl4              175 sound/drivers/opl4/opl4_seq.c 		int err = opl4->chset->port;
opl4              176 sound/drivers/opl4/opl4_seq.c 		snd_midi_channel_free_set(opl4->chset);
opl4              178 sound/drivers/opl4/opl4_seq.c 		opl4->seq_client = -1;
opl4              187 sound/drivers/opl4/opl4_seq.c 	struct snd_opl4 *opl4;
opl4              189 sound/drivers/opl4/opl4_seq.c 	opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
opl4              190 sound/drivers/opl4/opl4_seq.c 	if (!opl4)
opl4              193 sound/drivers/opl4/opl4_seq.c 	if (opl4->seq_client >= 0) {
opl4              194 sound/drivers/opl4/opl4_seq.c 		snd_seq_delete_kernel_client(opl4->seq_client);
opl4              195 sound/drivers/opl4/opl4_seq.c 		opl4->seq_client = -1;
opl4              273 sound/drivers/opl4/opl4_synth.c void snd_opl4_synth_reset(struct snd_opl4 *opl4)
opl4              278 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              280 sound/drivers/opl4/opl4_synth.c 		snd_opl4_write(opl4, OPL4_REG_MISC + i, OPL4_DAMP_BIT);
opl4              281 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              283 sound/drivers/opl4/opl4_synth.c 	INIT_LIST_HEAD(&opl4->off_voices);
opl4              284 sound/drivers/opl4/opl4_synth.c 	INIT_LIST_HEAD(&opl4->on_voices);
opl4              285 sound/drivers/opl4/opl4_synth.c 	memset(opl4->voices, 0, sizeof(opl4->voices));
opl4              287 sound/drivers/opl4/opl4_synth.c 		opl4->voices[i].number = i;
opl4              288 sound/drivers/opl4/opl4_synth.c 		list_add_tail(&opl4->voices[i].list, &opl4->off_voices);
opl4              291 sound/drivers/opl4/opl4_synth.c 	snd_midi_channel_set_clear(opl4->chset);
opl4              297 sound/drivers/opl4/opl4_synth.c void snd_opl4_synth_shutdown(struct snd_opl4 *opl4)
opl4              302 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              304 sound/drivers/opl4/opl4_synth.c 		snd_opl4_write(opl4, OPL4_REG_MISC + i,
opl4              305 sound/drivers/opl4/opl4_synth.c 			       opl4->voices[i].reg_misc & ~OPL4_KEY_ON_BIT);
opl4              306 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              312 sound/drivers/opl4/opl4_synth.c static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan,
opl4              313 sound/drivers/opl4/opl4_synth.c 				 void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
opl4              319 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              321 sound/drivers/opl4/opl4_synth.c 		voice = &opl4->voices[i];
opl4              323 sound/drivers/opl4/opl4_synth.c 			func(opl4, voice);
opl4              326 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              332 sound/drivers/opl4/opl4_synth.c static void snd_opl4_do_for_channel(struct snd_opl4 *opl4,
opl4              334 sound/drivers/opl4/opl4_synth.c 				    void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
opl4              340 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              342 sound/drivers/opl4/opl4_synth.c 		voice = &opl4->voices[i];
opl4              344 sound/drivers/opl4/opl4_synth.c 			func(opl4, voice);
opl4              347 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              353 sound/drivers/opl4/opl4_synth.c static void snd_opl4_do_for_all(struct snd_opl4 *opl4,
opl4              354 sound/drivers/opl4/opl4_synth.c 				void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
opl4              360 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              362 sound/drivers/opl4/opl4_synth.c 		voice = &opl4->voices[i];
opl4              364 sound/drivers/opl4/opl4_synth.c 			func(opl4, voice);
opl4              366 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              369 sound/drivers/opl4/opl4_synth.c static void snd_opl4_update_volume(struct snd_opl4 *opl4, struct opl4_voice *voice)
opl4              374 sound/drivers/opl4/opl4_synth.c 	att += snd_opl4_volume_table[opl4->chset->gs_master_volume & 0x7f];
opl4              383 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_LEVEL + voice->number,
opl4              388 sound/drivers/opl4/opl4_synth.c static void snd_opl4_update_pan(struct snd_opl4 *opl4, struct opl4_voice *voice)
opl4              400 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
opl4              403 sound/drivers/opl4/opl4_synth.c static void snd_opl4_update_vibrato_depth(struct snd_opl4 *opl4,
opl4              415 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_LFO_VIBRATO + voice->number,
opl4              419 sound/drivers/opl4/opl4_synth.c static void snd_opl4_update_pitch(struct snd_opl4 *opl4,
opl4              443 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_OCTAVE + voice->number,
opl4              447 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_F_NUMBER + voice->number, voice->reg_f_number);
opl4              450 sound/drivers/opl4/opl4_synth.c static void snd_opl4_update_tone_parameters(struct snd_opl4 *opl4,
opl4              453 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_ATTACK_DECAY1 + voice->number,
opl4              455 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_LEVEL_DECAY2 + voice->number,
opl4              457 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_RELEASE_CORRECTION + voice->number,
opl4              459 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_TREMOLO + voice->number,
opl4              464 sound/drivers/opl4/opl4_synth.c static struct opl4_voice *snd_opl4_get_voice(struct snd_opl4 *opl4)
opl4              467 sound/drivers/opl4/opl4_synth.c 	if (!list_empty(&opl4->off_voices))
opl4              468 sound/drivers/opl4/opl4_synth.c 		return list_entry(opl4->off_voices.next, struct opl4_voice, list);
opl4              470 sound/drivers/opl4/opl4_synth.c 	snd_BUG_ON(list_empty(&opl4->on_voices));
opl4              471 sound/drivers/opl4/opl4_synth.c 	return list_entry(opl4->on_voices.next, struct opl4_voice, list);
opl4              474 sound/drivers/opl4/opl4_synth.c static void snd_opl4_wait_for_wave_headers(struct snd_opl4 *opl4)
opl4              478 sound/drivers/opl4/opl4_synth.c 	while ((inb(opl4->fm_port) & OPL4_STATUS_LOAD) && --timeout > 0)
opl4              484 sound/drivers/opl4/opl4_synth.c 	struct snd_opl4 *opl4 = private_data;
opl4              504 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              506 sound/drivers/opl4/opl4_synth.c 		voice[i] = snd_opl4_get_voice(opl4);
opl4              507 sound/drivers/opl4/opl4_synth.c 		list_move_tail(&voice[i]->list, &opl4->on_voices);
opl4              518 sound/drivers/opl4/opl4_synth.c 		snd_opl4_write(opl4, OPL4_REG_F_NUMBER + voice[i]->number,
opl4              520 sound/drivers/opl4/opl4_synth.c 		snd_opl4_write(opl4, OPL4_REG_TONE_NUMBER + voice[i]->number,
opl4              527 sound/drivers/opl4/opl4_synth.c 		snd_opl4_update_pan(opl4, voice[i]);
opl4              528 sound/drivers/opl4/opl4_synth.c 		snd_opl4_update_pitch(opl4, voice[i]);
opl4              530 sound/drivers/opl4/opl4_synth.c 		snd_opl4_update_volume(opl4, voice[i]);
opl4              532 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              535 sound/drivers/opl4/opl4_synth.c 	snd_opl4_wait_for_wave_headers(opl4);
opl4              538 sound/drivers/opl4/opl4_synth.c 	spin_lock_irqsave(&opl4->reg_lock, flags);
opl4              540 sound/drivers/opl4/opl4_synth.c 		snd_opl4_update_tone_parameters(opl4, voice[i]);
opl4              542 sound/drivers/opl4/opl4_synth.c 		snd_opl4_update_vibrato_depth(opl4, voice[i]);
opl4              549 sound/drivers/opl4/opl4_synth.c 		snd_opl4_write(opl4, OPL4_REG_MISC + voice[i]->number,
opl4              552 sound/drivers/opl4/opl4_synth.c 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
opl4              555 sound/drivers/opl4/opl4_synth.c static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice)
opl4              557 sound/drivers/opl4/opl4_synth.c 	list_move_tail(&voice->list, &opl4->off_voices);
opl4              560 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
opl4              565 sound/drivers/opl4/opl4_synth.c 	struct snd_opl4 *opl4 = private_data;
opl4              567 sound/drivers/opl4/opl4_synth.c 	snd_opl4_do_for_note(opl4, note, chan, snd_opl4_voice_off);
opl4              570 sound/drivers/opl4/opl4_synth.c static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice)
opl4              572 sound/drivers/opl4/opl4_synth.c 	list_move_tail(&voice->list, &opl4->off_voices);
opl4              575 sound/drivers/opl4/opl4_synth.c 	snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
opl4              580 sound/drivers/opl4/opl4_synth.c 	struct snd_opl4 *opl4 = private_data;
opl4              582 sound/drivers/opl4/opl4_synth.c 	snd_opl4_do_for_note(opl4, note, chan, snd_opl4_terminate_voice);
opl4              587 sound/drivers/opl4/opl4_synth.c 	struct snd_opl4 *opl4 = private_data;
opl4              592 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_vibrato_depth);
opl4              595 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_volume);
opl4              598 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pan);
opl4              601 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_volume);
opl4              607 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_vibrato_depth);
opl4              619 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pitch);
opl4              627 sound/drivers/opl4/opl4_synth.c 	struct snd_opl4 *opl4 = private_data;
opl4              630 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_all(opl4, snd_opl4_update_volume);
opl4               36 sound/drivers/opl4/yrw801.c int snd_yrw801_detect(struct snd_opl4 *opl4)
opl4               40 sound/drivers/opl4/yrw801.c 	snd_opl4_read_memory(opl4, buf, 0x001200, 15);
opl4               43 sound/drivers/opl4/yrw801.c 	snd_opl4_read_memory(opl4, buf, 0x1ffffe, 2);
opl4             1365 sound/isa/opti9xx/miro.c 		struct snd_opl4 *opl4;
opl4             1368 sound/isa/opti9xx/miro.c 				    2, &opl3, &opl4) < 0)
opl4              905 sound/isa/opti9xx/opti92x-ad1848.c 			struct snd_opl4 *opl4;
opl4              910 sound/isa/opti9xx/opti92x-ad1848.c 					    2, &opl3, &opl4) < 0) {