Commit graph

301 commits

Author SHA1 Message Date
Jean-Michel Trivi
9f1f9b509c Allow non-direct output of any channel mask
Because of the downmix capability of the mixer, do not prevent
 a non-direct output to be retrieved based on channel mask.

Change-Id: I911f95f4055c2134298c233d14f2f5d586091fd4
2012-04-05 12:17:01 -07:00
Eric Laurent
70c236c929 audio policy: load audio hw modules
Audio hw modules are now loaded according to configuration
data read from audio_policy.conf. They are not loaded anymore
from a hardcoded list in AudiFlinger.

Output and input streams are opened on the hw module by which
they are exposed.

Also removed obsolete "acoustics" flags for input streams.

Change-Id: I8dc658cc83890d3ac7d5e36c372a03732aa5b0c4
2012-04-03 20:49:35 -07:00
Eric Laurent
5ccdf14a85 audio policy: use configuration file
The audio policy manager implementation now reads a configuration file at
boot time that contains descriptors for available audio hardware
modules and for each module the profiles of available inputs and outputs streams.

The configuration file path on the target is: /system/etc/audio_policy.conf.
A default configuration file is given that defines a basic configuration
with one primary audio hw module capable of playback and capture.
Each platform or device should have its own audio_policy.conf file.

Also removed default value of fromCache argument of getDeviceForStrategy()
and getNewDevice() methods.

Change-Id: I0c773d2331508bbc787f89b123dd6a7b8c10d459
2012-04-03 15:56:30 -07:00
Jean-Michel Trivi
12bd6e4a5c Only duplicate notifications when no media is playing
Map the NOTIFICATION stream type to a new strategy,
 named STRATEGY_NOTIFICATION_RESPECTFUL, which differs
 from STRATEGY_NOTIFICATION in that, when media is
 playing, the notifications will use the same output
 as the MEDIA strategy. This will results in the
 notifications not being duplicated on the speaker
 when a headset is in use for media playback.

Change-Id: I032be0e2d383c69b5b6c912d7174753f5572c4b4
2012-04-02 09:31:09 -07:00
Mike Lockwood
48fa8d5b1c Merge remote-tracking branch 'goog/ics-aah-exp'
empty merge -s ours

Change-Id: I11a8a28ffccb4d28f2bbed4d55919443cae24e9f
2012-03-21 17:44:39 -07:00
Mike Lockwood
584c285492 Merge commit '5b71e6f'
Add an implementation of get_next_write_timestamp.

Change-Id: Ie8e19307bafdb057d06bf3c536380c5740f830a6
2012-03-21 17:44:01 -07:00
Mike Lockwood
0b934ade25 Merge commit '617c80a'
Add a bridge implementation of get_master_volume.

Conflicts:
	audio/audio_hw_hal.cpp

Change-Id: Icff9d8dce05d1d811fca815cc39cb38a1df293f9
2012-03-21 17:42:25 -07:00
Glenn Kasten
7c85ce8534 Remove obsolete references to libmedia
Change-Id: I65c10c2c6248a439d8ba6b3e9d540072fb25039f
2012-03-19 17:31:15 -07:00
Glenn Kasten
a881294ac8 Merge "Add libmedia_native" 2012-03-16 10:36:22 -07:00
Kenny Root
cf449e1408 Add support for EINTR to wifi.c
Some system calls can be interrupted. wifi.c in particular was getting
into error conditions during bugreport because it doesn't handle EINTR
at all.

Change-Id: I7bec432a0b3dca7dcc5c03c5e9f5e9ed73fa3c4b
2012-03-15 13:12:41 -07:00
Glenn Kasten
24a710aee7 Add libmedia_native
Change-Id: I1d66327828a5adb06911de1f72076bc0295255c1
2012-03-15 09:45:04 -07:00
Eric Laurent
f9a4e2eccf audio policy: use audio_devices_t when appropriate
Change-Id: I0b4e2ff705fce96b40fdda28b1bc4b514438bec6
2012-03-08 13:41:38 -08:00
Eric Laurent
f7db035626 audio policy: spaced comments in header file
Change-Id: Ie72dcb9e33afb217bb7e37081500a7fc53d7a047
2012-03-07 19:19:29 -08:00
Eric Laurent
08b014d9e5 audio policy: use common string for A2DP address
Use definition from audio.h for A2DP sink address parameter.

