Share local time frequency for all tracks & mixers

Change-Id: I5e6f0e371f728a5225c2fa6f778c109449d33602
Change audio flinger to user HAL master mute if available

Hand merge from ics-aah

> Change audio flinger to user HAL master mute if available: DO NOT MERGE
>
> Replicate the pattern used for HAL master volume support to make use
> of master mute support if the HAL supports it.  This is part of the
> change needed to address bug 6828363.  Because of the divergences
> between ICS and master, this change will need to be merged by hand.
>
> Signed-off-by: John Grossman <johngro@google.com>
> Change-Id: I6d83be524021d273d093bcb117b8f2fe57c23685

Change-Id: I32280582905c969aaec2bb166ec5c61df82d737a
Signed-off-by: John Grossman <johngro@google.com>
AudioFlinger: Better handling for master volume/mute

Changes to address bug 6842827.

When a HAL is loaded, cache whether or not the HAL supports
set_master_volume/mute in the AudioHwDevice structure.  Store an
AudioHwDevice in AudioStream(In|Out) structures instead of just an
audio_he_device_t.  This give threads (PlaybackThreads in
particular) access to the cached capabilities.

When setting master volume/mute, change the system to always set the
setting on all HAL which support it and also to set the setting on all
PlaybackThreads.  Change PlaybackThreads to apply the setting at the
in SW mix stage of the pipeline if its assigned HAL does not support
the setting, or to ignore the setting of the assigned HAL does support
it.

Change-Id: Ia14137a30b4c3ee6f2d7ddcc8cba87bf5eec87f4
Signed-off-by: John Grossman <johngro@google.com>
Merge "Share local time frequency for all tracks & mixers"
am c23f3863: Reconcile with jb-mr1-release

* commit 'c23f3863ccd5dfbba5a0339a17a21ac35d3efead':
am 65357239: am c620cbd7: Refactoring how the box table entries are stored in MPEG4Writer

* commit '6535723967c6dd7ce42669cd8815da82faab911a':
  Refactoring how the box table entries are stored in MPEG4Writer
am ddeeaec2: Sync with jb-mr1-dev

* commit 'ddeeaec2dd2ff5cf10bc3f87f22401bfcbd0fd48':
  Should really compare the pos to the total number of values in get() and set() methods in ListTableEntries class
Removed a CHECK_EQ that is not needed.

'what' was just compared against Renderer::kWhatFlushComplete before entering the
if block.

Change-Id: I72c5c156f814621a24439d89e150c4e0d90edcbb
am 009be42b: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit '009be42baa711e9bd75a205f7d1ffd56b7237b92':
am 637a3676: am 836b81f3: Camera2: Improve threading safety

* commit '637a3676b1936d5202da5be6d38ccda5e6ac4aae':
  Camera2: Improve threading safety
am f0f4a0ab: am 428b77a2: Camera2: Improve formatting of debugging dump

* commit 'f0f4a0abe917fc9f18566fd67ef43e79b711134f':
  Camera2: Improve formatting of debugging dump
am 8d058d89: am 5665fde6: Merge "Start adding support for multiple record tracks" into jb-mr1-dev

* commit '8d058d89fd4d46bbacbb8f2dc9bd52e94cd69e56':
  Start adding support for multiple record tracks
am e58b04ec: am 3788a393: Merge "Allows MediaMetadataRetriever to retrieve video rotation angle" into jb-mr1-dev

* commit 'e58b04ec51b43c9f6c90c5dbf2d5c2ce9c743236':
  Allows MediaMetadataRetriever to retrieve video rotation angle
am b2676a29: am 44cda3a4: Don\'t wait for presentation complete if terminated

* commit 'b2676a2920c6514ae9405cc56dfa2db49f096016':
  Don't wait for presentation complete if terminated
am 174e8f67: Shutter sound is heard at the end of the recorded video

* commit '174e8f67cf909ca293d45face46bd0a65199e211':
  Shutter sound is heard at the end of the recorded video
am 58defc8e: am 9007619d: Merge "Shutter sound is heard at the end of the recorded video" into jb-mr1-dev

* commit '58defc8e21031444f69558a9f5e632f81fbdba70':
  Shutter sound is heard at the end of the recorded video
am 141e0810: am 2f0632f1: Adjust fire time of a timed text message before firing it.

* commit '141e0810935c24766282b48116eec2657b30b25b':
  Adjust fire time of a timed text message before firing it.
am dd43ebd3: am bb6bc849: Adds resume() function

* commit 'dd43ebd391519d73a94f7d21a0a2e58dda2e2d20':
  Adds resume() function
am 249ab517: am 6472badc: Fix: status checking in TimedTextDriver.

* commit '249ab5171fe04a1fa264dad056dcc47ddddbc957':
  Fix: status checking in TimedTextDriver.
am cc788456: am c9729ca1: Unifying TimedTextDriver\'s resume() and start().

* commit 'cc788456c867f8e97e40b0cb8dab58ce9db4a27b':
  Unifying TimedTextDriver's resume() and start().