9173 Commits

Author SHA1 Message Date
Mike Lockwood
c26f67051e am 2d1e078a: am 5ac22aa6: am 2b144a16: Merge "MTP: Fix partial implementation of 5 new audio specific properties" into lmp-mr1-dev
* commit '2d1e078ac45a646ee55bb9aca022dafd143ff95b':
  MTP: Fix partial implementation of 5 new audio specific properties
2015-01-26 19:17:30 +00:00
Mike Lockwood
2d1e078ac4 am 5ac22aa6: am 2b144a16: Merge "MTP: Fix partial implementation of 5 new audio specific properties" into lmp-mr1-dev
* commit '5ac22aa60f773917981f42e64fbc28615871fd3e':
  MTP: Fix partial implementation of 5 new audio specific properties
2015-01-26 19:10:44 +00:00
Elliott Hughes
c4be6461b3 am f51d65ad: Merge "Add missing <string.h> includes." automerge: 82a1a2c automerge: 86b48b3
* commit 'f51d65ade0112c3d50c3d9182f583730a597322b':
  Add missing <string.h> includes.
2015-01-25 20:53:33 +00:00
Elliott Hughes
f51d65ade0 Merge "Add missing <string.h> includes." automerge: 82a1a2c
automerge: 86b48b3

* commit '86b48b3f8056a8efa6857d87dd4f30495e8b0464':
  Add missing <string.h> includes.
2015-01-25 19:27:25 +00:00
Elliott Hughes
35af2c3534 Add missing <string.h> includes.
Change-Id: I188bfe1388fa49f6f79d247aa0d0f4fb089de503
2015-01-25 08:33:36 -08:00
Mike Lockwood
7182774810 MTP: Fix partial implementation of 5 new audio specific properties
In change Ic5b3fb75309893caae1a4f4b56068a543847f1f7, we added partial
support for the MTP properties:

MTP_PROPERTY_AUDIO_WAVE_CODE,
MTP_PROPERTY_BITRATE_TYPE
MTP_PROPERTY_AUDIO_BITRATE
MTP_PROPERTY_NUMBER_OF_CHANNELS
MTP_PROPERTY_SAMPLE_RATE

However we were not returning any values for these properties in the result
of the MTP GetObjectPropList command. Strangely, this triggers a nasty bug
in Windows 7 that results in data loss.  When copying a directory containing
several MP3 files from one location on the device to another, Windows will
copy only some of the files to the new location, but delete all of the originals.
Finishing the implementation of these new object properties for some unknown
reason stops this bad behavior in Windows 7.

Bug: 19018427
Change-Id: I5fd3b91a89b31827d3100686445cef6795fe0f3f
2015-01-23 10:58:38 -08:00
Jean-Michel Trivi
157784b575 Add support for AudioAttributes in AsyncPlayer
As an audio playback API, AsyncPlayer needs to support specifying
  AudioAttributes.
Deprecate play() method with stream type.

Change-Id: Ia9561883e7b398666a3d5d6da4e00324eda6b0e9
2015-01-22 15:32:09 -08:00
Christopher Tate
b6d4b350a1 am 77c96dd8: Merge "Don\'t launch broadcast receiver processes during boot" into lmp-mr1-dev automerge: 8192670
automerge: ebdec3e

* commit 'ebdec3e0921d1495ca712f4f1f7755d975297d14':
  Don't launch broadcast receiver processes during boot
2015-01-21 00:09:39 +00:00
Christopher Tate
ebdec3e092 am 77c96dd8: Merge "Don\'t launch broadcast receiver processes during boot" into lmp-mr1-dev
automerge: 8192670

* commit '8192670937e3dee8e2c521a9ed1118a5782a2912':
  Don't launch broadcast receiver processes during boot
2015-01-20 23:55:00 +00:00
Christopher Tate
267603f3bb Don't launch broadcast receiver processes during boot
Broadcasts that might be sent before the boot process has completed must
be restricted to registered receivers, at least while still in the
middle of booting.

Bug 19060618

Change-Id: Ib4e0990cf252f34344f7a0bd19a0e72919013e0f
2015-01-20 14:21:21 -08:00
Mike Lockwood
3d0fb88138 Merge "Replace broadcasts with calls to IAudioService.setWiredDeviceConnectionState() to report USB device status" 2015-01-17 00:33:42 +00:00
Jean-Michel Trivi
a47d85e8dc am c2230a9d: am ef417bb7: am 6a64a9cd: Merge "Prevent AudioService dead lock issue."
* commit 'c2230a9d1a7bba12b78630a0dfbad7be5c97050f':
  Prevent AudioService dead lock issue.
2015-01-16 17:43:20 +00:00
Jean-Michel Trivi
c2230a9d1a am ef417bb7: am 6a64a9cd: Merge "Prevent AudioService dead lock issue."
* commit 'ef417bb7a06b0d58faa21f42599d7dd4fd9e3ff2':
  Prevent AudioService dead lock issue.
