screenrecord: allow force landscape mode

Some devices' hardware encoder do not support encoding over a
specified height, which may be smaller than the device's display
height in portrait mode. Add a mode which uses landscape encoding
and rotation hint to overcome the limitation.

Change-Id: Icdd8de05d55c2aaaacbcaba4857173c78ef76a24
Merge "screenrecord: allow force landscape mode" into cm-11.0
frameworks/av: Add audio parameter for sound card status

Add a parameter to signal sound card status to audio HAL.
This parameter is set on a change in sound card state.

Change-Id: I9c2265b6197f654f6dab90f7d0b87a3a0921a6fb
AudioFlinger: Handle sound card status change

1) Update Audio HAL with sound card status change
2) Call invalidate tracks API on all playback threads so that the
   associated tracks can handle the sound card status change as a teardown
   event

Change-Id: I9b8c2244eb80cc08935144affe529591e0728616
audio: do not allow FAST output for voice call stream type

- Some VoIP applications set AUDIO_OUTPUT_FLAG_FAST while opening
audio output which causes low latency path to be selected. Clear
the flag explictly if the stream type is STREAM_VOICE_CALL
- Add debug messages in Audio Track and Record to print
the requested audio parameters

Change-Id: I7b3d1353ab107effc3f99b99bd9f78270f63097f
libstagefright: Fix incorrect progress bar display during device switch

 -During offload to nonoffload playback switch (speakr to a2dp)
  audiotear down happens which reset current postion and duration.
 -do not reset the file duration during audio tear down and return
  the cached current position if audioplayer is not created.

Change-Id: I924d270d57aee1a9e79cea1c33bbd6bb731b201d
libstagefright: Fix timestamp corruption during offload playback

-Timestamp gets corrupted at EOS of offload playback.
-This happens because the number of samples played returned from
 HAL could be zero if playback has reached EOS and if compress
 handle is invalid / closed.
-If HAL has posted EOS  avoid the update of real time and media
 time with the timestamp from HAL.

CRs-Fixed: 570368
Change-Id: I5ea75f4eda1df0c110bce780e50e3c8ae9b4cd85
Call Record with Alsa

Thanx to avs234