Change-Id: I2d7905b8e3dd71fab2efc68ae16682e09c3f872e
2012-03-07 19:04:55 -08:00
Eric Laurent
b4696fc22b audio policy manager: more generic A2DP impl.
This change makes support for A2DP related audio policy more generic:
-removed WITH_A2DP compilation switch
-use output profile descriptors listing the parameters
(sampling rate, format...) devices and attributes (low power, tunneling...)
for each available output.
All the behavior specific to A2DP is derived from the A2DP output profile
descriptor.
- removed obsolete a2dpUsedForSonification() method.

This is a first step towards a more generic support for different audio
hardware modules (USB, HDMI) and output streams supporting different
combinations of parameters (sampling rate, format...) and attributes
(low power, tunneling...).
Ultimately, the hw modules and output descriptors will loaded from a
configuration file.

Change-Id: Ife3e49e1afbcb72613bfc8ce38919bb087ca85ea
2012-03-07 17:53:49 -08:00
Todd Poynor
77d789de26 libhardware_legacy: Remove set_screen_state
The early-suspend/late-resume interface to /sys/power/state
is being moved to the default/legacy Power HAL.

The emulator interface is being moved to the emulator
Power HAL.

Change-Id: I66a1e611e6d907f20335f047001745f818dfc846
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-02-18 00:23:46 -08:00
Eric Laurent
c5eb8b4a5d Fix volume not restored when exiting silent mode
The change for volume per device introduced a problem where if a headset
is plugged in while in silent mode, the sound will not be restored
at the first press on volume up key but only at the second press.

This is because when exiting silent mode, AudioService reapplies the
last known volume for all devices in any order and the last volume
applied prevails, even if it is for a device other than currently selected
by audio policy manager.

The fix consists in applying a new volume only if the device indicated
matches currently selected device on an output.

Change-Id: I778b90a9ec5a8b4a15e0333bd045f2dd327f388c
2012-02-15 18:40:31 -08:00
Irfan Sheriff
02243837e4 Merge "Fixes for concurrency support" 2012-02-14 15:37:17 -08:00
Glenn Kasten
1281e523b0 Merge "Use audio_in_acoustics_t consistently" 2012-02-03 08:31:19 -08:00
The Android Open Source Project
10d31fa204 am 7490f9bf: am b4ff7281: Reconcile with ics-mr1-release
* commit '7490f9bf37a1bfcad8e6c868d878dd56fd4c09ca':
2012-02-01 10:10:28 -08:00
The Android Open Source Project
7490f9bf37 am b4ff7281: Reconcile with ics-mr1-release
* commit 'b4ff728122f67ae9bf0f5afe4ff65b3ba3068b59':
2012-02-01 10:01:31 -08:00
The Android Open Source Project
b4ff728122 Reconcile with ics-mr1-release
Change-Id: Ibf33a69673d9acafb9199d331fc88a7d80dbeb20
2012-02-01 08:50:23 -08:00
Glenn Kasten
70eb9dec50 Use audio_in_acoustics_t consistently
Change-Id: I9875afdf21937c88a5decc9d94e89fddffc3519e
2012-01-27 13:04:19 -08:00
Glenn Kasten
f3b5a0736e Use audio_source_t consistently
Change-Id: I11de4e92254e128643d8f158c74dcfee97e51005
2012-01-26 16:46:31 -08:00
Irfan Sheriff
096e49c869 Fixes for concurrency support
Change-Id: Ia7251dc86184fff710234c70a8ad54a6b245809a
2012-01-20 15:33:52 -08:00
Glenn Kasten
c97d4bb2bd Merge "Use audio_format_t consistently" 2012-01-20 14:50:30 -08:00
Glenn Kasten
ba1e8cb245 Merge "Audio policy HAL set_ringer_mode is deprecated" 2012-01-20 10:07:13 -08:00
Glenn Kasten
902ec630b6 Fix typos
Change-Id: Ie0acd07861604e66f571e0c1f43cfdccf12ea691
2012-01-18 16:27:02 -08:00
Glenn Kasten
ca0657a1ca Audio policy HAL set_ringer_mode is deprecated
Change-Id: I66ef40ed381151ba61debe20edaa53bece0cc139
2012-01-18 15:24:50 -08:00
Eric Laurent
f6fc420a79 Merge "audio policy manager: stream volume per device" 2012-01-17 17:34:58 -08:00
Eric Laurent
c6f331b3f4 audio policy manager: stream volume per device
Improve volume management by keeping track of volume for each type
of device independently.

AudioPolicyManagerBase now keeps track of stream volumes for each device
and apply volume according to current device selection.
Methods to set and get stream volume now specify the device class.
A value for "default" device is always present for each stream and is used
if a device is selected and no specific volume was ever set for this device.

