Commit 20ce9de
committed
ALSA: seq: oss: Send fragmented SysEx messages immediately
The recent bug report spotted on the old OSS sequencer code that tries
to combine incoming SysEx messages to a single sequencer event. This
is good, per se, but it has more demerits:
- The sysex message delivery is delayed until the very last event
- The use of internal buffer forced the serialization
The recent fix in commit 0179488 ("ALSA: seq: oss: Fix races at
processing SysEx messages") addressed the latter, but a better fix is
to handle the sysex messages immediately, i.e. just send each incoming
fragmented sysex message as is. And this patch implements that.
This resulted in a significant cleanup as well.
Note that the only caller of snd_seq_oss_synth_sysex() is
snd_seq_oss_process_event(), and all its callers dispatch the event
immediately, so we can just put the passed buffer pointer to the event
record to be handled.
Reported-and-tested-by: Kun Hu <huk23@m.fudan.edu.cn>
Link: https://lore.kernel.org/2B7E93E4-B13A-4AE4-8E87-306A8EE9BBB7@m.fudan.edu.cn
Link: https://patch.msgid.link/20241231115523.15796-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>1 parent 41d11d6 commit 20ce9de
2 files changed
Lines changed: 14 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
| |||
66 | 59 | | |
67 | 60 | | |
68 | 61 | | |
69 | | - | |
70 | 62 | | |
71 | 63 | | |
72 | 64 | | |
| |||
319 | 311 | | |
320 | 312 | | |
321 | 313 | | |
322 | | - | |
323 | | - | |
324 | 314 | | |
325 | 315 | | |
326 | 316 | | |
| |||
396 | 386 | | |
397 | 387 | | |
398 | 388 | | |
399 | | - | |
400 | | - | |
401 | 389 | | |
402 | 390 | | |
403 | 391 | | |
| |||
409 | 397 | | |
410 | 398 | | |
411 | 399 | | |
412 | | - | |
413 | | - | |
414 | 400 | | |
415 | 401 | | |
416 | 402 | | |
| |||
483 | 469 | | |
484 | 470 | | |
485 | 471 | | |
486 | | - | |
487 | | - | |
| 472 | + | |
| 473 | + | |
488 | 474 | | |
489 | 475 | | |
490 | 476 | | |
491 | 477 | | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 478 | + | |
| 479 | + | |
496 | 480 | | |
497 | | - | |
498 | | - | |
499 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
500 | 484 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
544 | 492 | | |
545 | 493 | | |
546 | 494 | | |
| |||
0 commit comments