3647 Commits

Author SHA1 Message Date
Mike Lockwood
35110d1ed7 Add MidiDevice.close() method so we can clean up our ServiceConnection
Change-Id: I65cd4cfd940b02709daeffef6dab814305b8a6b0
2015-03-04 20:38:42 -08:00
Mike Lockwood
3b7664589b Make MidiSender and MidiReceiver abstract classes, rename MidiReceiver.post() to receive()
Change-Id: I1cef3bd48ca0acf2968c9de223f78445f3434404
2015-03-04 20:38:37 -08:00
Mike Lockwood
20821ecbe8 Eliminate MidiPort base class for MidiInputPort and MidiOutputPort
Change-Id: I628c0468ac980eee909add53a4d6e55e9b358603
2015-03-04 16:15:45 -08:00
Mike Lockwood
c623ec973b Merge "MidiManager: Virtual MIDI devices are now implemented as Services" 2015-03-05 00:01:33 +00:00
John Spurlock
75328b703f Merge "Audio: Remove the concept of master volume." 2015-03-04 22:59:41 +00:00
John Spurlock
ee5ad729b9 Audio: Remove the concept of master volume.
- Remove two config resources (use master volume, and volume ramp).
- Remove master volume adjustments / getters / intents.
- Retain @hidden setMasterMute, needed for device admin
- Remove master volume logic in AudioService.
- Remove master volume logic in VolumePanel.
- Rename "getMasterStreamType" to "getUiSoundsStreamType" to avoid confusion.

Bug: 19582978
Change-Id: Id02c8fa4898cff3b913147f5ac1b4038e2e7cc24
2015-03-04 17:51:44 -05:00
Mike Lockwood
11fd96d6ff MidiManager: Virtual MIDI devices are now implemented as Services
To implement a virtual MIDI device, include a subclass of MidiDeviceService in
your application.  This service is identified by an intent filter and meta-data
in the application's manifest to allow the MIDI manager to register the virtual device
without actually running the application. Instead, the application's MidiDeviceService
subclass is started on demand when MIDI manager clients want to open the device.

Here is an example of how the MidiDeviceService might be described in the application manifest:

    <service android:name="VirtualDeviceService">
        <intent-filter>
            <action android:name="android.media.midi.MidiDeviceService" />
        </intent-filter>
        <meta-data android:name="android.media.midi.MidiDeviceService"
            android:resource="@xml/device_info" />
    </service>

and the device_info.xml meta-data:

<devices>
    <device manufacturer="Sample Manufacturer" model="Sample Model" private="false">
        <input-port name="my input port" />
        <output-port name="my output port" />
    </device>
</devices>

(note that the <input-port> and <output-port> names are not currently used, but support for these
will be added in a subsequent change)

Client's of the virtual device will bind directly to the hosting application's MidiDeviceService subclass.
To support this, MidiManager.openDevice() now returns the MidiDevice asynchronously via a callback.

This change also adds a utility class called MidiDispatcher, which is a MidiReceiver
that dispatches all data it receives to a list of other MidiReceivers.
We now use this internally in MidiInputPort and MidiDeviceServer, but developers
may use it for other purposes as well.

Change-Id: Ic3009f06d56f3d5edbd87de3f0c330b51a1c217d
2015-03-04 13:45:38 -08:00
Wei Jia
d93fcf4002 MediaPlayer: add setPlaybackRate JAVA API.
Bug: 19196501
Change-Id: I43daced7d9b53bcaca4e6a8d81ca729b32efc79f
2015-03-03 14:43:55 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Chong Zhang
cff41ae363 Merge "MediaRecorder: pass capture fps in float" 2015-02-24 22:22:11 +00:00
Mike Lockwood
b673770f71 Add MIDI Manager API tweaks:
- Change the package name from android.midi to android.media.midi

- Add option for specifying a Handler for DeviceCallback notifications

Change-Id: Ia9e9817a651c06299f4e02ee1da3c9666ff64cb9
2015-02-23 14:32:23 -08:00
Chong Zhang
fbdee2c04b MediaRecorder: pass capture fps in float
bug: 19460202
Change-Id: I4723c8ed44b4de399de2f3bf051b2d1a4e881910
2015-02-23 22:00:39 +00:00
Paul McLean
ceb47aae5a Changing AudioManager.listAudioDevicePorts to take a ArrayList<AudioDevicePort> argument.
Change-Id: Ide9a2f58a7544e263600e100ba4274403201c5fa
2015-02-19 15:33:34 -08:00
Paul McLean
83b40599bb Merge "Audio Device Enumeration API." 2015-02-19 23:09:07 +00:00
Paul McLean
0e4242f9cb Audio Device Enumeration API.
Change-Id: Ic78fda8b2a6f6ac0f37a1f665b29f3359cfc5ecc
2015-02-19 15:03:53 -08:00
John Spurlock
0a7269bbaf Merge "AudioAttributes: introduce new flags to bypass audio restrictions." 2015-02-19 18:24:24 +00:00
John Spurlock
bbfd31a5d4 AudioAttributes: introduce new flags to bypass audio restrictions.
- New @hidden @SystemApi FLAG_BYPASS_INTERRUPTION_POLICY, request
   to ignore any current audio restrictions, such as zen mode
   content-based notification filtering.
 - Wire up FLAG_BYPASS_INTERRUPTION_POLICY to the existing
   audio restriction checks in the framework.

 - New @hidden @SystemApi FLAG_BYPASS_MUTE, request to play
   audibly, even if the underlying stream is muted.
 - Wiring up to audio framework TBD.

 - Use both of these new flags on the inline volume slider
   controls used in Settings, ensuring playback is heard
   regardless of the current device filter state.

