In order to implement the transmission offload mechanism, we need to
change the way the plugin behaves so, instead of sending only one
AVTPDU, it sends several AVTPDUs at every media clock tick.
To achieve that, this patch changes the plugin so it consumes the audio
buffer in chunks of period size instead of in frames_per_pdu. The number
of AVTPDUs sent at every media clock tick is calculated by dividing the
period size by the number of frames per AVTPDU. To ensure that number is
not fractional, the plugin requires that the period size is multiple of
the plugin configuration 'frames_per_pdu'.
For the sake of consistency, the capture mode is also changed so the
plugin presents audio frames to the alsa-lib layer in chunks of period
size as well.
Signed-off-by: Andre Guedes <andre.guedes@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>