mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
529b47039c
- Functionality tested on mako and klte - In-place upgrade from 17.1 tested working on klte - Compile tested on bacon and klte - Recovery OTA key patch missing, unsure if still needed. - Deblobber needs support for removing vintf manifest paths from vendor Android.bp - Launcher needs more default_workspace grid variants (eg. 4x5)
59 lines
2.4 KiB
Diff
59 lines
2.4 KiB
Diff
From fc4d2c7dc902dc9e36261ab61081df80d49ceb60 Mon Sep 17 00:00:00 2001
|
|
From: codeworkx <daniel.hillenbrand@codeworkx.de>
|
|
Date: Sun, 20 Jan 2019 17:48:20 +0100
|
|
Subject: [PATCH] audio_extn: Fix unused parameter warning in utils.c
|
|
|
|
The unused parameter warning appears if we are not building with
|
|
at least one of the following cflags enabled:
|
|
|
|
* DEV_ARBI_ENABLED
|
|
* SOUND_TRIGGER_ENABLED
|
|
* AUDIO_LISTEN_ENABLED
|
|
|
|
hardware/qcom/audio/hal/audio_extn/utils.c:2522:55: error: unused parameter 'snd_device'
|
|
[-Werror,-Wunused-parameter]
|
|
void audio_extn_utils_release_snd_device(snd_device_t snd_device)
|
|
^
|
|
|
|
Change-Id: I694c683c9bfde60343f0f6ea8d806bc5e24437e6
|
|
(cherry picked from commit 12981fb9f3c8a67bcc362c7badfb9189bc181cda)
|
|
---
|
|
hal/audio_extn/audio_extn.h | 5 +++++
|
|
hal/audio_extn/utils.c | 2 ++
|
|
2 files changed, 7 insertions(+)
|
|
|
|
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
|
|
index c847291fa..9ffdd9c15 100644
|
|
--- a/hal/audio_extn/audio_extn.h
|
|
+++ b/hal/audio_extn/audio_extn.h
|
|
@@ -688,7 +688,12 @@ bool audio_extn_utils_is_dolby_format(audio_format_t format);
|
|
int audio_extn_utils_get_bit_width_from_string(const char *);
|
|
int audio_extn_utils_get_sample_rate_from_string(const char *);
|
|
int audio_extn_utils_get_channels_from_string(const char *);
|
|
+
|
|
+#if !defined(DEV_ARBI_ENABLED) && !defined(SOUND_TRIGGER_ENABLED) && !defined(AUDIO_LISTEN_ENABLED)
|
|
+#define audio_extn_utils_release_snd_device(snd_device) (0)
|
|
+#else
|
|
void audio_extn_utils_release_snd_device(snd_device_t snd_device);
|
|
+#endif
|
|
int audio_extn_utils_get_app_sample_rate_for_device(struct audio_device *adev,
|
|
struct audio_usecase *usecase, int snd_device);
|
|
|
|
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
|
|
index 5ee94143d..202006a35 100644
|
|
--- a/hal/audio_extn/utils.c
|
|
+++ b/hal/audio_extn/utils.c
|
|
@@ -2520,6 +2520,7 @@ int audio_extn_utils_get_channels_from_string(const char *id_string)
|
|
return -EINVAL;
|
|
}
|
|
|
|
+#if defined(DEV_ARBI_ENABLED) || defined(SOUND_TRIGGER_ENABLED) || defined(AUDIO_LISTEN_ENABLED)
|
|
void audio_extn_utils_release_snd_device(snd_device_t snd_device)
|
|
{
|
|
audio_extn_dev_arbi_release(snd_device);
|
|
@@ -2528,3 +2529,4 @@ void audio_extn_utils_release_snd_device(snd_device_t snd_device)
|
|
audio_extn_listen_update_device_status(snd_device,
|
|
LISTEN_EVENT_SND_DEVICE_FREE);
|
|
}
|
|
+#endif
|