Bug: 19407114
Change-Id: I3d44394931592ccbc1b61ddd9a4d1cc984da17cc
2015-02-18 20:48:26 -05:00
Tor Norbye
7b9c912f53 Add @ResourceInt annotations on APIs
Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
2015-02-18 07:49:03 -08:00
John Spurlock
a9dfbe8b12 Volume: Allow dialog to query "muteable" streams.
Similar to the existing ability to query streams affected
by ringer mode.

Bug:19260237
Change-Id: I76eb5ab6b7c7e3a4d73ac1909289c560194d4fe8
2015-02-17 11:01:51 -05:00
John Spurlock
b25334ca3c Merge "Allow sysui-managed remote volume controllers." 2015-02-13 14:50:50 +00:00
John Spurlock
cdb57aeb0e Allow sysui-managed remote volume controllers.
- Relax restriction on audio service calls that assume the volume
  ui is systemui, allow calls from a blessed component app.
- Blessed component app service saved in secure settings.
- SystemUI mediates requests to replace the volume dialog, prompts
  the user on activation.
- Show a low pri ongoing notification when the volume dialog is
  being replaced, to allow user restoration at any time.
- Replace the controller management code in VolumeUI to use a
  ServiceMonitor, backed by the new blessed app component setting.
- Add proper zen-related noman client wrappers, make avail to the
  registered volume controller.
- Everything is still @hidden, no api impact.

Bug: 19260237
Change-Id: Ie1383f57659090318a7eda737fdad5b8f88737d4
2015-02-12 22:48:37 -05:00
Chong Zhang
d6686a62f7 Merge "media: discard duplicate CEA-608 ctrl code" 2015-02-11 02:35:08 +00:00
John Spurlock
6156017c22 Move AudioService to services.
...and a few dependencies. Move remaining shared items to AudioSystem.

Change-Id: Ib9623ff867678d34977337856bb0156e8cdaeeb5
2015-02-09 17:13:38 -05:00
RoboErik
7d85bc4c43 Merge "Delay unmuting on volume down" 2015-02-09 22:08:05 +00:00
Chong Zhang
56a7ed6982 media: discard duplicate CEA-608 ctrl code
bug: 19297083
Change-Id: I6c108e2c597e7b3fd770306a26e110208dc5ece0
2015-02-09 13:52:20 -08:00
RoboErik
5452e25844 Delay unmuting on volume down
This allows the user to turn the volume down before a stream is unmuted by
delaying the unmute call while volume down requests are still being made.

bug:19297183
Change-Id: I65a8e489eb4cbfeace4f539103ee0025584102da
2015-02-09 12:54:19 -08:00
Chong Zhang
fb54267e71 am 6cad6513: Merge "reset col position to 1 on row PAC" into lmp-mr1-dev automerge: eceae03
automerge: 3968f0c

* commit '3968f0c2dfa5cbb1432d49af47ad2fa89f1b2225':
  reset col position to 1 on row PAC
2015-02-06 03:21:37 +00:00
Chong Zhang
3968f0c2df am 6cad6513: Merge "reset col position to 1 on row PAC" into lmp-mr1-dev
automerge: eceae03

* commit 'eceae03f6a21b36baddabe4ca5a2c1d9d238240a':
  reset col position to 1 on row PAC
2015-02-06 03:17:36 +00:00
Chong Zhang
6cad6513e0 Merge "reset col position to 1 on row PAC" into lmp-mr1-dev 2015-02-06 02:06:24 +00:00
Chong Zhang
6286f8ec05 reset col position to 1 on row PAC
bug: 19284568
Change-Id: I7d439027ab6411bcd5c149580babee80dc5f9478
2015-02-05 16:46:06 -08:00
RoboErik
5387988fc9 Merge "Make isStreamMute correctly handle master volume devices" 2015-02-05 23:23:16 +00:00
Paul McLean
26bf3ea56e Merge "Add additional info to AudioPort for enum/selection API." 2015-02-05 18:26:56 +00:00
John Spurlock
951c04bf4d Merge "Use shared value for default muteable streams." 2015-02-05 17:40:50 +00:00
John Spurlock
24c0518723 Use shared value for default muteable streams.
Change-Id: Ib8fa7aee3bed83fc26945fd0caf0cbd9f4f8af3a
2015-02-05 12:30:36 -05:00
Paul McLean
10804eb281 Add additional info to AudioPort for enum/selection API.
Add "device name" member to AudioPort.
Moved unique device ID from DevicePort to AudioPort.
Straighten out confusion between "name" and "address"
Created string constants for Intent "extra" data keys.
Combine card/address data into "address" at sender.Add additional info to AudioPort for enum/selection API.
Parse out USB Device name in UsbCardsParser.

