frameworks/av: enable voip flag based on channelcount

voip flag should be enabled based on channelcount instead of
channelmask. Some of voip apps like viber may not use
AUDIO_CHANNEL_OUT_MONO but still configures to single channel
like by using AUDIO_CHANNEL_OUT_FRONT_CENTER.

Change-Id: I3f69a5c50b6e1bb9336e08eb9619e15de2d8a532
CRs-Fixed: 511713
audio: fix meta MIME type failure in MPEG4Writer

- MIME type info included in source->getFormat()
  is not updated properly because only temp
  variable is updated in AudioSource::getFormat().
  MIME type string contains garbage value and it
  results in invalid audio formats.
  MPEG4Writer returns ERROR_UNSUPPORTED and tunnel
  mode recording with 3gpp format fails
- Fix this issue by assigning return value of
  getFormat() to a local variable, and check the
  return value of findCString.

Change-Id: I242fa25a5d4f7b7e2c88fdd855208dcd42883b6c
audioflinger: Fix for removing noise while resuming playback after pause

-Issue: While resuming playback after pausing and seeking to backward,
there is a noise.
-Rootcause: When Resuming a Playback after Pausing and seeking,
AudioResampler's reset() function is resetting their member
variables but derived classes' s member variable are not resetting.
This is causing a noise in Playback because AudioResamplerSinc,
AudioResamplerOrder1 and AudioResamplerCubic's member variables
pointing to some previous state/values.
-Fix: To reset the derived class member variables,
override the reset function in all the derived classes.

Change-Id: I0584947ac203f9470cdc4a680ebccadf60e4e7db
CRs-Fixed: 482838
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2