From da06cb6142faa3e09cbf7226ca9c75e45661095b Mon Sep 17 00:00:00 2001 From: John Grossman Date: Mon, 29 Oct 2012 18:42:43 -0700 Subject: audio policy: fix dynamic parameter - DO NOT MERGE merge from master: "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 --- audio/AudioPolicyManagerBase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index 5d87399..a082239 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) { -- cgit v1.1