Changeset 703 for GPL/trunk/alsa-kernel/drivers/opl3
- Timestamp:
- Sep 26, 2021, 6:18:40 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 1 deleted
- 4 edited
-
. (modified) (1 prop)
-
alsa-kernel/drivers/opl3/opl3_lib.c (modified) (7 diffs)
-
alsa-kernel/drivers/opl3/opl3_midi.c (modified) (1 diff)
-
alsa-kernel/drivers/opl3/opl3_oss.c (deleted)
-
alsa-kernel/drivers/opl3/opl3_seq.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-next merged: 696-702
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/drivers/opl3/opl3_lib.c
r679 r703 244 244 tid.device = timer_no; 245 245 tid.subdevice = 0; 246 if ((err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer)) >= 0) { 246 err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer); 247 if (err >= 0) { 247 248 strcpy(timer->name, "AdLib timer #1"); 248 249 timer->private_data = opl3; … … 264 265 tid.device = timer_no; 265 266 tid.subdevice = 0; 266 if ((err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer)) >= 0) { 267 err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer); 268 if (err >= 0) { 267 269 strcpy(timer->name, "AdLib timer #2"); 268 270 timer->private_data = opl3; … … 349 351 spin_lock_init(&opl3->timer_lock); 350 352 351 if ((err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops)) < 0) { 353 err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops); 354 if (err < 0) { 352 355 snd_opl3_free(opl3); 353 356 return err; … … 397 400 398 401 *ropl3 = NULL; 399 if ((err = snd_opl3_new(card, hardware, &opl3)) < 0) 402 err = snd_opl3_new(card, hardware, &opl3); 403 if (err < 0) 400 404 return err; 401 405 if (! integrated) { 402 if ((opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)")) == NULL) { 406 opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)"); 407 if (!opl3->res_l_port) { 403 408 snd_printk(KERN_ERR "opl3: can't grab left port 0x%lx\n", l_port); 404 409 snd_device_free(card, opl3); 405 410 return -EBUSY; 406 411 } 407 if (r_port != 0 && 408 (opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)")) == NULL) { 409 snd_printk(KERN_ERR "opl3: can't grab right port 0x%lx\n", r_port); 410 snd_device_free(card, opl3); 411 return -EBUSY; 412 if (r_port != 0) { 413 opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)"); 414 if (!opl3->res_r_port) { 415 snd_printk(KERN_ERR "opl3: can't grab right port 0x%lx\n", r_port); 416 snd_device_free(card, opl3); 417 return -EBUSY; 418 } 412 419 } 413 420 } … … 424 431 default: 425 432 opl3->command = &snd_opl2_command; 426 if ((err = snd_opl3_detect(opl3)) < 0) { 433 err = snd_opl3_detect(opl3); 434 if (err < 0) { 427 435 snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n", 428 436 opl3->l_port, opl3->r_port); … … 450 458 int err; 451 459 452 if (timer1_dev >= 0) 453 if ((err = snd_opl3_timer1_init(opl3, timer1_dev)) < 0) 460 if (timer1_dev >= 0) { 461 err = snd_opl3_timer1_init(opl3, timer1_dev); 462 if (err < 0) 454 463 return err; 464 } 455 465 if (timer2_dev >= 0) { 456 if ((err = snd_opl3_timer2_init(opl3, timer2_dev)) < 0) { 466 err = snd_opl3_timer2_init(opl3, timer2_dev); 467 if (err < 0) { 457 468 snd_device_free(opl3->card, opl3->timer1); 458 469 opl3->timer1 = NULL; … … 478 489 /* create hardware dependent device (direct FM) */ 479 490 480 if ((err = snd_hwdep_new(card, "OPL2/OPL3", device, &hw)) < 0) { 491 err = snd_hwdep_new(card, "OPL2/OPL3", device, &hw); 492 if (err < 0) { 481 493 snd_device_free(card, opl3); 482 494 return err; -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_midi.c
r679 r703 181 181 /* kill two voices, EXPENSIVE */ 182 182 bp++; 183 voice_time = (voice_time > vp->time) ? 184 voice_time : vp->time; 183 voice_time = max(voice_time, vp2->time); 185 184 } 186 185 } else { -
GPL/trunk/alsa-kernel/drivers/opl3/opl3_seq.c
r679 r703 96 96 int err; 97 97 98 if ((err = snd_opl3_synth_setup(opl3)) < 0) 98 err = snd_opl3_synth_setup(opl3); 99 if (err < 0) 99 100 return err; 100 101 … … 111 112 112 113 if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) { 113 if ((err = snd_opl3_synth_use_inc(opl3)) < 0) 114 err = snd_opl3_synth_use_inc(opl3); 115 if (err < 0) 114 116 return err; 115 117 } … … 231 233 return client; 232 234 233 if ((err = snd_opl3_synth_create_port(opl3)) < 0) { 235 err = snd_opl3_synth_create_port(opl3); 236 if (err < 0) { 234 237 snd_seq_delete_kernel_client(client); 235 238 opl3->seq_client = -1;
Note:
See TracChangeset
for help on using the changeset viewer.
