hal: fix concurrent call-recordings with normal recordings .
if one recording is ongoing then currently second open_input_stream
takes uc for compress record.However, if this input is opened for
call recording then it changes the usecase in-between for
call recording leading to a state where inputs are configured
at c_in but not reset because of this in-between change of usecase.
for virtual sources like uplink, downlink, which actually don't record
form hardware input source, don't assign a compress usecase.
Change-Id: I154446fe867af63f0f6e0cb0de6d4a567658050f
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index a4cb2e8..adb47b8 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -796,6 +796,21 @@
return false;
}
+static inline bool audio_is_virtual_input_source(audio_source_t source) {
+ bool result = false;
+ switch(source) {
+ case AUDIO_SOURCE_VOICE_UPLINK :
+ case AUDIO_SOURCE_VOICE_DOWNLINK :
+ case AUDIO_SOURCE_VOICE_CALL :
+ case AUDIO_SOURCE_FM_TUNER :
+ result = true;
+ break;
+ default:
+ break;
+ }
+ return result;
+}
+
int route_output_stream(struct stream_out *stream,
struct listnode *devices);
int route_input_stream(struct stream_in *stream,