Loading services/audioflinger/Threads.cpp +56 −43 Original line number Diff line number Diff line Loading @@ -697,6 +697,10 @@ void AudioFlinger::ThreadBase::processConfigEvents_l() String8 channelMaskToString(audio_channel_mask_t mask, bool output) { String8 s; const audio_channel_representation_t representation = audio_channel_mask_get_representation(mask); switch (representation) { case AUDIO_CHANNEL_REPRESENTATION_POSITION: { if (output) { if (mask & AUDIO_CHANNEL_OUT_FRONT_LEFT) s.append("front-left, "); if (mask & AUDIO_CHANNEL_OUT_FRONT_RIGHT) s.append("front-right, "); Loading Loading @@ -734,12 +738,21 @@ String8 channelMaskToString(audio_channel_mask_t mask, bool output) { if (mask & AUDIO_CHANNEL_IN_VOICE_DNLINK) s.append("voice-dnlink, "); if (mask & ~AUDIO_CHANNEL_IN_ALL) s.append("unknown, "); } int len = s.length(); if (s.length() > 2) { char *str = s.lockBuffer(len); s.unlockBuffer(len - 2); const int len = s.length(); if (len > 2) { char *str = s.lockBuffer(len); // needed? s.unlockBuffer(len - 2); // remove trailing ", " } return s; } case AUDIO_CHANNEL_REPRESENTATION_INDEX: s.appendFormat("index mask, bits:%#x", audio_channel_mask_get_bits(mask)); return s; default: s.appendFormat("unknown mask, representation:%d bits:%#x", representation, audio_channel_mask_get_bits(mask)); return s; } } void AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args __unused) Loading Loading
services/audioflinger/Threads.cpp +56 −43 Original line number Diff line number Diff line Loading @@ -697,6 +697,10 @@ void AudioFlinger::ThreadBase::processConfigEvents_l() String8 channelMaskToString(audio_channel_mask_t mask, bool output) { String8 s; const audio_channel_representation_t representation = audio_channel_mask_get_representation(mask); switch (representation) { case AUDIO_CHANNEL_REPRESENTATION_POSITION: { if (output) { if (mask & AUDIO_CHANNEL_OUT_FRONT_LEFT) s.append("front-left, "); if (mask & AUDIO_CHANNEL_OUT_FRONT_RIGHT) s.append("front-right, "); Loading Loading @@ -734,12 +738,21 @@ String8 channelMaskToString(audio_channel_mask_t mask, bool output) { if (mask & AUDIO_CHANNEL_IN_VOICE_DNLINK) s.append("voice-dnlink, "); if (mask & ~AUDIO_CHANNEL_IN_ALL) s.append("unknown, "); } int len = s.length(); if (s.length() > 2) { char *str = s.lockBuffer(len); s.unlockBuffer(len - 2); const int len = s.length(); if (len > 2) { char *str = s.lockBuffer(len); // needed? s.unlockBuffer(len - 2); // remove trailing ", " } return s; } case AUDIO_CHANNEL_REPRESENTATION_INDEX: s.appendFormat("index mask, bits:%#x", audio_channel_mask_get_bits(mask)); return s; default: s.appendFormat("unknown mask, representation:%d bits:%#x", representation, audio_channel_mask_get_bits(mask)); return s; } } void AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args __unused) Loading