ext: alsa: Set buffer time after period time
authorDevarsh Thakkar <devarsh.thakkar@xilinx.com>
Tue, 9 Feb 2021 13:16:34 +0000 (05:16 -0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 11 Mar 2021 14:15:54 +0000 (14:15 +0000)
commit9759810d8206b5f1aa199f98599caec3630a1813
tree0bc7b6ae16447964a79d8cbc013a1392b36b94cd
parent01d1bbd1dadf2992769d351023d624eacb0a92c5
ext: alsa: Set buffer time after period time

This because underlying driver may have constraint on
buffer size to be dependent on period size, so period
time needs to be set first.

For e.g. Xilinx ASoC driver requires
buffer size to be multiple of period size for it's DMA
operation.

alsa-utils also set period time first as seen in below commit :
https://github.com/alsa-project/alsa-utils/commit/9b621eeac4d55c4e881f093be5b163ca07d01b63

Tested it on zcu106 board with HDMI based record and playback.
Also tested on Intel PC using Logitech C920 Webcam mic and ALC887-VD
Analog for playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1040>
ext/alsa/gstalsasink.c
ext/alsa/gstalsasrc.c