Changeset 679 for GPL/trunk/alsa-kernel/drivers/opl3
- Timestamp:
- Mar 18, 2021, 8:57:36 PM (5 years ago)
- Location:
- GPL/trunk
- Files:
-
- 7 edited
- 1 copied
-
. (modified) (1 prop)
-
alsa-kernel/drivers/opl3/opl3_drums.c (modified) (6 diffs)
-
alsa-kernel/drivers/opl3/opl3_lib.c (modified) (9 diffs)
-
alsa-kernel/drivers/opl3/opl3_midi.c (modified) (18 diffs)
-
alsa-kernel/drivers/opl3/opl3_oss.c (copied) (copied from GPL/branches/uniaud32-next/alsa-kernel/drivers/opl3/opl3_oss.c )
-
alsa-kernel/drivers/opl3/opl3_seq.c (modified) (11 diffs)
-
alsa-kernel/drivers/opl3/opl3_synth.c (modified) (5 diffs)
-
alsa-kernel/drivers/opl3/opl3_voice.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-linux-3.2.102 (added) merged: 611-614 /GPL/branches/uniaud32-next (added) merged: 615-678
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/drivers/opl3/opl3_drums.c
r305 r679 1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 2 3 * Copyright (c) by Uros Bizjak <uros@kss-loka.si> 3 4 * 4 5 * OPL2/OPL3/OPL4 FM routines for internal percussion channels 5 *6 * This program is free software; you can redistribute it and/or modify7 * it under the terms of the GNU General Public License as published by8 * the Free Software Foundation; either version 2 of the License, or9 * (at your option) any later version.10 *11 * This program is distributed in the hope that it will be useful,12 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 * GNU General Public License for more details.15 *16 * You should have received a copy of the GNU General Public License17 * along with this program; if not, write to the Free Software18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19 *20 6 */ 21 7 22 8 #include "opl3_voice.h" 23 9 24 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; 25 26 static char snd_opl3_drum_table[47] = 10 static const char snd_opl3_drum_table[47] = 27 11 { 28 12 OPL3_BASSDRUM_ON, OPL3_BASSDRUM_ON, OPL3_HIHAT_ON, /* 35 - 37 */ … … 64 48 }; 65 49 66 static struct snd_opl3_drum_voice bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00};67 static struct snd_opl3_drum_voice bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00};68 static struct snd_opl3_drum_note bass_note = {6, 0x90, 0x09};69 70 static struct snd_opl3_drum_voice hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00};71 72 static struct snd_opl3_drum_voice snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02};73 static struct snd_opl3_drum_note snare_note = {7, 0xf4, 0x0d};74 75 static struct snd_opl3_drum_voice tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00};76 static struct snd_opl3_drum_note tomtom_note = {8, 0xf4, 0x09};77 78 static struct snd_opl3_drum_voice cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00};50 static const struct snd_opl3_drum_voice bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00}; 51 static const struct snd_opl3_drum_voice bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00}; 52 static const struct snd_opl3_drum_note bass_note = {6, 0x90, 0x09}; 53 54 static const struct snd_opl3_drum_voice hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00}; 55 56 static const struct snd_opl3_drum_voice snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02}; 57 static const struct snd_opl3_drum_note snare_note = {7, 0xf4, 0x0d}; 58 59 static const struct snd_opl3_drum_voice tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00}; 60 static const struct snd_opl3_drum_note tomtom_note = {8, 0xf4, 0x09}; 61 62 static const struct snd_opl3_drum_voice cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00}; 79 63 80 64 /* … … 82 66 */ 83 67 static void snd_opl3_drum_voice_set(struct snd_opl3 *opl3, 84 struct snd_opl3_drum_voice *data)68 const struct snd_opl3_drum_voice *data) 85 69 { 86 70 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; … … 117 101 */ 118 102 static void snd_opl3_drum_note_set(struct snd_opl3 *opl3, 119 struct snd_opl3_drum_note *data)103 const struct snd_opl3_drum_note *data) 120 104 { 121 105 unsigned char voice_offset = data->voice; … … 135 119 */ 136 120 static void snd_opl3_drum_vol_set(struct snd_opl3 *opl3, 137 struct snd_opl3_drum_voice *data,121 const struct snd_opl3_drum_voice *data, 138 122 int vel, struct snd_midi_channel *chan) 139 123 { … … 187 171 { 188 172 unsigned char drum_mask; 189 struct snd_opl3_drum_voice *drum_voice;173 const struct snd_opl3_drum_voice *drum_voice; 190 174 191 175 if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE)) -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_lib.c
r426 r679 1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 2 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>, … … 7 8 * 8 9 * Most if code is ported from OSS/Lite. 9 *10 * This program is free software; you can redistribute it and/or modify11 * it under the terms of the GNU General Public License as published by12 * the Free Software Foundation; either version 2 of the License, or13 * (at your option) any later version.14 *15 * This program is distributed in the hope that it will be useful,16 * but WITHOUT ANY WARRANTY; without even the implied warranty of17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18 * GNU General Public License for more details.19 *20 * You should have received a copy of the GNU General Public License21 * along with this program; if not, write to the Free Software22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA23 *24 10 */ 25 11 26 12 #include <sound/opl3.h> 27 #include < asm/io.h>13 #include <linux/io.h> 28 14 #include <linux/delay.h> 15 #include <linux/module.h> 29 16 #include <linux/init.h> 30 17 #include <linux/slab.h> 31 18 #include <linux/ioport.h> 32 19 #include <sound/minors.h> 20 #include "opl3_voice.h" 33 21 34 22 MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>, Hannu Savolainen 1993-1996, Rob Hooft"); 35 23 MODULE_DESCRIPTION("Routines for control of AdLib FM cards (OPL2/OPL3/OPL4 chips)"); 36 24 MODULE_LICENSE("GPL"); 37 38 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];39 25 40 26 static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val) … … 229 215 */ 230 216 231 static struct snd_timer_hardware snd_opl3_timer1 =217 static const struct snd_timer_hardware snd_opl3_timer1 = 232 218 { 233 219 .flags = SNDRV_TIMER_HW_STOP, … … 238 224 }; 239 225 240 static struct snd_timer_hardware snd_opl3_timer2 =226 static const struct snd_timer_hardware snd_opl3_timer2 = 241 227 { 242 228 .flags = SNDRV_TIMER_HW_STOP, … … 347 333 struct snd_opl3 **ropl3) 348 334 { 349 static struct snd_device_ops ops = {335 static const struct snd_device_ops ops = { 350 336 .dev_free = snd_opl3_dev_free, 351 337 }; … … 355 341 *ropl3 = NULL; 356 342 opl3 = kzalloc(sizeof(*opl3), GFP_KERNEL); 357 if (opl3 == NULL) { 358 snd_printk(KERN_ERR "opl3: cannot allocate\n"); 343 if (!opl3) 359 344 return -ENOMEM; 360 }361 345 362 346 opl3->card = card; … … 501 485 hw->exclusive = 1; 502 486 #ifdef CONFIG_SND_OSSEMUL 503 if (device == 0) {487 if (device == 0) 504 488 hw->oss_type = SNDRV_OSS_DEVICE_TYPE_DMFM; 505 sprintf(hw->oss_dev, "dmfm%i", card->number);506 }507 489 #endif 508 490 strcpy(hw->name, hw->id); … … 530 512 opl3->hwdep = hw; 531 513 opl3->seq_dev_num = seq_device; 532 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))514 #if IS_ENABLED(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER) 533 515 if (snd_seq_device_new(card, seq_device, SNDRV_SEQ_DEV_ID_OPL3, 534 516 sizeof(struct snd_opl3 *), &opl3->seq_dev) >= 0) { … … 543 525 544 526 EXPORT_SYMBOL(snd_opl3_hwdep_new); 545 546 /*547 * INIT part548 */549 550 static int __init alsa_opl3_init(void)551 {552 return 0;553 }554 555 static void __exit alsa_opl3_exit(void)556 {557 }558 559 module_init(alsa_opl3_init)560 module_exit(alsa_opl3_exit) -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_midi.c
r598 r679 1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 2 3 * Copyright (c) by Uros Bizjak <uros@kss-loka.si> 3 4 * 4 5 * Midi synth routines for OPL2/OPL3/OPL4 FM 5 *6 * This program is free software; you can redistribute it and/or modify7 * it under the terms of the GNU General Public License as published by8 * the Free Software Foundation; either version 2 of the License, or9 * (at your option) any later version.10 *11 * This program is distributed in the hope that it will be useful,12 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 * GNU General Public License for more details.15 *16 * You should have received a copy of the GNU General Public License17 * along with this program; if not, write to the Free Software18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19 *20 6 */ 21 7 … … 25 11 #include "opl3_voice.h" 26 12 #include <sound/asoundef.h> 27 28 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];29 30 extern int use_internal_drums;31 13 32 14 static void snd_opl3_note_off_unsafe(void *p, int note, int vel, … … 42 24 */ 43 25 44 static c har opl3_volume_table[128] =26 static const char opl3_volume_table[128] = 45 27 { 46 28 -63, -48, -40, -35, -32, -29, -27, -26, … … 88 70 * Converts the note frequency to block and fnum values for the FM chip 89 71 */ 90 static short opl3_note_table[16] =72 static const short opl3_note_table[16] = 91 73 { 92 74 305, 323, /* for pitch bending, -2 semitones */ … … 106 88 int segment; 107 89 90 if (pitchbend < -0x2000) 91 pitchbend = -0x2000; 108 92 if (pitchbend > 0x1FFF) 109 93 pitchbend = 0x1FFF; … … 130 114 printk(KERN_DEBUG "time %.5i: %s [%.2i]: ", opl3->use_time, s, voice); 131 115 for (i = 0; i < opl3->max_voices; i++) 132 printk( "%c", *(str + opl3->voices[i].state + 1));133 printk( "\n");116 printk(KERN_CONT "%c", *(str + opl3->voices[i].state + 1)); 117 printk(KERN_CONT "\n"); 134 118 } 135 119 #endif … … 164 148 165 149 for (i = 0; i < END; i++) { 166 best[i].time = (unsigned int)(-1); /* XXX MAX_?INT really */ ;150 best[i].time = (unsigned int)(-1); /* XXX MAX_?INT really */ 167 151 best[i].voice = -1; 168 152 } … … 234 218 /* ------------------------------ */ 235 219 220 #define from_timer(var, callback_timer, timer_fieldname) \ 221 container_of(callback_timer, struct snd_opl3, timer_fieldname) 222 236 223 /* 237 224 * System timer interrupt function 238 225 */ 239 void snd_opl3_timer_func( unsigned long data)240 { 241 242 struct snd_opl3 *opl3 = (struct snd_opl3 *)data;226 void snd_opl3_timer_func(struct timer_list *t) 227 { 228 229 struct snd_opl3 *opl3 = from_timer(opl3, t, tlist); 243 230 unsigned long flags; 244 231 int again = 0; … … 259 246 260 247 spin_lock_irqsave(&opl3->sys_timer_lock, flags); 261 if (again) { 262 opl3->tlist.expires = jiffies + 1; /* invoke again */ 263 add_timer(&opl3->tlist); 264 } else { 248 if (again) 249 mod_timer(&opl3->tlist, jiffies + 1); /* invoke again */ 250 else 265 251 opl3->sys_timer_status = 0; 266 }267 252 spin_unlock_irqrestore(&opl3->sys_timer_lock, flags); 268 253 } … … 276 261 spin_lock_irqsave(&opl3->sys_timer_lock, flags); 277 262 if (! opl3->sys_timer_status) { 278 opl3->tlist.expires = jiffies + 1; 279 add_timer(&opl3->tlist); 263 mod_timer(&opl3->tlist, jiffies + 1); 280 264 opl3->sys_timer_status = 1; 281 265 } … … 286 270 287 271 288 static int snd_opl3_oss_map[MAX_OPL3_VOICES] = {272 static const int snd_opl3_oss_map[MAX_OPL3_VOICES] = { 289 273 0, 1, 2, 9, 10, 11, 6, 7, 8, 15, 16, 17, 3, 4 ,5, 12, 13, 14 290 274 }; … … 374 358 break; 375 359 } 360 fallthrough; 376 361 default: 377 362 spin_unlock_irqrestore(&opl3->voice_lock, flags); … … 389 374 /* remap OSS voice */ 390 375 voice = snd_opl3_oss_map[chan->number]; 376 } 377 378 if (voice < 0) { 379 spin_unlock_irqrestore(&opl3->voice_lock, flags); 380 return; 391 381 } 392 382 … … 457 447 case 0x03: 458 448 snd_opl3_calc_volume(&vol_op[2], vel, chan); 459 /* fallthru */449 fallthrough; 460 450 case 0x02: 461 451 snd_opl3_calc_volume(&vol_op[0], vel, chan); … … 718 708 void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan) 719 709 { 720 struct snd_opl3 *opl3;721 722 opl3 = p;723 710 #ifdef DEBUG_MIDI 724 711 snd_printk(KERN_DEBUG "Key pressure, ch#: %i, inst#: %i\n", … … 732 719 void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan) 733 720 { 734 struct snd_opl3 *opl3;735 736 opl3 = p;737 721 #ifdef DEBUG_MIDI 738 722 snd_printk(KERN_DEBUG "Terminate note, ch#: %i, inst#: %i\n", … … 858 842 struct snd_midi_channel_set *chset) 859 843 { 860 struct snd_opl3 *opl3;861 862 opl3 = p;863 844 #ifdef DEBUG_MIDI 864 845 snd_printk(KERN_DEBUG "NRPN, ch#: %i, inst#: %i\n", … … 873 854 int parsed, struct snd_midi_channel_set *chset) 874 855 { 875 struct snd_opl3 *opl3;876 877 opl3 = p;878 856 #ifdef DEBUG_MIDI 879 857 snd_printk(KERN_DEBUG "SYSEX\n"); -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_seq.c
r305 r679 1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 2 3 * Copyright (c) by Uros Bizjak <uros@kss-loka.si> … … 6 7 * OPL2/3 FM instrument loader: 7 8 * alsa-tools/seq/sbiload/ 8 *9 * This program is free software; you can redistribute it and/or modify10 * it under the terms of the GNU General Public License as published by11 * the Free Software Foundation; either version 2 of the License, or12 * (at your option) any later version.13 *14 * This program is distributed in the hope that it will be useful,15 * but WITHOUT ANY WARRANTY; without even the implied warranty of16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17 * GNU General Public License for more details.18 *19 * You should have received a copy of the GNU General Public License20 * along with this program; if not, write to the Free Software21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA22 *23 9 */ 24 10 … … 26 12 #include <linux/init.h> 27 13 #include <linux/moduleparam.h> 14 #include <linux/module.h> 28 15 #include <sound/initval.h> 29 16 … … 31 18 MODULE_LICENSE("GPL"); 32 19 MODULE_DESCRIPTION("ALSA driver for OPL3 FM synth"); 33 34 int use_internal_drums = 0; 20 #ifdef TARGET_OS2 21 #define KBUILD_MODNAME "opl3_seq" 22 #endif 23 24 bool use_internal_drums = 0; 35 25 module_param(use_internal_drums, bool, 0444); 36 26 MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums."); … … 111 101 if (use_internal_drums) { 112 102 /* Percussion mode */ 113 opl3->voices[6].state = opl3->voices[7].state = 103 opl3->voices[6].state = opl3->voices[7].state = 114 104 opl3->voices[8].state = SNDRV_OPL3_ST_NOT_AVAIL; 115 105 snd_opl3_load_drums(opl3); … … 142 132 * MIDI emulation operators 143 133 */ 144 struct snd_midi_op opl3_ops = {134 const struct snd_midi_op opl3_ops = { 145 135 .note_on = snd_opl3_note_on, 146 136 .note_off = snd_opl3_note_off, … … 216 206 /* ------------------------------ */ 217 207 218 static int snd_opl3_seq_new_device(struct snd_seq_device *dev) 219 { 208 static int snd_opl3_seq_probe(struct device *_dev) 209 { 210 struct snd_seq_device *dev = to_seq_dev(_dev); 220 211 struct snd_opl3 *opl3; 221 212 int client, err; … … 247 238 248 239 /* setup system timer */ 240 #ifndef TARGET_OS2 241 timer_setup(&opl3->tlist, snd_opl3_timer_func, 0); 242 #else 249 243 init_timer(&opl3->tlist); 250 opl3->tlist.function = snd_opl3_timer_func;244 opl3->tlist.function = (void(*)(unsigned long))snd_opl3_timer_func; 251 245 opl3->tlist.data = (unsigned long) opl3; 246 #endif 252 247 spin_lock_init(&opl3->sys_timer_lock); 253 248 opl3->sys_timer_status = 0; 254 249 255 #if def CONFIG_SND_SEQUENCER_OSS250 #if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) 256 251 snd_opl3_init_seq_oss(opl3, name); 257 252 #endif … … 259 254 } 260 255 261 static int snd_opl3_seq_delete_device(struct snd_seq_device *dev) 262 { 256 static int snd_opl3_seq_remove(struct device *_dev) 257 { 258 struct snd_seq_device *dev = to_seq_dev(_dev); 263 259 struct snd_opl3 *opl3; 264 260 … … 267 263 return -EINVAL; 268 264 269 #if def CONFIG_SND_SEQUENCER_OSS265 #if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) 270 266 snd_opl3_free_seq_oss(opl3); 271 267 #endif … … 277 273 } 278 274 279 static int __init alsa_opl3_seq_init(void) 280 { 281 static struct snd_seq_dev_ops ops = 282 { 283 snd_opl3_seq_new_device, 284 snd_opl3_seq_delete_device 285 }; 286 287 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL3, &ops, 288 sizeof(struct snd_opl3 *)); 289 } 290 291 static void __exit alsa_opl3_seq_exit(void) 292 { 293 snd_seq_device_unregister_driver(SNDRV_SEQ_DEV_ID_OPL3); 294 } 295 296 module_init(alsa_opl3_seq_init) 297 module_exit(alsa_opl3_seq_exit) 275 static struct snd_seq_driver opl3_seq_driver = { 276 .driver = { 277 .name = KBUILD_MODNAME, 278 .probe = snd_opl3_seq_probe, 279 .remove = snd_opl3_seq_remove, 280 }, 281 .id = SNDRV_SEQ_DEV_ID_OPL3, 282 .argsize = sizeof(struct snd_opl3 *), 283 }; 284 285 module_snd_seq_driver(opl3_seq_driver); -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_synth.c
r598 r679 1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 2 3 * Copyright (c) by Uros Bizjak <uros@kss-loka.si> 3 4 * 4 5 * Routines for OPL2/OPL3/OPL4 control 5 *6 * This program is free software; you can redistribute it and/or modify7 * it under the terms of the GNU General Public License as published by8 * the Free Software Foundation; either version 2 of the License, or9 * (at your option) any later version.10 *11 * This program is distributed in the hope that it will be useful,12 * but WITHOUT ANY WARRANTY; without even the implied warranty of13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 * GNU General Public License for more details.15 *16 * You should have received a copy of the GNU General Public License17 * along with this program; if not, write to the Free Software18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19 *20 6 */ 21 7 22 8 #include <linux/slab.h> 9 #include <linux/export.h> 10 #include <linux/nospec.h> 23 11 #include <sound/opl3.h> 24 12 #include <sound/asound_fm.h> 25 26 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 13 #include "opl3_voice.h" 14 15 #if (IS_ENABLED(CONFIG_SND_SEQUENCER) || defined TARGET_OS2) 27 16 #define OPL3_SUPPORT_SYNTH 28 17 #endif … … 102 91 { 103 92 struct snd_dm_fm_info info; 93 94 memset(&info, 0, sizeof(info)); 104 95 105 96 info.fm_mode = opl3->fm_mode; … … 311 302 * new patch object. 312 303 */ 304 313 305 struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank, 314 306 int create_patch) … … 448 440 unsigned short reg_side; 449 441 unsigned char op_offset; 450 unsigned char voice_offset ;442 unsigned char voice_offset, voice_op; 451 443 452 444 unsigned short opl3_reg; … … 473 465 } 474 466 /* Get register offset of operator */ 475 op_offset = snd_opl3_regmap[voice_offset][voice->op]; 467 voice_offset = array_index_nospec(voice_offset, MAX_OPL2_VOICES); 468 voice_op = array_index_nospec(voice->op, 4); 469 op_offset = snd_opl3_regmap[voice_offset][voice_op]; 476 470 477 471 reg_val = 0x00; -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_voice.h
r305 r679 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 1 2 #ifndef __OPL3_VOICE_H 2 3 #define __OPL3_VOICE_H … … 4 5 /* 5 6 * Copyright (c) 2000 Uros Bizjak <uros@kss-loka.si> 6 *7 * This program is free software; you can redistribute it and/or modify8 * it under the terms of the GNU General Public License as published by9 * the Free Software Foundation; either version 2 of the License, or10 * (at your option) any later version.11 *12 * This program is distributed in the hope that it will be useful,13 * but WITHOUT ANY WARRANTY; without even the implied warranty of14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15 * GNU General Public License for more details.16 *17 * You should have received a copy of the GNU General Public License18 * along with this program; if not, write to the Free Software19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA20 7 */ 21 8 … … 38 25 39 26 void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan); 40 void snd_opl3_timer_func( unsigned long data);27 void snd_opl3_timer_func(struct timer_list *t); 41 28 42 29 /* Prototypes for opl3_drums.c */ 43 30 void snd_opl3_load_drums(struct snd_opl3 *opl3); 44 void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);31 void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan); 45 32 46 33 /* Prototypes for opl3_oss.c */ 47 #if def CONFIG_SND_SEQUENCER_OSS34 #if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) 48 35 void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name); 49 36 void snd_opl3_free_seq_oss(struct snd_opl3 *opl3); 37 #else 38 #define snd_opl3_init_seq_oss(opl3, name) /* NOP */ 39 #define snd_opl3_free_seq_oss(opl3) /* NOP */ 50 40 #endif 51 41 42 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; 43 extern bool use_internal_drums; 44 extern const struct snd_midi_op opl3_ops; 45 52 46 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
