ALSA: firewire-lib: code refactoring for data block calculation
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 8 May 2020 04:36:32 +0000 (13:36 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 8 May 2020 07:46:01 +0000 (09:46 +0200)
commit274fc3558133d33311b22a962d0f362ddd281b51
treeb1aed297b8442df5bc23fcf840a544837ee7487a
parent816d84826e89399858a1f086d78f5a4dd615a9ae
ALSA: firewire-lib: code refactoring for data block calculation

When calculating the number of data blocks per packet, some states are
stored in AMDTP stream structure. This is inconvenient when reuse the
calculation from non-stream structure.

This commit applies refactoring to helper function for the calculation
so that the function doesn't touch AMDTP stream structure.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200508043635.349339-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream.c