diff options
author | Manish Dewangan <manish@codeaurora.org> | 2018-12-13 18:18:59 +0530 |
---|---|---|
committer | Deeraj Soman <sdeeraj@codeaurora.org> | 2019-07-03 15:32:43 +0530 |
commit | 46e079872cf1293539babdbb6bb0ec093fe637b3 (patch) | |
tree | 21e049084829ac7330c3e0ea5c1796011de834ac /qahw_api/src/qahw_api.cpp | |
parent | 007e5e9cd5028f9890d5995a3621a01ad7dd6839 (diff) |
hal: Add API support to stop input stream
Add API support to stop input stream.
Expose in_stop in HAL via QAHW so that clients may call it
when necessary.
Change-Id: I5b1112166453371ab4d79c31fa99fb1f6b3bff3f
Diffstat (limited to 'qahw_api/src/qahw_api.cpp')
-rw-r--r-- | qahw_api/src/qahw_api.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/qahw_api/src/qahw_api.cpp b/qahw_api/src/qahw_api.cpp index f1c75f45..0810ede3 100644 --- a/qahw_api/src/qahw_api.cpp +++ b/qahw_api/src/qahw_api.cpp @@ -678,6 +678,22 @@ ssize_t qahw_in_read(qahw_stream_handle_t *in_handle, } } +int qahw_in_stop(qahw_stream_handle_t *in_handle) +{ + if (g_binder_enabled) { + if (!g_qas_died) { + sp<Iqti_audio_server> qas = get_qti_audio_server(); + if (qas_status(qas) == -1) + return -ENODEV; + return qas->qahw_in_stop(in_handle); + } else { + return -ENODEV; + } + } else { + return qahw_in_stop_l(in_handle); + } +} + uint32_t qahw_in_get_input_frames_lost(qahw_stream_handle_t *in_handle) { ALOGV("%d:%s",__LINE__, __func__); @@ -1544,6 +1560,11 @@ ssize_t qahw_in_read(qahw_stream_handle_t *in_handle, return qahw_in_read_l(in_handle, in_buf); } +int qahw_in_stop(qahw_stream_handle_t *in_handle) +{ + return qahw_in_stop_l(in_handle); +} + uint32_t qahw_in_get_input_frames_lost(qahw_stream_handle_t *in_handle) { ALOGV("%d:%s",__LINE__, __func__); |