History log of /external/adhd/cras/src/server/cras_ramp.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
961c12cc9ec95b3c65c2a459e702aab37b1eda76 12-Dec-2016 Cheng-Yi Chiang <cychiang@chromium.org> CRAS: ramp - Add callback to call when ramping is done

Set callback and callback data at cras_ramp_start. When ramping is done,
call that callback with data. This is to set mute control after ramping
is done.

BUG=chromium:669662
TEST=make check

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Change-Id: I24e7880917acfd982de1c11c030868248d5aa2ce
Reviewed-on: https://chromium-review.googlesource.com/422613
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/cras_ramp.h
793f7323adea956466192ff09ab5774c66ba3461 01-Dec-2016 Cheng-Yi Chiang <cychiang@chromium.org> CRAS: ramp - Add a module for ramping

Add cras_ramp module to handle ramping of data.
1. When device goes from mute to unmute, ramp the data from last
scaler to 1. If there is no last scaler, start from 0.
2. When device goes from unmute to mute, ramp the data from last
scaler to 0. If there is no last scaler, start from 1.

For case 1, device will have smooth transition from mute to unmute.
For case 2, ramp can not finish its full duration. This is because device
samples are muted in cras_iodev_put_output_buffer. Also, device output
switch is turned off right away. These need to be changed in the future
so we can have smooth transition from unmute to mute.

BUG=chromium:669662
TEST=make check
Change-Id: I25173becd826053c4fa0b0a3bf9ff0d611352d15
Reviewed-on: https://chromium-review.googlesource.com/415750
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
/external/adhd/cras/src/server/cras_ramp.h