This patch does some code refactoring in the AVTPDU transmission
routines in order to prepare the code to support the transmission
offload mechanism that will be added by upcoming patches. No
functionality is added or removed by this patch.
In summary, code from aaf_tx_pdu() is moved into aaf_mclk_timeout_
playback() and into a new function introduced by this patch called
aaf_tx_pdus(). Below follows more details about the code refactoring.
The function aaf_tx_pdu() is modified so it only takes care of setting
the payload, sequence number and presentation time from the AVTPDU, and
sending it to the kernel.
The new function aaf_tx_pdus() calculates the presentation time from
each AVTPDU and calls aaf_tx_pdu() multiple times, according to the pdu
count argument.
Finally, the function aaf_mclk_timeout_playback() now checks if there
are frames available to the "hardware" and takes care of moving the
hardware pointer forward.
Signed-off-by: Andre Guedes <andre.guedes@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>