Changeset 777 for GPL/trunk/alsa-kernel/drivers/opl3
- Timestamp:
- Apr 21, 2025, 7:17:25 PM (6 months ago)
- Location:
- GPL/trunk
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
alsa-kernel/drivers/opl3/opl3_lib.c (modified) (7 diffs)
-
alsa-kernel/drivers/opl3/opl3_midi.c (modified) (16 diffs)
-
alsa-kernel/drivers/opl3/opl3_synth.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-exp merged: 766-767,770-771,773-774
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/drivers/opl3/opl3_lib.c
r703 r777 93 93 signature = stat1 = inb(opl3->l_port); /* Status register */ 94 94 if ((stat1 & 0xe0) != 0x00) { /* Should be 0x00 */ 95 snd_printd("OPL3: stat1 = 0x%x\n", stat1);95 dev_dbg(opl3->card->dev, "OPL3: stat1 = 0x%x\n", stat1); 96 96 return -ENODEV; 97 97 } … … 109 109 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, OPL3_IRQ_RESET); 110 110 if ((stat2 & 0xe0) != 0xc0) { /* There is no YM3812 */ 111 snd_printd("OPL3: stat2 = 0x%x\n", stat2);111 dev_dbg(opl3->card->dev, "OPL3: stat2 = 0x%x\n", stat2); 112 112 return -ENODEV; 113 113 } … … 290 290 opl3 = hw->private_data; 291 291 status = inb(opl3->l_port); 292 #if 0293 snd_printk(KERN_DEBUG "AdLib IRQ status = 0x%x\n", status);294 #endif295 292 if (!(status & 0x80)) 296 293 return; … … 366 363 { 367 364 if (! opl3->command) { 368 printk(KERN_ERR "snd_opl3_init: command not defined!\n"); 365 dev_err(opl3->card->dev, 366 "snd_opl3_init: command not defined!\n"); 369 367 return -EINVAL; 370 368 } … … 406 404 opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)"); 407 405 if (!opl3->res_l_port) { 408 snd_printk(KERN_ERR"opl3: can't grab left port 0x%lx\n", l_port);406 dev_err(card->dev, "opl3: can't grab left port 0x%lx\n", l_port); 409 407 snd_device_free(card, opl3); 410 408 return -EBUSY; … … 413 411 opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)"); 414 412 if (!opl3->res_r_port) { 415 snd_printk(KERN_ERR"opl3: can't grab right port 0x%lx\n", r_port);413 dev_err(card->dev, "opl3: can't grab right port 0x%lx\n", r_port); 416 414 snd_device_free(card, opl3); 417 415 return -EBUSY; … … 433 431 err = snd_opl3_detect(opl3); 434 432 if (err < 0) { 435 snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",433 dev_dbg(card->dev, "OPL2/3 chip not detected at 0x%lx/0x%lx\n", 436 434 opl3->l_port, opl3->r_port); 437 435 snd_device_free(card, opl3); -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_midi.c
r717 r777 11 11 #include "opl3_voice.h" 12 12 #include <sound/asoundef.h> 13 14 #ifdef DEBUG_MIDI 15 #define opl3_dbg(opl3, fmt, ...) \ 16 dev_dbg(((struct snd_opl3 *)(opl3))->card->dev, fmt, ##__VA_ARGS__) 17 #else 18 #define opl3_dbg(opl3, fmt, ...) do {} while (0) 19 #endif 13 20 14 21 static void snd_opl3_note_off_unsafe(void *p, int note, int vel, … … 108 115 109 116 #ifdef DEBUG_ALLOC 110 static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) { 117 static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) 118 { 111 119 int i; 112 c har *str = "x.24";113 114 printk(KERN_DEBUG "time %.5i: %s [%.2i]: ", opl3->use_time, s, voice); 120 const char *str = "x.24"; 121 char buf[MAX_OPL3_VOICES + 1]; 122 115 123 for (i = 0; i < opl3->max_voices; i++) 116 printk(KERN_CONT "%c", *(str + opl3->voices[i].state + 1)); 117 printk(KERN_CONT "\n"); 124 buf[i] = str[opl3->voices[i].state + 1]; 125 buf[i] = 0; 126 dev_dbg(opl3->card->dev, "time %.5i: %s [%.2i]: %s\n", 127 opl3->use_time, s, voice, buf); 118 128 } 119 129 #endif … … 204 214 if (best[i].voice >= 0) { 205 215 #ifdef DEBUG_ALLOC 206 printk(KERN_DEBUG "%s %iop allocation on voice %i\n", 216 dev_dbg(opl3->card->dev, 217 "%s %iop allocation on voice %i\n", 207 218 alloc_type[i], instr_4op ? 4 : 2, 208 219 best[i].voice); … … 306 317 opl3 = p; 307 318 308 #ifdef DEBUG_MIDI 309 snd_printk(KERN_DEBUG "Note on, ch %i, inst %i, note %i, vel %i\n", 319 opl3_dbg(opl3, "Note on, ch %i, inst %i, note %i, vel %i\n", 310 320 chan->number, chan->midi_program, note, vel); 311 #endif312 321 313 322 /* in SYNTH mode, application takes care of voices */ … … 362 371 return; 363 372 } 364 #ifdef DEBUG_MIDI 365 snd_printk(KERN_DEBUG " --> OPL%i instrument: %s\n", 373 opl3_dbg(opl3, " --> OPL%i instrument: %s\n", 366 374 instr_4op ? 3 : 2, patch->name); 367 #endif368 375 /* in SYNTH mode, application takes care of voices */ 369 376 /* in SEQ mode, allocate voice on free OPL3 channel */ … … 426 433 } 427 434 428 #ifdef DEBUG_MIDI 429 snd_printk(KERN_DEBUG " --> setting OPL3 connection: 0x%x\n", 435 opl3_dbg(opl3, " --> setting OPL3 connection: 0x%x\n", 430 436 opl3->connection_reg); 431 #endif432 437 /* 433 438 * calculate volume depending on connection … … 461 466 /* Program the FM voice characteristics */ 462 467 for (i = 0; i < (instr_4op ? 4 : 2); i++) { 463 #ifdef DEBUG_MIDI 464 snd_printk(KERN_DEBUG " --> programming operator %i\n", i); 465 #endif 468 opl3_dbg(opl3, " --> programming operator %i\n", i); 466 469 op_offset = snd_opl3_regmap[voice_offset][i]; 467 470 … … 541 544 blocknum |= OPL3_KEYON_BIT; 542 545 543 #ifdef DEBUG_MIDI 544 snd_printk(KERN_DEBUG " --> trigger voice %i\n", voice); 545 #endif 546 opl3_dbg(opl3, " --> trigger voice %i\n", voice); 546 547 /* Set OPL3 KEYON_BLOCK register of requested voice */ 547 548 opl3_reg = reg_side | (OPL3_REG_KEYON_BLOCK + voice_offset); … … 597 598 prg = extra_prg - 1; 598 599 } 599 #ifdef DEBUG_MIDI 600 snd_printk(KERN_DEBUG " *** allocating extra program\n"); 601 #endif 600 opl3_dbg(opl3, " *** allocating extra program\n"); 602 601 goto __extra_prg; 603 602 } … … 628 627 629 628 /* kill voice */ 630 #ifdef DEBUG_MIDI 631 snd_printk(KERN_DEBUG " --> kill voice %i\n", voice); 632 #endif 629 opl3_dbg(opl3, " --> kill voice %i\n", voice); 633 630 opl3_reg = reg_side | (OPL3_REG_KEYON_BLOCK + voice_offset); 634 631 /* clear Key ON bit */ … … 664 661 opl3 = p; 665 662 666 #ifdef DEBUG_MIDI 667 snd_printk(KERN_DEBUG "Note off, ch %i, inst %i, note %i\n", 663 opl3_dbg(opl3, "Note off, ch %i, inst %i, note %i\n", 668 664 chan->number, chan->midi_program, note); 669 #endif670 665 671 666 if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) { … … 707 702 void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan) 708 703 { 709 #ifdef DEBUG_MIDI 710 snd_printk(KERN_DEBUG "Key pressure, ch#: %i, inst#: %i\n", 704 opl3_dbg(p, "Key pressure, ch#: %i, inst#: %i\n", 711 705 chan->number, chan->midi_program); 712 #endif713 706 } 714 707 … … 718 711 void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan) 719 712 { 720 #ifdef DEBUG_MIDI 721 snd_printk(KERN_DEBUG "Terminate note, ch#: %i, inst#: %i\n", 713 opl3_dbg(p, "Terminate note, ch#: %i, inst#: %i\n", 722 714 chan->number, chan->midi_program); 723 #endif724 715 } 725 716 … … 807 798 808 799 opl3 = p; 809 #ifdef DEBUG_MIDI 810 snd_printk(KERN_DEBUG "Controller, TYPE = %i, ch#: %i, inst#: %i\n", 800 opl3_dbg(opl3, "Controller, TYPE = %i, ch#: %i, inst#: %i\n", 811 801 type, chan->number, chan->midi_program); 812 #endif813 802 814 803 switch (type) { … … 841 830 struct snd_midi_channel_set *chset) 842 831 { 843 #ifdef DEBUG_MIDI 844 snd_printk(KERN_DEBUG "NRPN, ch#: %i, inst#: %i\n", 832 opl3_dbg(p, "NRPN, ch#: %i, inst#: %i\n", 845 833 chan->number, chan->midi_program); 846 #endif847 834 } 848 835 … … 853 840 int parsed, struct snd_midi_channel_set *chset) 854 841 { 855 #ifdef DEBUG_MIDI 856 snd_printk(KERN_DEBUG "SYSEX\n"); 857 #endif 858 } 842 opl3_dbg(p, "SYSEX\n"); 843 } -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_synth.c
r695 r777 159 159 #endif 160 160 161 #ifdef CONFIG_SND_DEBUG162 161 default: 163 snd_printk(KERN_WARNING "unknown IOCTL: 0x%x\n", cmd); 164 #endif 162 dev_dbg(opl3->card->dev, "unknown IOCTL: 0x%x\n", cmd); 165 163 } 166 164 return -ENOTTY;
Note:
See TracChangeset
for help on using the changeset viewer.
