History log of /packages/services/Car/service/src/com/android/car/CarAudioService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
609b9ec0482c7ba53401d818a295015ba4a610a3 13-Mar-2017 Pavel Maltsev <pavelm@google.com> Fix CarAudioService test

Test: runtest -x packages/services/Car/tests/carservice_test/

Bug: b/36137466
Change-Id: Ib40692b5d1df8781762985d1b92846f95e838204
/packages/services/Car/service/src/com/android/car/CarAudioService.java
727c382d8d1c8d894009858cef2fdc0152ce3cc4 27-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Handle losing conneciton with VHAL in Car Service"
ec83b63c47f65c5978eec3ee24952969a17b1ee7 06-Jan-2017 Pavel Maltsev <pavelm@google.com> Handle losing conneciton with VHAL in Car Service

Test: TODO

Change-Id: Ib465b146db119bc4dbf6019f76619935891fd45d
Fix: b/34083734
/packages/services/Car/service/src/com/android/car/CarAudioService.java
fe1a8f14e1ac56f095d29336e0986950d8adfc0c 18-Jan-2017 Keun-young Park <keunyoung@google.com> add audio parameter API

- allow setting / getting audio parameters with subscription
for change.
- available parameters are checked for both get / set calls.
apps should only pass supported parameters.
- needs AUDIO_SETTINGS permission to use them.

bug: 32371653
Test: added CarAudioManagerTest

Change-Id: I6b40080f200c50d4f9fc57bca8651797f2744dc3
/packages/services/Car/service/src/com/android/car/CarAudioService.java
7cdc0a2f54e5a9b4288e5174c029e16bf78bd8a2 17-Nov-2016 Pavel Maltsev <pavelm@google.com> Fixing Car Audio tests

AudioManager uses Context#getOpPackageName which may differ
form Context#getPackageName when context is created for
different package (that's what we are doing in test).

Bug: b/31971746

Test: audio tests are now passing
Change-Id: Ie809e1f8288193f959b274831cd10d2e935eaf96
/packages/services/Car/service/src/com/android/car/CarAudioService.java
0d07c76bbc788fba8c77d8e932330ab22ec6ba27 04-Nov-2016 Pavel Maltsev <pavelm@google.com> Migrating Car service to new Vehicle HAL

- make car service work directly with Vehicle HAL
- getting rid of protobufs and dependencies on VNS
- get rid of CarTestManager / CarTestService and refactor
tests accordingly
- reworked ICarImpl to pass dependencies rather than
using singletons for better testing experience

Test: existing test should work, although some of the tests
(esp. audio) are broken and we will fix them in follow up CLs

Bug: b/31971746
Change-Id: I229969af332304ba3b1718f130cdf22038e86fad
Tests: tests adjusted to new data structures
/packages/services/Car/service/src/com/android/car/CarAudioService.java
f9215209e0f425d2fc570bef37dad959c82d2e9e 10-Oct-2016 Keun-young Park <keunyoung@google.com> update TODOs

- assign bugs for future items
- remove it if not necessary any more
- also remove unused CarServiceApplication

bug: 31970410

Change-Id: I3f5ecb8a80fd450afdb58007e07e88527132edb9
/packages/services/Car/service/src/com/android/car/CarAudioService.java
1b1247b5648975dd41ee73c25425825abb256234 30-Sep-2016 Vitalii Tomkiv <vitalit@google.com> Change logging for car packages.

Removed PII information.
Disable all debug logging by default.
bug: 31811554
Test: manual build.

Change-Id: If95a27a1bb514f79f2acd65c21f5e7b29345a361
/packages/services/Car/service/src/com/android/car/CarAudioService.java
32b6382264510577126f9723337a7f48332b2ae3 02-Aug-2016 Keun-young Park <keunyoung@google.com> support system sound with no focus request

- When system sound is played without focus, send
NO_DUCK focus request.
- system sound will be also added if non-system sound
is already having focus
- Sound from non-system sound physical stream will be
ignored when focus is not requested.
- also fix routing policy test by adding fixed policy for test

bug: 25984205

Change-Id: If3981ff45fbf13fff67892bf78562ed071336b40
/packages/services/Car/service/src/com/android/car/CarAudioService.java
c837829409a384cf4e081987b84d4a2ac9a2808c 09-Jul-2016 Keun-young Park <keunyoung@google.com> add dump to volume service

- helps tracking volume related issues

bug: 30021451
Change-Id: Id7ee5d251af345281e5408f1f5df94f467b97977
/packages/services/Car/service/src/com/android/car/CarAudioService.java
4c6834a27ccbcf42cbeef43059751752baf80ac3 28-Jun-2016 Keun-young Park <keunyoung@google.com> add external audio routing support

- external audio routing is done via audio focus request
- add hidden CarAudioManager API for apps to request audio focus
for external audio source: will be left hidden until it is good
to go as public or system api
- add test to confirm external routing

bug: 29601910
Change-Id: I33600a6f53b0854cd3b55663a8be6987ac20413a
/packages/services/Car/service/src/com/android/car/CarAudioService.java
f8bb612142a637cbf04cb80ea20523a7dba5dd4b 10-May-2016 Keun-young Park <keunyoung@google.com> postpone audio context change notification

- send context change only after focus response from
car is received. This prevents race between volume control
and actual stream played where context change happens.
- For this to work, vhal should send response only after actual
context change is mande in case like radio to call.
- also add reset of context when focus is released.

bug: 28639095
Change-Id: I651430473749b6c41b98633a8350d72d11ae5ea8
/packages/services/Car/service/src/com/android/car/CarAudioService.java
3cb891017933140b613cfaf5b8422c112c0f32dc 05-May-2016 Keun-young Park <keunyoung@google.com> add CarAudioManager.mute

- radio can be also muted by this.
- muting will also make new focus request, so client
requesting mute can also lose focus (LOSS_TRANSIENT) if it is
holding focus.
- For muting, muting request will be sen to vehicle hal.

- also fixed some bugs:
- handle IllegalArgumentException for focus request as this can happen
when mocked test ends
- fixed wrong addition of second context when focus loss is from car

bug: 28615094
Change-Id: I80b1c07305cad857763011711b7954ac5625fb64
/packages/services/Car/service/src/com/android/car/CarAudioService.java
021310d76665163d6a7907d056b3ef43e6e910e4 26-Apr-2016 Keun-young Park <keunyoung@google.com> fix failing carservice tests

- revamp hal release init order during mocking:
release hal after service release and init hal before service init
- fix wrong order of mocking state setting. This led into
bringing audio muting while in mocking.
- remove some default properties from CarEmulator
as default dummy value does not work.
- add synchronization for mCarVolumeController
- handle ServiceSpecificException for get call
- reduce init time for non-functioning vhal by caching
volule get calls in init
- update CarAudioFocusTest
- remove CarConnectionListenerInMockingTest as connection state
is no longer notified when mocking starts

bug: 28387670

Change-Id: Idf975a3b0ed86b111618487eedbc380c5662a487
/packages/services/Car/service/src/com/android/car/CarAudioService.java
2c2d1d0941fceb210bd6808ae168e118117192de 21-Apr-2016 Yao Chen <yaochen@google.com> Fix a car audio context bug.

context was wrong during the phone call.

Bug: 28321214
Change-Id: I0b00616f2c7c84855bc9f55574e2457ead167594
/packages/services/Car/service/src/com/android/car/CarAudioService.java
c4d442f4a0d3acf90b1c7a1dd7c222a8f32a193f 08-Apr-2016 Yao Chen <yaochen@google.com> Add CarVolumeService

Things added in this cl:
+ Hook up hardware volume keys to CarVolumeService to directly update
volume for current audio context.
+ Added volume control apis in AudioManager, and the real implementation
is done in CarVolumeService
+ The volume updates from car is broadcast to listeners through
IVolumeController api which is already in framework. SystemUI is using
this api to listen to volume changes (through AudioManager).
+ Added new permission for volume controls

Main TODOs left:
+ Multi stream playing at the same time. This can be done through
adjustign software mixer gain on Android side. Utility functions to
compute the gain is added in VolumeUtils, but it's not used yet in
CarVolumeService.

+ Hook up with Settings so per stream volume can be persisted across
multiple boots.

Bug: 27595951

Change-Id: I3a63e423d4e0a347215af65e79926212e4503d1b
/packages/services/Car/service/src/com/android/car/CarAudioService.java
5ce1c8a623943dd92add6261b4828a1d358c6e0b 12-Apr-2016 Keun-young Park <keunyoung@google.com> keep car proxy focus for loss always

- adding external flag check is just hiding problems
when vehicle hal is handling focus in wrong way.
- For focus loss, keep car proxy focus. This will no
longer hide wrong focus loss in flow like radio gaining focus back.
- also fix broken audio focus tests due to muting / unmuting

bug: 28122287
Change-Id: I16a9f5a108f3907fe718dee3ef260f3f75ac6991
/packages/services/Car/service/src/com/android/car/CarAudioService.java
6eab4de655149b76d5405a5bffe5dd44785d8b00 01-Apr-2016 Keun-young Park <keunyoung@google.com> add dynamic routing policy setting

- enabled by audioUseDynamicRouting config.
Disabling can be useful while porting audio hal for
bus address support

bug: 27385621

Change-Id: I547d2e372c7a5e3a9e42cc19699b944ce06cdc59
/packages/services/Car/service/src/com/android/car/CarAudioService.java
e836ac3c106c2eb7d162e8e47695dc54260585a4 06-Apr-2016 Vitalii Tomkiv <vitalit@google.com> Add notification for CAN bus failure

Bug: 27950906
Change-Id: I4c470cdab661bfc975cae3f6f4f4b162578db1ff
/packages/services/Car/service/src/com/android/car/CarAudioService.java
3057ebd67bdbeaee67f132c6f0004d04d8943dfd 29-Mar-2016 Keun-young Park <keunyoung@google.com> cleanup audio config

- add "radio" to audio routing and remove
all specialization for radio.
- make focus wait timeout overridable.
- fix wrong handling of VR context: CAR_AUDIO_USAGE should
be used instead of CAR_AUDIO_TYPE to check internal usages
- send radio context to vehicle hal for radio: Do not
delete radio context anymore. Also cleaned up some radio
handling

bug: 27886033

Change-Id: Iae5148291a5d63c79bf49d3bbc5ee73055a20411
/packages/services/Car/service/src/com/android/car/CarAudioService.java
07182c7e9eb13542569604026c0dce45758e5371 19-Mar-2016 Keun-young Park <keunyoung@google.com> plumbing for volume support

- add volume key listening to CarInputService
- separate volume property monitoring from AudioHalService
with additional APIs for volume capability check
- add audio context listening to CarAudioService

bug: 27744968

Change-Id: I5cebe141115ce86dc07fa8d590874ff5bb9bf66b
/packages/services/Car/service/src/com/android/car/CarAudioService.java
d8c22f21348822a0022ec99444ecb062ebfa00db 04-Mar-2016 Keun-young Park <keunyoung@google.com> fix nav focus handling while radio is active

- stream to play nav was cleared when radio is active.
fix it to stop radio when primary stream is conflicting
with radio.
- extend kitchensink audio test to have more focus test
- extend bottom buttons to handle app context and radio
- add radio start / stop which only controls focus
- change nav play to use GAIN_TR_MAY_DOCK

bug: 27475946

Change-Id: I82d63306fb15c84c7e9b0eef51cc25eb18f42660
/packages/services/Car/service/src/com/android/car/CarAudioService.java
a28d7b201584823286f26e21a9f30d07c416eb3e 01-Mar-2016 Keun-young Park <keunyoung@google.com> add input service

- CarInputService monitors input event through vehicle hal
and handle it by itself (for now, VOICE_ASSITANT only),
deliver it to other relevant component,
or inject as android key event into kernel input device.
- renamed jni to jni_car_service
- added kitchensink input test.
- From kitchensink test, single touch of volume key does not work
as touch event in other window mess things up. But long press should
work. It will work in real physical keys.
- TODO: android key to linux key mapping should be expanded
for all possible keys.

bug: 27461452

Change-Id: I51e4b64bcd3c745f27ebb089fafce536be91f04d
/packages/services/Car/service/src/com/android/car/CarAudioService.java
1488ef2171bbc3bf25fc00c424a9979843f5ec6e 25-Feb-2016 Keun-young Park <keunyoung@google.com> support audio context properly

- audio context is now part of AUDIO_FOCUS
- For now, resolve up to two contexts for a focus
request
- audio context is cleared after audio focus is requested

bug: 27110889

Change-Id: Iaf63ef4a96d17c6585ff3558ce40b4775140c21c
/packages/services/Car/service/src/com/android/car/CarAudioService.java
e54ac276796c6535558f8444d882adecd19ce2bd 17-Feb-2016 Keun-young Park <keunyoung@google.com> add android.car

- instead of using binder as compatibility layer, add android.car
- apps using android.car should add it to LOCAL_JAVA_LIBRARIES
unless doing include
packages/services/Car/car-support-lib/car-support.mk

- support lib renamed to android.support.car
- UI stuffs only exist in android.support.car
UI has dependency on androud support library and not added to
android.car

- permission only uses android.car namespace even for support.car

- car-systemtest remains as static library. To use CarTestManager,
test app should get CarTestManagerBinderWrapper then create
CarTestManager.

bug: 27199752
Change-Id: I3522e11e958dade404443fbe2d45f576c827fa7a
/packages/services/Car/service/src/com/android/car/CarAudioService.java
5672e85bdf82f6a2350afb942dfe17b7c699af87 10-Feb-2016 Keun-young Park <keunyoung@google.com> support more audio type using custom Bundle in AudioAttributes

- define car specific stream using Bundle in AudioAttributes
- revamp related code to use CAR_AUDIO_USAGE

bug: 27111558
Change-Id: Ib50ae374e3947d94ad59752389b4248d07b7426b
/packages/services/Car/service/src/com/android/car/CarAudioService.java
1fdf91c3db75d62a55c1468e92dd795f1ff5a36c 21-Jan-2016 Keun-young Park <keunyoung@google.com> reset initial focus state to vehicle hal's state

- vehicle hal does not necesssarily start with focus loss.
- In init, read the initial state and set it.
- This does not hold focus as focus is immediately released
after init.
- TODO: hold the initially granted focus to prevent
unwanted audio from being played.

bug: 26697747

Change-Id: Ia514c161d2aa1e22afe37aaca36f531ab70c861c
/packages/services/Car/service/src/com/android/car/CarAudioService.java
9270057d4697476311871b627ab6577bfc0e5483 21-Jan-2016 Keun-young Park <keunyoung@google.com> increase focus wait timeout to 1 sec

- some device cannot grant it with the original 500ms

bug: 26697747
Change-Id: Icb07d76a7ef991348f7b24b87c253ce461b45cf7
/packages/services/Car/service/src/com/android/car/CarAudioService.java
aaeffaff85979583b1826db759b5cdb6184559d5 26-Nov-2015 Keun-young Park <keunyoung@google.com> add libvehiclenetwork-audio-helper

- with c wrapper
- update vns to pass event when internal property is set while in
mocking
- fix bug in VehiclePropValueUtil::copyVehicleProp of deleting non-
string type.

bug: 25330290

(cherry picked from commit f1b41f92b11e78373f423343b23229d19cdf0af2)

Change-Id: I54ae1faed1f67528bd2928ce23b53c16d19fcab2
/packages/services/Car/service/src/com/android/car/CarAudioService.java
a74b9caa2fb6435f1c01c5e8766b89235c4e3d5a 21-Oct-2015 keunyoung <keunyoung@google.com> add basic audio focus handling

- added skeleton CarAudioManager (not plubmed yet)
- added external vs internal radio distinction
- basic external radio use case working with test
- basic focus handling verified with added test cases

bug: 25331859

Change-Id: I4a4439336673b695f38eb11e9aa0d5a6090ee1b2
(cherry picked from commit 2a5c2eed85832331f9baa74569b3dc735a7c61ff)
/packages/services/Car/service/src/com/android/car/CarAudioService.java
5c7cb266f8900450c2ab41802b079b02f14d707f 19-Oct-2015 keunyoung <keunyoung@google.com> add audio routing policy configuration to audio service

- audio routing policy is read from config.xml.
- There can be multiple policy and AUDIO_HW_VARIANT property
chooses which one to use.
- added mocking test to verify the policy setting.

bug: 25126797

Change-Id: Ia9d6fad90f6536dddd79a56be514f6f3afb56270
(cherry picked from commit 1e1fdf6387b0ec4333c0d06a21b8f482590db3aa)
/packages/services/Car/service/src/com/android/car/CarAudioService.java
1ab8e18e01d8063821bee0bf641a365224c7e1ee 24-Sep-2015 keunyoung <keunyoung@google.com> Add vehicle HAL mocking with carsystem and carsystemtest API

- System API and system test API for testing only added. Client
should link only one of them.
- vehicle HAL mocking allows mocking vehicle HAL completely.
- Once mocking is started, for now, all previous states are forgotton,
so stopping mocking does not return to original state. It is
better to simply restart framework after test.
- Added skeleton code for audio focus handling. Detailed implementaiton
will be added later.

bug: 24874617

Change-Id: I6e60daab3dc96769a94acc09a695f8f49dbb8536
(cherry picked from commit a32e24f50d5895a94d3a13d6ec2233af6e43dac5)
/packages/services/Car/service/src/com/android/car/CarAudioService.java
d32f4e69d861d0adc2ae8f18345143f253d6fcec 21-Sep-2015 keunyoung <keunyoung@google.com> add VEC2/3/4 for int32/float and add audio handling

- internal property is propagated internally, not to HAL.
- added skeleton code for audio focus handling.
actual implementation will be added later.

bug: 23785833

Change-Id: Icb6ad32307e2a4036dbf235538ed0c4e5b06f68d
(cherry picked from commit 92362d576b4057b989b96e980c542cc38c3a33e8)
/packages/services/Car/service/src/com/android/car/CarAudioService.java