Commit f91c9d7
ALSA: firewire-lib: cache maximum length of payload to reduce function calls
During packet streaming, maximum length of payload for isochronous packet
is invariable, therefore no need to recalculate. Current ALSA IEC 61883-1/6
engine calls a function to calculate it 8,000 or more times per second
for incoming packet processing.
This commit adds a member to have maximum length of payload into 'struct
amdtp_stream', to reduces the function calls. At first callback from
isochronous context, the length is calculated and stored for later
processing.
Signed-off-by: Takashi Sakamoto <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>1 parent 12ee402 commit f91c9d7
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
| 415 | + | |
417 | 416 | | |
418 | 417 | | |
419 | 418 | | |
| |||
713 | 712 | | |
714 | 713 | | |
715 | 714 | | |
716 | | - | |
| 715 | + | |
717 | 716 | | |
718 | 717 | | |
719 | 718 | | |
720 | 719 | | |
721 | | - | |
| 720 | + | |
722 | 721 | | |
723 | 722 | | |
724 | 723 | | |
| |||
751 | 750 | | |
752 | 751 | | |
753 | 752 | | |
| 753 | + | |
| 754 | + | |
754 | 755 | | |
755 | 756 | | |
756 | 757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
0 commit comments