summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2017-12-19 01:41:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-12-19 01:41:17 +0000
commit0763ee2450949633bcb87b6729927095acb5f58a (patch)
treef1111443597ac2bf9d9138c3198d46be7ad63113
parent41f595852236595f0e946524e0913d47426d2517 (diff)
parent3d38c6031725b09385e1540ce4f6d5f45d7011a9 (diff)
downloadlibhardware-0763ee2450949633bcb87b6729927095acb5f58a.tar.gz
Merge "Remove unused variables/labels to eliminate compile warnings."
-rw-r--r--modules/usbaudio/audio_hal.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/modules/usbaudio/audio_hal.c b/modules/usbaudio/audio_hal.c
index e93396ff..9b606b75 100644
--- a/modules/usbaudio/audio_hal.c
+++ b/modules/usbaudio/audio_hal.c
@@ -363,7 +363,6 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
struct stream_out *out = (struct stream_out *)stream;
- int routing = 0;
int ret_value = 0;
int card = -1;
int device = -1;
@@ -641,7 +640,9 @@ static int adev_open_output_stream(struct audio_hw_device *hw_dev,
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;
@@ -655,11 +656,6 @@ static int adev_open_output_stream(struct audio_hw_device *hw_dev,
*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,
@@ -771,9 +767,6 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs)
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;
@@ -868,8 +861,6 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer, size_t byte
in->standby = false;
}
- 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).
@@ -1198,7 +1189,6 @@ static int adev_dump(const struct audio_hw_device *device, int fd)
static int adev_close(hw_device_t *device)
{
- struct audio_device *adev = (struct audio_device *)device;
free(device);
return 0;