Revert "stagefright: Disable HSR for now"

 * Adding support for HSR on new chips.

This reverts commit 23373ed880fc124f20a6ee90e539576ffbfddba8.

Change-Id: I468498e72bae874184bdbb85cbc92c735365b403
libstagefright: HSR: Read framerate from HSR key

- HSR and HFR keys are made mutually exclusive now.
- In case of HSR, HSR key will be set with requested frame rate and
  HFR key is not set.
- In case of HFR, HFR key will be set with requested frame rate and
  HSR key is not set.
- Check
     if video-hfr key is set
        set kKeyHFR with HFR key value passed by camera
     else check video-hsr key, if set
        set kKeyHSR with HSR key value passed by camera

Change-Id: Ic7ad098137812ad78afdc326334fa390404075fc
libstagefright: use appropriate hevc decoder on 8916 and 8939

8916 supports HEVC software decoder and 8939 support h/w decoder.
Based on media.swhevccodectype and media.hwhevccodectype properties values
instantiate appropriate HEVC decoder.

Change-Id: Ic3d37e6184db256f4d83bfe74b67271b20f94ec0
camera: Always enable preview metadata

 * Remove the ifdefs which enable/disable the preview metadata during
   start/stop preview.  This causes issues with face detection and
   other uses on new hardware.
 * I am not aware of any hardware which still needs this.

Change-Id: I3dd0941a61affb4862a2e8f4f0c2cf59c95b150e
stagefright: Avoid querying time from AudioPlayer after audio EOS

If a clip's audio track is shorter than its video track, the system
clock is used as the time source after audio EOS. However AwesomePlayer
continues to query the media time from AudioPlayer within
onVideoLagUpdate. This may take longer than the expected onVideoEvent
interval of 20 ms which can cause delayed or dropped frames.

Additionally, if onVideoEvent is more than 500 ms late, AwesomePlayer
triggers a video-only seek to the incorrect audio EOS media time. Since
the system clock continues to tick, video becomes even later after seek
and seek is triggered again, resulting in a continuous seek.

Stop querying the media time from AudioPlayer after audio EOS to avoid
this scenario.

Change-Id: I5c56a51509f8787d384696c703a9327b0fa5dbac
CRs-Fixed: 739308
disable camera sounds (3/3)

Change-Id: Iff4eb5ca7dd13038bf852a76d0c605814864497a
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
screenrecord: Add audio support

Adds audio recording to the screenrecord system. Note that
while recording, the audio is muted from the device output,
and that the audio volume is controlled separately (so make
sure to turn up your volume if you hear nothing).
Audio from the microphone can also be recorded by adding
--microphone to the command line.

Change-Id: I97dfcaf3d93b786c5466e1f4215549e3d015bcf0
screenrecord: Enable SUBMIX_IN as well and cleanup on exit

While on Nexus 5/Nexus 7 (AOSP QCOM audio), trying to turn on
SUBMIX_IN fails and is not needed, it is required on Find 5
and N1 (CAF QCOM audio), or otherwise SUBMIX_OUT won't turn
on.
We also now release the audio routing as it wouldn't revive
the audio speakers otherwise.

Change-Id: I0f80a232304733e0b0a834b188b8cfa5b88915f3