3770 Commits

Author SHA1 Message Date
Eric Laurent
1eadf93d99 am c3fb94ca: am 4772f8b8: am 16cfa8dd: Merge "AudioManager: make AudioPortEventHandler static" into lmp-mr1-dev
* commit 'c3fb94caf0d5a4b8f6a3c9bbc6ce31cbfd0ef2f0':
  AudioManager: make AudioPortEventHandler static
2015-01-16 00:05:38 +00:00
Eric Laurent
f076db4070 AudioManager: make AudioPortEventHandler static
Make AudioPortEventHandler and audio port and patch caches
static members of AudioManager. There is only one callback
per process in AudioSystem for audio port updates
and having those non static would not work when more than
one AudioManager instance exists in one app.

Bug: 18727023.
Change-Id: I4c1041dc6441d168be4efa066e14289cc5f41872
2015-01-15 10:13:52 -08:00
Jean-Michel Trivi
757882088f Merge "AudioService: force use impacts BECOMING_NOISY intent" 2015-01-15 17:14:13 +00:00
Jean-Michel Trivi
7e2f371736 AudioService: force use impacts BECOMING_NOISY intent
Update the list of audio devices that cause the
  ACTION_AUDIO_BECOMING_NOISY intent to be broadcast according
  to the FOR_MEDIA forced configuration.
Synchronize access to list of "noisy" audio devices on the
  connected devices, as it can be updated from different
  threads.

Bug 18313377

Change-Id: Iffd95861d0796691350b0e19b596dd1db0567836
2015-01-14 13:42:25 -08:00
Eric Laurent
bd0e6c36d5 am e5a25a76: am ad58ca67: Merge "AudioService: handle stream mute by stream alias" into lmp-mr1-dev automerge: 50085fb
* commit 'e5a25a7689d3b2c8f6e0a047f6dd27f9d6c19ae4':
  AudioService: handle stream mute by stream alias
2015-01-14 21:13:47 +00:00
Eric Laurent
4fb3b60215 AudioService: handle stream mute by stream alias
Handle stream mute/unmute requests at the stream
alias level (like is done volume changes) to be consistent.
E.g a request to mute/unmute a stream will affect all streams
sharing the same alias for volume management.

Bug: 18844550.
Change-Id: Ie2e463c58df0371589150f0ebb9b36c38b14e1be
2015-01-13 12:19:53 -08:00
Eric Laurent
cba9873ee2 Merge commit 'fe254b6e' into manualmerge
Change-Id: If26269b8356155a0cb4c364c971866ec3b7e4ca6
2015-01-13 11:54:38 -08:00
seunghwan.hong
4fe7795347 Prevent AudioService dead lock issue.
Dead lock sequence:
 1. called onSetA2dpConnectionState()
  1-1. synchronized(mConnectedDevices)
 2. called onServiceDisconnected()
  2-1. synchronized(mA2DPAvrcpLock)
 3. waiting to lock(mConnectedDevices) in onServiceDisconnected()
 4. waiting to lock(mA2DPAvrcpLock) in onSetA2dpConnectionState()

========================================================================================
- watchdog issue
----- pid 3306 at 2014-10-14 16:15:12 -----
Cmd line: system_server

"main" prio=5 tid=1 MONITOR
  - waiting to lock <0x4343e9b0> (a java.util.HashMap) held by tid=46 (AudioService)
      at android.bluetooth.BluetoothA2dp$2.onServiceDisconnected(BluetoothA2dp.java:529)

"AudioService" prio=5 tid=46 MONITOR
      - waiting to lock <0x42ab7a58> (a java.lang.Object) held by tid=1 (main)
========================================================================================

Signed-off-by: Seunghwan Hong <seunghwan.hong@lge.com>

Change-Id: I99e061c07be01aabcd26786ef2ebb71f46717b93
2015-01-13 08:22:26 +09:00
Eric Laurent
695233fe83 Merge "AudioService: send connection intent for HDMI ARC device" into lmp-mr1-dev 2015-01-12 15:39:45 +00:00
Rachad
9eed8f9a5e am 2a7991ee: am 6d3cff12: Merge "MediaCodec: Added E-AC3 mime type (@hide)." into lmp-mr1-dev automerge: b60bb35
* commit '2a7991ee2f331c242ff9f7b87058e64b50a616fd':
  MediaCodec: Added E-AC3 mime type (@hide).
2015-01-10 01:37:29 +00:00
Rachad
6d3cff1264 Merge "MediaCodec: Added E-AC3 mime type (@hide)." into lmp-mr1-dev 2015-01-10 01:23:35 +00:00
Lajos Molnar
7f94b52fc7 Merge "MediaCodec/Image: handle null cropRect correctly" 2015-01-10 01:12:33 +00:00
Lajos Molnar
98840f2bd2 Merge "media: add support for 160-byte image info in MediaCodec" 2015-01-10 01:10:24 +00:00
Paul McLean
96798efe99 Merge "Support for simultaneous USB Audio Devices connect/disconnect" 2015-01-09 23:12:37 +00:00
Eric Laurent
6fa4245589 AudioService: send connection intent for HDMI ARC device
Bug: 18921279.
Change-Id: I1e23b5aed7a2835feb0fea2a412f3622c01cbe55
2015-01-09 15:09:40 -08:00
Paul McLean
0a8f06922f Support for simultaneous USB Audio Devices connect/disconnect
Attach/Detach logic
Decoupling card# and list index
Modern loop constructs
Consistent logging flags
Add class/type flags to device "address" string.
Factored UsbAudioDevice out of UsbAudioManager.

