summaryrefslogtreecommitdiffstats
path: root/modules/usbaudio/audio_hw.c
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-06-27 18:39:21 -0700
committerEric Laurent <elaurent@google.com>2014-06-27 18:39:21 -0700
commitfbc02dc16ea43f14e7a0c410bfb787ddcf1b89fb (patch)
treefd3e2536bbc8aeaff680f1872763494b5861bec3 /modules/usbaudio/audio_hw.c
parentfb5fd093db65913f25d8fcdb962a11030c06874f (diff)
downloadhardware_libhardware-fbc02dc16ea43f14e7a0c410bfb787ddcf1b89fb.zip
hardware_libhardware-fbc02dc16ea43f14e7a0c410bfb787ddcf1b89fb.tar.gz
hardware_libhardware-fbc02dc16ea43f14e7a0c410bfb787ddcf1b89fb.tar.bz2
usb audio: fix capture channel conversion
Change-Id: Ibdff053bd6ecc4bf2bc8bb51384098911f52f6ef
Diffstat (limited to 'modules/usbaudio/audio_hw.c')
-rw-r--r--modules/usbaudio/audio_hw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/usbaudio/audio_hw.c b/modules/usbaudio/audio_hw.c
index b88fa53..3a6c5c9 100644
--- a/modules/usbaudio/audio_hw.c
+++ b/modules/usbaudio/audio_hw.c
@@ -1188,14 +1188,14 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer, size_t byte
/* Num Channels conversion */
if (num_device_channels < num_req_channels) {
num_read_buff_bytes =
- contract_channels_16(read_buff, num_device_channels,
- out_buff, num_req_channels,
- num_read_buff_bytes / sizeof(short));
- } else {
- num_read_buff_bytes =
expand_channels_16(read_buff, num_device_channels,
out_buff, num_req_channels,
num_read_buff_bytes / sizeof(short));
+ } else {
+ num_read_buff_bytes =
+ contract_channels_16(read_buff, num_device_channels,
+ out_buff, num_req_channels,
+ num_read_buff_bytes / sizeof(short));
}
}
}