summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2012-10-29 18:42:43 -0700
committerJohn Grossman <johngro@google.com>2012-10-29 18:54:12 -0700
commit5debe92591363de3d73bc32b62f23df707b1aecf (patch)
treee06e5e113fec9dcccf0dfd4dccd1abe23f369713 /audio
parent5a484b753cc72d6a50c1dd3bbf68b3403c741a3a (diff)
downloadhardware_libhardware_legacy-5debe92591363de3d73bc32b62f23df707b1aecf.zip
hardware_libhardware_legacy-5debe92591363de3d73bc32b62f23df707b1aecf.tar.gz
hardware_libhardware_legacy-5debe92591363de3d73bc32b62f23df707b1aecf.tar.bz2
Fix a parse error in checkOutputForDevice
Fix a small parsing error in parsing the supported formats and sample rates of a stream out with dynamic values for these parameters. The channel mask parser was properly skipping the "=" in the setting string, but formats and sample rates were not (cauing the first reported format and sample rate to end up being skipped) Change-Id: Id227a44f6b5fc0c223f2ce74f94ebb6abc5fa77d Signed-off-by: John Grossman <johngro@google.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/AudioPolicyManagerBase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index b4f4778..906c3fc 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -1642,7 +1642,7 @@ status_t AudioPolicyManagerBase::checkOutputsForDevice(audio_devices_t device,
reply.string());
value = strpbrk((char *)reply.string(), "=");
if (value != NULL) {
- loadSamplingRates(value, profile);
+ loadSamplingRates(value + 1, profile);
}
}
if (profile->mFormats[0] == 0) {
@@ -1652,7 +1652,7 @@ status_t AudioPolicyManagerBase::checkOutputsForDevice(audio_devices_t device,
reply.string());
value = strpbrk((char *)reply.string(), "=");
if (value != NULL) {
- loadFormats(value, profile);
+ loadFormats(value + 1, profile);
}
}
if (profile->mChannelMasks[0] == 0) {