Bug: 18399845
Bug: 18717784

Change-Id: I6f185e1c24091d4c0d21eb7e922a1496748d32c3
2015-01-09 14:56:43 -08:00
RoboErik
effe42e253 Merge "Reload MediaBrowser children on each call to subscribe" 2015-01-08 19:54:34 +00:00
RoboErik
7554d099e7 Reload MediaBrowser children on each call to subscribe
Only one callback can be set on a given media id on MediaBrowser. When you
try to subscribe with a new callback it replaces the old callback, but it
wasn't resending the child data for the id. This causes calling subscribe
again also cause the data to be reloaded and sent to the app again.

bug:18683452
Change-Id: I2d30dbbbfe07cb9a720fb6d65664c1c4c58cb637
2015-01-07 10:14:04 -08:00
Andy Hung
8528ed43b4 Use channelCountFromOutChannelMask in AudioTrack
Change-Id: I3bac3f9bae0816f78db1dc410963274eb0439e10
2015-01-06 16:24:59 -08:00
Glenn Kasten
cd4ac0a204 Merge "Fix build" 2014-12-29 19:08:48 +00:00
Glenn Kasten
41edd7cb86 Merge "Update API documentation for static AudioTrack" 2014-12-29 19:08:04 +00:00
Glenn Kasten
b5e5efbab8 Fix build
Change-Id: I1119c37ac317d0ce86c53a6c134c664d2f1c2cb3
2014-12-29 08:17:56 -08:00
John Spurlock
aa5adac6d2 am af84e073: Merge "Audio Policy: Clear calling identity for all paths setting ringer mode." into lmp-mr1-dev automerge: db41690
automerge: bbe3087

* commit 'bbe3087ec08b22bf3778e1ed77a0d6bfc13611a4':
  Audio Policy: Clear calling identity for all paths setting ringer mode.
2014-12-28 05:57:49 +00:00
Jean-Michel Trivi
d3f58b0214 am 98ba8409: am 996af72b: Merge "AudioRecord: filter attributes" into lmp-mr1-dev
automerge: 6fa5d8d

* commit '6fa5d8dab0314e095af07f8e58c76a3af3de0c15':
  AudioRecord: filter attributes
2014-12-26 20:33:40 +00:00
John Spurlock
af84e073bc Merge "Audio Policy: Clear calling identity for all paths setting ringer mode." into lmp-mr1-dev 2014-12-24 01:16:14 +00:00
Glenn Kasten
ac322096d8 Update API documentation for static AudioTrack
Change-Id: Ie9e2c020680a5264eb0074f30f33eb1204c1a106
2014-12-23 16:52:50 -08:00
Rachad
6564f5be74 MediaCodec: Added E-AC3 mime type (@hide).
Bug: 17883772
Change-Id: I48b2ab64812d860bb1a01d0a14e10690b86c4519
2014-12-23 16:12:44 -08:00
John Spurlock
af88a19165 Audio Policy: Clear calling identity for all paths setting ringer mode.
For proper appops bookkeeping and zen setting changes.

Bug: 18832923
Change-Id: Ic029d3226458ca1a9229a0bc5726bedd5e117ad7
2014-12-23 16:14:44 -05:00
Jean-Michel Trivi
996af72b0c Merge "AudioRecord: filter attributes" into lmp-mr1-dev 2014-12-22 18:55:40 +00:00
Jean-Michel Trivi
43bcd8fa74 AudioRecord: filter attributes
When creating an AudioRecord instance, filter the tags in the
  AudioAttributes to remove tags that are handled at the Java
  layer.

Bug: 18733215
Bug: 18736417

Change-Id: I16a3497742086deced4e8677bd6231290396c5f6
2014-12-22 18:15:32 +00:00
Eric Laurent
ddac2a7b31 am 05fce092: am 8d24fe23: Merge "AudioService: fix permission check." into lmp-mr1-dev
automerge: b418537

* commit 'b4185370d22457e8893ab5da07870e6d56910fbe':
  AudioService: fix permission check.
2014-12-19 17:31:14 +00:00
Eric Laurent
8d24fe235a Merge "AudioService: fix permission check." into lmp-mr1-dev 2014-12-19 17:11:28 +00:00
Oliver Woodman
c2597f0e09 am 9aa5cb76: am 69fd01d3: Merge "MediaSessionLegacyHelper uses global Application context" into lmp-mr1-dev
automerge: 20e52c3

* commit '20e52c3453b2683cccfc4ac0841c9d6ef0796f88':
  MediaSessionLegacyHelper uses global Application context
