]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: dsnoop: Added "hw_ptr_alignment" option in configuration for slave pointer alignment
authorVanitha Channaiah <vanitha.channaiah@in.bosch.com>
Wed, 15 May 2019 06:26:34 +0000 (11:56 +0530)
committerTakashi Iwai <tiwai@suse.de>
Wed, 15 May 2019 08:33:02 +0000 (10:33 +0200)
commit3ab798004733ce65bd5c7a48d650de3465825210
tree1ca3ca72b585f0b410a174e76e2a96af174278ae
parent7265e603bf880a9ec2cd01c3cf2afbd7709e5af4
pcm: dsnoop: Added "hw_ptr_alignment" option in configuration for slave pointer alignment

This change adapt the fix commit 6b058fda9dce
("pcm: dmix: Add option to allow alignment of slave pointers")
for dsnoop 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 dsnoop 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_direct.c
src/pcm/pcm_dmix.c
src/pcm/pcm_dshare.c
src/pcm/pcm_dsnoop.c