Change-Id: I06d8f43aa151a09014f7e47e81304c73ff82e9f8
2012-01-17 16:00:01 -08:00
Glenn Kasten
9038c346d7 Merge "Use audio_mode_t consistently" 2012-01-17 11:33:14 -08:00
Glenn Kasten
d97809bca3 Use audio_stream_type_t consistently
Change-Id: Ibeb4071cedb930c76dd62222b29844733bdc1548
2012-01-12 15:02:55 -08:00
Glenn Kasten
53e2cfab45 Use audio_format_t consistently
Was int

Change-Id: I8cc1beaa8006fb0a135cf1135955155090c8e87e
2012-01-12 15:01:42 -08:00
Glenn Kasten
5c1ebdc9db Use audio_mode_t consistently
Change-Id: I62e23b81e3a411a0d9f012b363373d938827a2e4
2012-01-12 10:49:45 -08:00
Irfan Sheriff
c6e7b3d9e6 Fix monitor socket poll
Bug: 5534039

Change-Id: I28c41f896347963b0ded8415d1a51ff95cbf4b2d
2012-01-11 16:53:28 -08:00
Steve Block
5efbd421e0 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Idfcd2f2269080d92a621dc432c65f7cf244588af
2012-01-08 10:18:02 +00:00
Steve Block
64cca04dcb Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I86e4ce26d8fba68584d0a7fc17111b53c56d2932
2012-01-05 23:27:53 +00:00
Steve Block
6f211ce723 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: I21aea046270c8700d349a4181c559d1b05333a1b
2012-01-04 20:07:20 +00:00
Steve Block
b381b932ac Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I9dfdc3f00a5f4f5b6ef4c75280ce2594ab018577
2012-01-03 22:31:20 +00:00
Irfan Sheriff
da52930b89 Add support for p2p socket communication
Right now, everything goes over the primary interface socket connection.
Add support for a seperate connection over the p2p interface.

Change-Id: I09118f88cfaa201b2d62d27add410cfd441d4454
2011-12-28 13:16:24 -08:00
The Android Open Source Project
cde1b977cd am af9565aa: Reconcile with ics-mr1-release
* commit 'af9565aa8be0136463ec549d9d3abdd906d2c390':
2011-12-09 14:58:00 -08:00
Eric Laurent
314bacacbb audio policy manager: remove ringer mode dump
The ringer mode is at the moment not passed down from AudioService to
AudioPolicyManager as it is currently not used in any routig decision.

So the value store in audio policy manager is wrong and the dump is miss leading.

Change-Id: I3c21c168393470fd64c1b73e3c511576a9acdd7e
2011-12-08 11:47:29 -08:00
The Android Open Source Project
af9565aa8b Reconcile with ics-mr1-release
Change-Id: Ifb9dad264079f0a566dd978dd56414fbaf59b9e0
2011-12-08 10:22:08 -08:00
The Android Open Source Project
da9978fb8e Reconcile with ics-mr1-release
Change-Id: I2b1dcb119df18200eebaef2f888df7aaaa150b34
2011-11-04 08:31:25 -07:00
Eric Laurent
c720e569d2 am c16ac09f: Force camera shutter sound to speaker in Japan.
* commit 'c16ac09f510437e8340be691720177a490ae78f0':
  Force camera shutter sound to speaker in Japan.
2011-11-02 17:31:48 +00:00
The Android Automerger
153d0f1a27 merge in ics-mr1-release history after reset to ics-mr1 2011-11-02 06:46:14 -07:00
Eric Laurent
8b143a31af am c16ac09f: Force camera shutter sound to speaker in Japan.
* commit 'c16ac09f510437e8340be691720177a490ae78f0':
  Force camera shutter sound to speaker in Japan.
2011-11-01 22:44:20 +00:00
Eric Laurent
c16ac09f51 Force camera shutter sound to speaker in Japan.
Make sure that camera shutter sound is output to device speaker also while
in call.
Added a new strategy for enforced audible stream to address this case as
the routing policy is now different from sonification strategy.

Issue 5548406.

Change-Id: I2de39dfaef7d90e3804b238b1379f0f59b75e985
2011-11-01 13:54:26 -07:00
The Android Open Source Project
73f222cb65 Reconcile with ics-mr1-release
Change-Id: Iadb285a24b3129b0dc2bd7089598a51d4af2eb6b
2011-10-31 13:19:23 -07:00