2015-01-16 17:37:29 +00:00
Jean-Michel Trivi
6a64a9cd26 Merge "Prevent AudioService dead lock issue." 2015-01-16 17:23:36 +00:00
Mike Lockwood
2e3434149e Replace broadcasts with calls to IAudioService.setWiredDeviceConnectionState() to report USB device status
Change-Id: Ic96cffaa63b6c6350b76e7cb29398c5f5dc86962
2015-01-16 09:23:15 -08:00
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
c3fb94caf0 am 4772f8b8: am 16cfa8dd: Merge "AudioManager: make AudioPortEventHandler static" into lmp-mr1-dev
* commit '4772f8b841dc1ad50999e2cca3f1d366b325b915':
  AudioManager: make AudioPortEventHandler static
2015-01-15 22:21:58 +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
Yohann Roussel
45a669e5e9 Merge "Fix bad import in VideoDumpActivity" 2015-01-15 17:57:40 +00: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
e5a25a7689 am ad58ca67: Merge "AudioService: handle stream mute by stream alias" into lmp-mr1-dev
automerge: 50085fb

* commit '50085fbccfd08038ba5ec888621d960dbbe21405':
  AudioService: handle stream mute by stream alias
2015-01-13 23:25:05 +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
Yohann Roussel
705555dc46 Fix bad import in VideoDumpActivity
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.

Change-Id: I6a30107e7b4fd5d7ef3dff3380d6829d2a15af3f
2015-01-13 10:24:48 +01: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
fe254b6ed2 am 695233fe: Merge "AudioService: send connection intent for HDMI ARC device" into lmp-mr1-dev
automerge: f672783

* commit 'f67278306b7f4c48f92113a8f1c1ace39c9b62e7':
  AudioService: send connection intent for HDMI ARC device
2015-01-12 16:29:59 +00: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
2a7991ee2f am 6d3cff12: Merge "MediaCodec: Added E-AC3 mime type (@hide)." into lmp-mr1-dev
automerge: b60bb35

* commit 'b60bb35650c7075bc66bf2b8f5c0fbe428092010':
  MediaCodec: Added E-AC3 mime type (@hide).
2015-01-10 01:31:01 +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
Haitao Feng
67f304e2ca Use NULL instead of 0 when invoking CallStaticVoidMethod
static void CallStaticVoidMethod is variable argument function.
if pass 0 to the function like: CallStaticVoidMethod(......, 0),
0 will be treated as INT data type.but in the CallStaticVoidMethod
implement 0 will be treated as pointer data type.Pointer in 64bit
system occupied 8 bytes, but in 64bit system int occupied 4 bytes.
if call function like: CallStaticVoidMethod(......, 0),
only low 4 bytes will be assigned 0.Turned out it actually call
function like this: CallStaticVoidMethod(......, 0xXXXXXXXX00000000).
intent to pass NULL to function but passed non-NULL parameter to
the function.this will cause GCDaemon crash.

Bug: 18911458
Change-Id: I9d700d3790a80dbee6826f64baf9ef5d81ca390f
Reviewed-by: Liao, Bruce <bruce.liao@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
2015-01-08 19:09:22 +00:00
Andy Hung
13fd0f400c Merge "Use channelCountFromOutChannelMask in AudioTrack" 2015-01-08 00:11:58 +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
Narayan Kamath
a6f7099343 am 031acc4b: am 3787decd: am 5137415e: Merge "Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod."
* commit '031acc4b3920336e58c56abb99322cbeb9be9e5c':
  Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod.
2015-01-06 20:09:12 +00:00
Narayan Kamath
031acc4b39 am 3787decd: am 5137415e: Merge "Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod."
* commit '3787decd8d41320ec9201405ec4cc893b2c99d78':
  Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod.
2015-01-06 10:16:34 +00:00
Narayan Kamath
5137415e39 Merge "Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod." 2015-01-06 10:06:06 +00:00
Haitao Feng
8bd6a203ca Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod.
CallStaticVoidMethod is varargs function, and calling it with
a literal 0 like CallStaticVoidMethod(..., 0) will treat the
argument as a 4 byte int in both 32 and 64 bit processes.

This is incorrect for pointer arguments where NULL should be
used instead.

Reviewed-by: Liao, Bruce <bruce.liao@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>

Change-Id: I9d700d3790a80dbee6826f64baf9ef5d81ca390f
2015-01-06 09:57:13 +00:00
Narayan Kamath
c82be5f27f am dd65a4f7: am ea4cdd44: Merge "Race-condition in SoundPool during release"
automerge: b7974bd

* commit 'b7974bd31d06d439cb75f8a3a0ad032fa689c729':
  Race-condition in SoundPool during release
2015-01-05 18:10:33 +00:00
Narayan Kamath
b7974bd31d am dd65a4f7: am ea4cdd44: Merge "Race-condition in SoundPool during release"
* commit 'dd65a4f735a311fe60c065449e394974807ff297':
  Race-condition in SoundPool during release
2015-01-05 18:08:06 +00:00
Narayan Kamath
ea4cdd4454 Merge "Race-condition in SoundPool during release" 2015-01-05 17:57:27 +00:00
Glenn Kasten
cd4ac0a204 Merge "Fix build" 2014-12-29 19:08:48 +00:00