]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: dshare: Added "hw_ptr_alignment" option in configuration for alignment of slave...
authorVanitha Channaiah <vanitha.channaiah@in.bosch.com>
Wed, 15 May 2019 06:26:33 +0000 (11:56 +0530)
committerTakashi Iwai <tiwai@suse.de>
Wed, 15 May 2019 08:32:32 +0000 (10:32 +0200)
commit7265e603bf880a9ec2cd01c3cf2afbd7709e5af4
treed04e53cbc08ddf929b79828c02e552dc0149ce25
parent63ba5243ab7a33b77be5b65c0a8a2a0d5e26983f
pcm: dshare: Added "hw_ptr_alignment" option in configuration for alignment of slave pointers

This change adapt the fix commit 6b058fda9dce
("pcm: dmix: Add option to allow alignment of slave pointers")
for dshare plugin

Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr
is not period aligned. Therefore snd_pcm_wait() will block for a longer
time as required.

With these rcar driver changes the exact position of the dma is returned.
During snd_pcm_start they read hw_ptr as reference, and this hw_ptr
is now not period aligned, and is a little ahead over the period while it
is read. Therefore when the avail is calculated during snd_pcm_wait(),
it is missing the avail_min by a few frames.

An additional option hw_ptr_alignment is provided to dshare configuration,
to allow the user to configure the slave application and hw pointer
alignment at startup

Signed-off-by: Vanitha Channaiah <vanitha.channaiah@in.bosch.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_dshare.c