2014-12-19 11:49:15 +00:00
Oliver Woodman
69fd01d3e6 Merge "MediaSessionLegacyHelper uses global Application context" into lmp-mr1-dev 2014-12-19 11:37:04 +00:00
Eric Laurent
38edfda9bd AudioService: fix permission check.
Clear caller identity before calling TelecomManager.isInCall().

Bug: 18702149.
Change-Id: Ie057f3f261fc0a36dff51840cc8390408621d3bd
2014-12-18 17:40:43 -08:00
Jean-Michel Trivi
9b5257c9c9 MediaSessionLegacyHelper uses global Application context
MediaSessionLegacyHelper used a Context passed by an application
  which can cause a leak of Activity instances. Use the global
  Application context instead.
Also prevent crash if a null Context is supplied (method not
  documented as requesting a non-null Context).

Bug 18767503

Change-Id: I8281047d0af233a323f3fc11ababedff848829ec
2014-12-18 16:42:59 -08:00
John Spurlock
01a8d29e27 am caba3603: am e7f301a0: Merge "Audio policy: Fix deprecated shouldVibrate api." into lmp-mr1-dev
automerge: 09ab7d0

* commit '09ab7d0663210f7b87c830b4560474a05564c37a':
  Audio policy: Fix deprecated shouldVibrate api.
2014-12-17 20:27:39 +00:00
John Spurlock
57627794b6 Audio policy: Fix deprecated shouldVibrate api.
And apply zen mode immediately to avoid race conditions
in tests.

Bug: 18702149
Change-Id: Iad156a29b9e6a5998e7c2dafa8b79a71447066f9
2014-12-17 12:34:00 -05:00
Nick Chalko
922a6f3766 Include documentation for a null surface in TvInputService.Session.onSetSurface.
Bug: 18718144
Change-Id: I359a918da4ceeb01e44b38e6e82a501c0360e681
2014-12-16 18:58:14 -08:00
Jinsuk Kim
c45ea929bc am d8858fa9: am a2bc055e: Merge "audioservice: Clear calling identity upon calling HdmiControlService" into lmp-mr1-dev
automerge: 584c3df

* commit '584c3dfb53f7a795627a4ea8082ff54e83e4336a':
  audioservice: Clear calling identity upon calling HdmiControlService
2014-12-13 23:55:40 +00:00
Jinsuk Kim
a2bc055eeb Merge "audioservice: Clear calling identity upon calling HdmiControlService" into lmp-mr1-dev 2014-12-13 23:41:48 +00:00
Chong Zhang
e079f8ee2d am d4bef185: am bb177db1: Merge "parse bitrate range for video/audio caps" into lmp-mr1-dev
automerge: d7383a8

* commit 'd7383a8f00b533d00dc48f7aca7ee89d1fc52a36':
  parse bitrate range for video/audio caps
2014-12-12 21:07:38 +00:00
Chong Zhang
bb177db1fe Merge "parse bitrate range for video/audio caps" into lmp-mr1-dev 2014-12-12 20:49:36 +00:00
Chong Zhang
216e11dcbb parse bitrate range for video/audio caps
Bug: 18684228
Change-Id: Ib5c3682bb1dfa338b99352ea040edcb99d86ef0b
2014-12-12 11:34:42 -08:00
Jinsuk Kim
48cbf292ba audioservice: Clear calling identity upon calling HdmiControlService
This makes sure that accessing the HdmiControlService via audio service
should be possible without the system permission.

Bug: 18730526
Change-Id: I05b364d8e38218eb75f3c08972a06bb2d71a982b
2014-12-13 02:22:19 +09:00
Eric Laurent
7a27bc3a76 am 09378975: resolved conflicts for merge of 5196dd04 to lmp-mr1-dev-plus-aosp
* commit '093789755e5549bd8676d268a6f69b1d6db5026b':
  AudioSystem JNI: Add audio policy custom mixes registration
2014-12-10 21:57:35 +00:00
Michael Wright
18a635c2a1 am 584674c3: am c6de3212: Merge "Don\'t try to scale the bitmaps for null MediaMetadata." into lmp-mr1-dev automerge: 422db53
* commit '584674c39dad11be182ea3763df557d35554157b':
  Don't try to scale the bitmaps for null MediaMetadata.
2014-12-10 21:32:45 +00:00
Jeff Sharkey
f16df1f34d am 236dc2c8: am 1102e712: Merge "Throw IOException when missing default ringtone." into lmp-mr1-dev automerge: 8650c35
* commit '236dc2c81d9bb2a38b29dd1a4c7e23be25290ef2':
  Throw IOException when missing default ringtone.
2014-12-10 21:32:39 +00:00
Ruben Brunk
fe6a5ae924 am 28089cc3: Merge "Camera2: Allow rendering to arbitrary surface sizes in LEGACY mode." into lmp-mr1-dev automerge: 3ef5033 automerge: 6d98265
* commit '28089cc39b0247d5e854a1a44cd8af17464b9e36':
  Camera2: Allow rendering to arbitrary surface sizes in LEGACY mode.
2014-12-10 17:44:36 +00:00
Eric Laurent
65bc1125b4 Merge "AudioSystem JNI: Add audio policy custom mixes registration" into lmp-mr1-dev 2014-12-10 01:33:09 +00:00