From 70756a1edc64278d1e45c527ae14c75a27e44e23 Mon Sep 17 00:00:00 2001 From: Alexy Joseph Date: Sun, 15 Nov 2015 23:53:09 -0800 Subject: HAL: Identify Track offload session Support getparameter to retrieve if a particular output is associated with a track offloaded session Change-Id: Ibcc986514f802e59c514fdaa8b2d7f53841047a2 CRs-Fixed: 933740 --- hal/audio_hw.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hal/audio_hw.c b/hal/audio_hw.c index c78bc981..45b8095f 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -2027,6 +2027,21 @@ static char* out_get_parameters(const struct audio_stream *stream, const char *k } } + + ret = str_parms_get_str(query, "is_direct_pcm_track", value, sizeof(value)); + if (ret >= 0) { + value[0] = '\0'; + if (out->flags & AUDIO_OUTPUT_FLAG_DIRECT_PCM) { + ALOGV("in direct_pcm"); + strlcat(value, "true", strlen("true")); + } else { + ALOGV("not in direct_pcm"); + strlcat(value, "false", strlen("false")); + } + str_parms_add_str(reply, "is_direct_pcm_track", value); + str = str_parms_to_str(reply); + } + ret = str_parms_get_str(query, AUDIO_PARAMETER_STREAM_SUP_FORMATS, value, sizeof(value)); if (ret >= 0) { value[0] = '\0'; -- cgit v1.2.3