Commit 7570e5d7 authored by mahendran.k's avatar mahendran.k Committed by Takashi Iwai
Browse files

pcm: rate: fix the hw_ptr update until the boundary available



For long time test case, the slave_hw_ptr will exceed the boundary
and wraparound the slave_hw_ptr. This slave boundary wraparound will
cause the rate->hw_ptr to wraparound irrespective of the
rate->boundary availability and due to that the available size goes
wrong.

Hence, to get the correct available size,
- Its necessary to increment the rate->hw_ptr upto the rate->boundary
and then wraparound the rate->hw_ptr.
- While handling fraction part of slave period, rounded value will be
introduced by input_frames(). To eliminate rounding issue on
rate->hw_ptr, subtract last rounded value from rate->hw_ptr and add
new rounded value of present slave_hw_ptr fraction part to
rate->hw_ptr.

Signed-off-by: default avatarmahendran.k <mahendran.kuppusamy@in.bosch.com>
Signed-off-by: default avatarMounesh Sutar <mounesh_sutar@mentor.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8eeee1ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment