summaryrefslogtreecommitdiffstats
path: root/libaudio
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2010-10-15 16:14:53 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2010-10-15 16:14:53 -0700
commitd2451882d21a3c792bf2e1b04ce25fc690aabe06 (patch)
tree9379b98a80e966c172c330732efb47ff726fbecb /libaudio
parent395ca07343256ce12f14fbef845da6b0c6f38349 (diff)
downloaddevice_samsung_crespo-d2451882d21a3c792bf2e1b04ce25fc690aabe06.zip
device_samsung_crespo-d2451882d21a3c792bf2e1b04ce25fc690aabe06.tar.gz
device_samsung_crespo-d2451882d21a3c792bf2e1b04ce25fc690aabe06.tar.bz2
Contribute to fixing bug 3060335 Make Crespo honour voice rec mode
Crespo libaudio fails to use the Voice Recognition configuration when doing a recording on the VOICE_RECOGNITION input because the associated setParameter always returns before the value is set due to a cast error. Change-Id: Icc7c7edb5f680de82140d6ece4e536c0d9cb2419
Diffstat (limited to 'libaudio')
-rwxr-xr-xlibaudio/AudioHardwareALSA.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libaudio/AudioHardwareALSA.cpp b/libaudio/AudioHardwareALSA.cpp
index b05b979..ee896e0 100755
--- a/libaudio/AudioHardwareALSA.cpp
+++ b/libaudio/AudioHardwareALSA.cpp
@@ -2128,7 +2128,7 @@ status_t ALSAControl::set(const char *name, unsigned int value, int index)
snd_ctl_elem_info_get_id(info, id);
snd_ctl_elem_type_t type = snd_ctl_elem_info_get_type(info);
unsigned int count = snd_ctl_elem_info_get_count(info);
- if ((unsigned int)index >= count) return BAD_VALUE;
+ if (index >= (int)count) return BAD_VALUE;
if (index == -1)
index = 0; // Range over all of them