2022-10-15 07:53:14 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: codeworkx <daniel.hillenbrand@codeworkx.de>
|
|
|
|
Date: Mon, 1 Jul 2019 06:36:30 +0000
|
|
|
|
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
|
|
|
|
---
|
|
|
|
hal/audio_extn/audio_extn.h | 4 ++++
|
|
|
|
hal/audio_extn/utils.c | 2 ++
|
|
|
|
2 files changed, 6 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
|
2023-11-05 19:09:27 -05:00
|
|
|
index 175715f1e3..b70e24f7e3 100644
|
2022-10-15 07:53:14 -04:00
|
|
|
--- a/hal/audio_extn/audio_extn.h
|
|
|
|
+++ b/hal/audio_extn/audio_extn.h
|
2023-07-14 17:27:20 -04:00
|
|
|
@@ -873,7 +873,11 @@ bool audio_extn_utils_is_dolby_format(audio_format_t format);
|
2022-10-15 07:53:14 -04:00
|
|
|
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
|
|
|
|
bool audio_extn_utils_is_vendor_enhanced_fwk();
|
|
|
|
int audio_extn_utils_get_vendor_enhanced_info();
|
|
|
|
int audio_extn_utils_get_app_sample_rate_for_device(struct audio_device *adev,
|
|
|
|
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
|
2023-10-03 17:45:51 -04:00
|
|
|
index be20e12953..981cad8e1e 100644
|
2022-10-15 07:53:14 -04:00
|
|
|
--- a/hal/audio_extn/utils.c
|
|
|
|
+++ b/hal/audio_extn/utils.c
|
2023-10-03 17:45:51 -04:00
|
|
|
@@ -3315,6 +3315,7 @@ int audio_extn_utils_get_channels_from_string(const char *id_string)
|
2022-10-15 07:53:14 -04:00
|
|
|
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);
|
2023-10-03 17:45:51 -04:00
|
|
|
@@ -3323,6 +3324,7 @@ void audio_extn_utils_release_snd_device(snd_device_t snd_device)
|
2022-10-15 07:53:14 -04:00
|
|
|
audio_extn_listen_update_device_status(snd_device,
|
|
|
|
LISTEN_EVENT_SND_DEVICE_FREE);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
int audio_extn_utils_get_license_params(
|
|
|
|
const struct audio_device *adev,
|