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:mahendran.k <mahendran.kuppusamy@in.bosch.com> Signed-off-by:
Mounesh Sutar <mounesh_sutar@mentor.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
Loading
Please sign in to comment