summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
...
* audio policy: fix in call volume problem.Eric Laurent2012-05-151-12/+24
| | | | | | | | | | | | | | | | When switching audio path, it is sometimes required to temporarily mute certain streams to avoid glitches. The unmute command is sent with a delay but the volume applied when unmuting is computed according to the state at the time of mute. If the device selection changes after the delayed unmute is programmed the new volume will not correspond to the new device. setStreamMute() now accepts a device selection as input parameter which is used instead of current device for volume computation. Bug 6497819. Change-Id: I355ebf9e1afe814fa5c2723bda9c40e58f921b46
* Reduce system stream volume.Eric Laurent2012-05-101-3/+3
| | | | | | | | | Reduce system stream volume by 6dB as UI sounds are now perceived as being too loud. Issue 6448481. Change-Id: I0237eb94245014724dfdf55253049340e2162af8
* system and UI sounds volume policyEric Laurent2012-04-261-19/+56
| | | | | | | | | | | | | Added specific volume curves for AUDIO_STREAM_SYSTEM, AUDIO_STREAM_ENFORCED_AUDIBLE and AUDIO_STREAM_DTMF. Volume for these streams tracks AUDIO_STREAM_RING on phones and AUDIO_STREAM_MUSIC on tablets but is contrained in the range -24dB to -6dB on speaker and -24dB to -12dB on headset. STRATEGY_ENFORCED_AUDIBLE routing policy is now the same as STRATEGY_MEDIA in countries where not enforced. Change-Id: If58d96559bfe2bbff4cd94c631d5933bd940778e
* audio_policy: set some reasonable defaults if audio_policy.conf is not foundDima Zavin2012-04-241-1/+30
| | | | | Change-Id: I25f7407c34b3032d4e77a27a4ac47b648098d9b0 Signed-off-by: Dima Zavin <dima@android.com>
* audio_policy: look for config file in /vendor firstDima Zavin2012-04-231-2/+6
| | | | | Change-Id: If10308f688437e1682e4104120772cfce16e9d89 Signed-off-by: Dima Zavin <dima@android.com>
* audio policy: volume burst when switching deviceEric Laurent2012-04-231-5/+18
| | | | | | | | | | | | | | The addition of the per device volume feature has introduced a problem where a volume burst can be heard in the headphones just after insertion if the speaker volume is much higher than the headphones volume. Added a temporary mute of the output when switching device to force volume ramp to 0 and back up to new volume. Issue 5984108. Change-Id: I5c9ffbbcadd12d25c78cc2614d351346b8186c55
* audio policy: add support for deep audio buffersEric Laurent2012-04-201-24/+38
| | | | | | | | | | Added definitions for parsing deep buffer flags in output profiles. Make sure that sound start is delayed enough to allow duck/mute effect to apply before starting a notification on an output with lower latency. Change-Id: I1578e245da19d1a0f9ec62a2ea6dddaf82ea282b
* rename audio policy flagsEric Laurent2012-04-185-21/+21
| | | | Change-Id: Ic42eba3432671f651c9703a07fe7b429a8ec0dff
* audio: update to new audio HAL device API.Eric Laurent2012-04-161-18/+19
| | | | Change-Id: I27c5e1e1041f62530884ec5d929e7d82f091912a
* audio policy: added rules for USB audio devicesEric Laurent2012-04-061-2/+48
| | | | Change-Id: If712b0c7fcf281d66d34614529f3433e56e058fb
* Allow non-direct output of any channel maskJean-Michel Trivi2012-04-051-5/+3
| | | | | | | 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
* audio policy: load audio hw modulesEric Laurent2012-04-033-197/+329
| | | | | | | | | | | | | 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
* audio policy: use configuration fileEric Laurent2012-04-033-224/+868
| | | | | | | | | | | | | | | | 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
* Only duplicate notifications when no media is playingJean-Michel Trivi2012-04-021-22/+73
| | | | | | | | | | | | 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
* Merge commit '5b71e6f'Mike Lockwood2012-03-212-0/+16
|\ | | | | | | | | | | Add an implementation of get_next_write_timestamp. Change-Id: Ie8e19307bafdb057d06bf3c536380c5740f830a6
| * Add an implementation of get_next_write_timestamp.John Grossman2011-10-272-0/+16
| | | | | | | | | | | | | | | | | | | | Add a default implementation of get_next_write_timestamp to the C <--> C++ legacy audio HAL implementation allowing HALs using the legacy C++ AudioStreamOut to overload and implement get_next_write_timestamp. Default implementation returns INVALID_OPERATION to indicate that the functionality is not supported. Change-Id: I087347649e9ba186a74cb34aaadf989bf90720fe
* | Merge commit '617c80a'Mike Lockwood2012-03-212-0/+12
|\ \ | |/ | | | | | | | | | | | | | | Add a bridge implementation of get_master_volume. Conflicts: audio/audio_hw_hal.cpp Change-Id: Icff9d8dce05d1d811fca815cc39cb38a1df293f9
| * Add a bridge implementation of get_master_volume.John Grossman2011-10-272-0/+12
| | | | | | | | | | | | | | Add an implementation of the new get_master_volume method to bridge from the new C only audio HAL to the old C++ legacy audio HAL. Change-Id: I5c29814623b5141b0c69927ea60be9873c8a5dab
* | Remove obsolete references to libmediaGlenn Kasten2012-03-191-3/+1
| | | | | | | | Change-Id: I65c10c2c6248a439d8ba6b3e9d540072fb25039f
* | Add libmedia_nativeGlenn Kasten2012-03-151-1/+2
| | | | | | | | Change-Id: I1d66327828a5adb06911de1f72076bc0295255c1
* | audio policy: use audio_devices_t when appropriateEric Laurent2012-03-082-58/+60
| | | | | | | | Change-Id: I0b4e2ff705fce96b40fdda28b1bc4b514438bec6
* | audio policy: use common string for A2DP addressEric Laurent2012-03-071-1/+2
| | | | | | | | | | | | Use definition from audio.h for A2DP sink address parameter. Change-Id: I2d7905b8e3dd71fab2efc68ae16682e09c3f872e
* | audio policy manager: more generic A2DP impl.Eric Laurent2012-03-074-344/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix volume not restored when exiting silent modeEric Laurent2012-02-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Use audio_in_acoustics_t consistently"Glenn Kasten2012-02-033-3/+3
|\ \
| * | Use audio_in_acoustics_t consistentlyGlenn Kasten2012-01-273-3/+3
| | | | | | | | | | | | Change-Id: I9875afdf21937c88a5decc9d94e89fddffc3519e
* | | Use audio_source_t consistentlyGlenn Kasten2012-01-261-2/+2
|/ / | | | | | | Change-Id: I11de4e92254e128643d8f158c74dcfee97e51005
* | Merge "Use audio_format_t consistently"Glenn Kasten2012-01-203-18/+20
|\ \
| * | Use audio_format_t consistentlyGlenn Kasten2012-01-123-18/+20
| | | | | | | | | | | | | | | | | | Was int Change-Id: I8cc1beaa8006fb0a135cf1135955155090c8e87e
* | | Audio policy HAL set_ringer_mode is deprecatedGlenn Kasten2012-01-182-13/+2
| | | | | | | | | | | | Change-Id: I66ef40ed381151ba61debe20edaa53bece0cc139
* | | Merge "audio policy manager: stream volume per device"Eric Laurent2012-01-172-40/+152
|\ \ \
| * | | audio policy manager: stream volume per deviceEric Laurent2012-01-172-40/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Use audio_mode_t consistently"Glenn Kasten2012-01-172-4/+6
|\ \ \ \ | |/ / / |/| | |
| * | | Use audio_mode_t consistentlyGlenn Kasten2012-01-122-4/+6
| |/ / | | | | | | | | | Change-Id: I62e23b81e3a411a0d9f012b363373d938827a2e4
* | | Use audio_stream_type_t consistentlyGlenn Kasten2012-01-121-2/+2
|/ / | | | | | | Change-Id: Ibeb4071cedb930c76dd62222b29844733bdc1548
* | Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-085-21/+21
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Idfcd2f2269080d92a621dc432c65f7cf244588af
* | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-053-46/+46
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I86e4ce26d8fba68584d0a7fc17111b53c56d2932
* | Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-032-4/+4
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I9dfdc3f00a5f4f5b6ef4c75280ce2594ab018577
* | audio policy manager: remove ringer mode dumpEric Laurent2011-12-081-2/+3
| | | | | | | | | | | | | | | | | | 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
* | am c16ac09f: Force camera shutter sound to speaker in Japan.Eric Laurent2011-11-021-12/+41
|\ \ | | | | | | | | | | | | * commit 'c16ac09f510437e8340be691720177a490ae78f0': Force camera shutter sound to speaker in Japan.
| * | Force camera shutter sound to speaker in Japan.Eric Laurent2011-11-011-12/+41
| |/ | | | | | | | | | | | | | | | | | | | | 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
* | Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGESteve Block2011-10-255-109/+109
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I953e5eabaf5023a4dcd76339c336d9132f257f8c
* Fix music heard in speaker before notifications.Eric Laurent2011-10-201-1/+3
| | | | | | | | | | | | Increase the delay after muting music when switching audio path to both speaker and headset for notifications and ringtones. This is required to avoid a residual of music to be output to speaker now that the max latency has been increased in low power playback mode. This is a temporary workaround that will be removed when low power mode is controlled policy manager. Change-Id: If08e7f46e499be362badb2a24a79d1723ebfc00a
* Fix issue 5440852: Youtube volume is too small ...Eric Laurent2011-10-181-26/+111
| | | | | | | | | | | | When no DRC is applied by the platform when playing over the device speaker, faint audio signals are not boosted and barely audible until the media volume is raised to about one fourth of the range. Compensate this by applying a different volume curve for music stream when the speaker is selected. Change-Id: I03f316fb28150eda50b05dfa12310701e2674648
* Issue 5256795: Phone ringtone volume is too lowEric Laurent2011-09-121-35/+32
| | | | | | | | | | | | Modified the volume curve for ringtones and notifications in audio policy manager. The first volume step now corresponds to -30dB instead of -50dB thus making ringtone much more audible for low volume settings. Also made a generic implementation of volume curves according to audio policy strategies. Change-Id: Ieb7916ba2e53c2a10a47efec82814cabed21c48b
* audio policy manager: invert SPDIF/HDMI priorityEric Laurent2011-09-121-7/+8
| | | | | | | | | | Route media audio in priority to S/PDIF output when available even if HDMI is connected. This allows users to chose to output audio to a different system than the display. Also force media volume to max when playing over S/PDIF. Change-Id: I03b82a7235cb60f2b5d6cf7923570554b07ac400
* AudioPolicyManager: register effect CPU on enableEric Laurent2011-08-112-18/+56
| | | | | | | | Audio effect CPU usage is now registered on enable and unregistered on disable instead of when the effect is created or destroyed. Change-Id: Icffcede9558d8d41887278f0efef2df430927381
* Audio effects: support for audio pre processingEric Laurent2011-07-122-15/+19
| | | | | | | Audio policy manager: allow registration of audio effects on inputs too. Change-Id: I92efa5b51cfde591052a5c56ba2b0b84de80df0f
* Audio HAL: added interface for audio preprocessingEric Laurent2011-07-111-0/+28
| | | | Change-Id: I0a84ddbff53f13662873f69d9be4dfa13ebcb8fe
* audio: update for audio/audio_policy header names/locationsDima Zavin2011-06-134-4/+4
| | | | | Change-Id: I7a414a2e173c2bfd72ae70d57b251fa0d4dbdfa0 Signed-off-by: Dima Zavin <dima@android.com>