Merge "Only derive capture app type if input stream is available" into oc-dr1-dev am: ea5a81ca4d
am: 92143fd4ba
Change-Id: Ia24d376a0fcfeebb3e946b8f19e2030481c6f871
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index c9d2397..bd39f0b 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -214,6 +214,9 @@
int *app_type,
int *sample_rate)
{
+ if (usecase->stream.in == NULL) {
+ return -1;
+ }
struct stream_in *in = usecase->stream.in;
struct stream_app_type_cfg *app_type_cfg = &in->app_type_cfg;
@@ -264,6 +267,9 @@
int *app_type,
int *sample_rate)
{
+ if (usecase->stream.out == NULL) {
+ return -1;
+ }
struct stream_out *out = usecase->stream.out;
struct stream_app_type_cfg *app_type_cfg = &out->app_type_cfg;