Remove unused variables/labels to eliminate compile warnings.
Test: built and run on Marlin and testing with various USB peripherals.
Bug:70180519
Change-Id: I68d7d33ffff8983117508e02a76d62c71d708c76
diff --git a/modules/usbaudio/audio_hal.c b/modules/usbaudio/audio_hal.c
index 43d1daf..ef8bb03 100644
--- a/modules/usbaudio/audio_hal.c
+++ b/modules/usbaudio/audio_hal.c
@@ -375,7 +375,6 @@
struct stream_out *out = (struct stream_out *)stream;
- int routing = 0;
int ret_value = 0;
int card = -1;
int device = -1;
@@ -653,7 +652,9 @@
proxy_config.channels = profile_get_closest_channel_count(out->profile, out->hal_channel_count);
proxy_prepare(&out->proxy, out->profile, &proxy_config);
- /* TODO The retry mechanism isn't implemented in AudioPolicyManager/AudioFlinger. */
+ /* TODO The retry mechanism isn't implemented in AudioPolicyManager/AudioFlinger
+ * So clear any errors that may have occurred above.
+ */
ret = 0;
out->conversion_buffer = NULL;
@@ -667,11 +668,6 @@
*stream_out = &out->stream;
return ret;
-
-err_open:
- free(out);
- *stream_out = NULL;
- return -ENOSYS;
}
static void adev_close_output_stream(struct audio_hw_device *hw_dev,
@@ -783,9 +779,6 @@
struct stream_in *in = (struct stream_in *)stream;
- char value[32];
- int param_val;
- int routing = 0;
int ret_value = 0;
int card = -1;
int device = -1;
@@ -880,8 +873,6 @@
in->standby = false;
}
- const alsa_device_profile *profile = in->profile;
-
/*
* OK, we need to figure out how much data to read to be able to output the requested
* number of bytes in the HAL format (16-bit, stereo).
@@ -1246,7 +1237,6 @@
static int adev_close(hw_device_t *device)
{
- struct audio_device *adev = (struct audio_device *)device;
free(device);
return 0;