History log of /external/adhd/cras/src/server/linear_resampler.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
66327949f776c34ccdcf8704d08627f07445819a 12-Oct-2016 Cheng-Yi Chiang <cychiang@chromium.org> CRAS: linear_resampler - Add check in linear_resampler_create

BUG=chromium:651171
TEST=on peach_pit, play youtube and vocaroo.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Change-Id: I0ab3286b44cadf44f8cf6e725a02487eb3143348
Reviewed-on: https://chromium-review.googlesource.com/397081
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
e3208d0c067f7d1339787ff3b6686e05ded995e3 11-Jun-2015 Hsin-Yu Chao <hychao@chromium.org> CRAS: linear_resampler - Fix resample frames calculation

Originally the in/out frames calculation is not accurate enough,
that it always result a number sightly larger then the actual
number of converted frames, which could cause problem in the
usage of chained SRC.
Add into account the offset state of the linear resampler, so
the in <-> out frames calculation aligns with the exact converted
frame numbers of the next call to linear_resampler_resample().

BUG=chromium:460515
TEST=Apply whole patch set, open flash video(44.1KHz, 2048 fr)
and a web audio demo page(48KHz, 1024 fr) with two Jabra
speakerphones enabled. Verify audio does not stop when play
for an hour long.

Change-Id: I144854a5afca7c73c1efff8af9d49ff0fab4ace2
Reviewed-on: https://chromium-review.googlesource.com/276839
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
1dfe471f6c3fa82dbcb56310a37f47e2f98b3b98 16-Jun-2015 Hsin-Yu Chao <hychao@chromium.org> CRAS: linear_resampler - Fix corner cases

In linear_resampler_resample function, if dst_frames is zero
then it's incorrect to iterate dst_idx from zero and it will
leak one frames in the source buffer.
If src_frames points to an unsigned of value 0, we should not
minus one from this unsigned value and then use it to bound
index.

BUG=chromium:460515
TEST=unittest

Change-Id: I9d7aff853666532701d528194e2ac274a3f0c6af
Reviewed-on: https://chromium-review.googlesource.com/277528
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
f78e68857e174b7e6ec45377e31edaa63e09dc9a 09-Jun-2015 Hsin-Yu Chao <hychao@chromium.org> CRAS: linear_resampler - Fix linear resampler accuracy

Fix a bug that we assigned a float to unsigned which loses
some accuracy.

BUG=chromium:460515
TEST=Apply whole patch set, open flash video(44.1KHz, 2048 fr)
and a web audio demo page(48KHz, 1024 fr) with two Jabra
speakerphones enabled. Verify audio does not stop when play
for an hour long.

Change-Id: I8149e016acc98b9313c9d050de0a08910fb4c9cf
Reviewed-on: https://chromium-review.googlesource.com/276837
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
ceea696aa34a404032555f9a169f2f7c84438e91 19-Dec-2014 Hsin-Yu Chao <hychao@chromium.org> CRAS: linear_resampler - Fix crash at linear interpolation

Linear interpolcation will exceed array bound if the estimated
position falls on the last frame of source buffer. Just assign
its value to destintaion buffer in that case.

BUG=chromium:442426
TEST=Test keyboard mic recording on Pixel

Change-Id: If8e2c5d45ff872cc73733cff5706120e5f655dc7
Reviewed-on: https://chromium-review.googlesource.com/236855
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
084401521b297857987b2b3ece787c16cacdbbcc 03-Oct-2014 Hsin-Yu Chao <hychao@chromium.org> CRAS: linear_resampler - increase resample precision

When doing SRC, the actual rate is trimmed to the floor
integer before use and causing a precision lost. Multiply
the numerator and denominator of the rate factor by 100,
so it takes more than 1 day for the lost frames count to be
accumulated to 1024.

BUG=chromium:420589
TEST=Play youtube to two active devices

Change-Id: I6bcac51e01ea6deba16462b201c783ea1a85f96e
Reviewed-on: https://chromium-review.googlesource.com/221706
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
b3ebd1d69038925d04ba743aebfdbb8b9cf71d9b 17-Oct-2014 Hsin-Yu Chao <hychao@chromium.org> CRAS: fmt_conv - Add linear resampler to fmt_conv

Add a linear resampler to fmt_conv to adjust device rate skew.
The linear resampler will be used before or after the main
format conversion depend on stream's direction.

BUG=chromium:420589
TEST=unittest

Change-Id: Ib1c17a70e6327bfa5a3263af82e96cb52783f151
Reviewed-on: https://chromium-review.googlesource.com/224628
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c
8ddfd645c98089cf6631bef2c4cb79daa92b2757 24-Sep-2014 Hsin-Yu Chao <hychao@chromium.org> CRAS: server - Add linear resampler

Linear resampler will be used to correct clock skew of
input/output devices.

BUG=chromium:420589
TEST=unittest

Change-Id: Ie0ce824f91cad0b074a7d2404c2d3aaff5bf583c
Reviewed-on: https://chromium-review.googlesource.com/220155
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/linear_resampler.c