Change-Id: Ifd76b0298312090a8f39e638339f993b86d47080
2015-02-04 14:37:19 -08:00
RoboErik
4fa359e86d Make isStreamMute correctly handle master volume devices
isStreamMute should return the master mute value if mUseMasterVolume
is true. This adds that check.

Change-Id: I6d5f5552c480028972e69ff9d670e10c4e496d05
2015-02-04 14:25:16 -08:00
Lajos Molnar
46a9721aeb Merge "MediaCodecInfo: remove stack trace logspam when querying invalid sizes" 2015-02-04 08:19:27 +00:00
Wonsik Kim
f33c833ca0 am b86a4558: am 015fdf39: Merge "audio: allow audio port cache update even when audio patches contain invalidated sources/sinks" into lmp-mr1-dev automerge: d7310bd
* commit 'b86a45588a67f88730c15c82f624cd64fe1da80c':
  audio: allow audio port cache update even when audio patches contain invalidated sources/sinks
2015-02-03 23:59:02 +00:00
Wonsik Kim
b86a45588a am 015fdf39: Merge "audio: allow audio port cache update even when audio patches contain invalidated sources/sinks" into lmp-mr1-dev automerge: d7310bd
* commit '015fdf392388f1bed3298f9f44012c1a82d7c1a1':
  audio: allow audio port cache update even when audio patches contain invalidated sources/sinks
2015-02-03 23:52:42 +00:00
Jean-Michel Trivi
a1852f6ec8 Merge "AudioAttributes javadoc update for conversion to stream types" 2015-02-03 23:02:20 +00:00
Jae Seo
338a29a64f TIF: Add a comment to remove padding around the channel logo image
Bug: 19066924
Change-Id: Ibb1efb945550028be4106ead826b1e152e488c92
2015-02-03 12:39:35 -08:00
Jean-Michel Trivi
3d22bf04e3 AudioAttributes javadoc update for conversion to stream types
Change-Id: I2b687d8a002897fff90a8c99d180aa0a3511a571
2015-02-03 10:15:08 -08:00
Glenn Kasten
547c9e5212 Merge "Clarify that flush does not necessarily free up buffer space" 2015-02-02 22:32:37 +00:00
Glenn Kasten
7a121563d5 Clarify that flush does not necessarily free up buffer space
Change-Id: I6f77efb6a8da5e11c0cc68f0bb3ce47a0c1cb3da
2015-02-02 14:16:23 -08:00
RoboErik
00b1b712d2 Merge "Route volume keys directly to the audio system on TVs" 2015-02-02 17:47:52 +00:00
Wonsik Kim
b561ccedd8 audio: allow audio port cache update even when audio patches contain invalidated sources/sinks
When an audio device disconnects from Android, custom audio patches
containing the device become invalidated.
AudioManager::updateAudioPortCache() used to fail in that case, but
it causes onAudioPortListUpdated() event never gets called so that
the creator of the custom audio patch cannot update it. Let
updateAudioPortCached() succeed even in the case so that the entity
that created the audio patch can get notified.

Bug: 18909299
Change-Id: If4f6ed73f69213d792117fb42aec103ae2e50b79
2015-01-31 01:51:28 +00:00
RoboErik
ddce02f3b9 Merge "Move mute/unmute handling to adjust volume paths" 2015-01-30 18:55:10 +00:00
RoboErik
001c59c637 Route volume keys directly to the audio system on TVs
This routes volume and mute keys directly to the audio system when
on a television instead of letting apps or sessions intercept them.

Change-Id: I2af47e30c7842aca96d045a6cc9ca025b94e546a
2015-01-29 16:14:31 -08:00
RoboErik
4197cb60bc Move mute/unmute handling to adjust volume paths
This deprecates the setStreamMute and setStreamSolo APIs. Soloing is no
longer supported and muting is redirected through the adjust volume APIs.

Also updates the hidden master versions of these APIs.

Change-Id: I65d2a5d5fc15b386bd497abf8ca6869fec75a26a
2015-01-29 16:14:30 -08:00
Lajos Molnar
6c9833b967 MediaCodecInfo: remove stack trace logspam when querying invalid sizes
Change-Id: I0ed3825f17cacb0502c40483462f1d76f92e5efa
2015-01-29 10:24:37 -08:00