summaryrefslogtreecommitdiffstats
path: root/audio
Commit message (Collapse)AuthorAgeFilesLines
* libhardware_legacy: Increase stream mute timeKarthik Reddy Katta2013-06-151-1/+6
| | | | | | | | - Increase the stream mute time to avoid audio glitches while switching between combo devices. Change-Id: I8b47e6e8b977b1025310fd2b16b452a6c11005bd CRs-Fixed: 448577
* Primary output check for sonification is removed.Vimal Puthanveed2013-06-151-10/+1
| | | | | | | | | | | | | | | | - When there are 3 different tracks (Ringtone, Music and Touchtone) the device switch happens for touchtones to primary if the primary output is active. This can lead to music being played in combo due to timing issue. - This is mainly because we have a check for, primary output if active we return true for SONIFICATION. This will set SONIFICATION for touch tones and this device switch will come after music device is set. - Hence music will start playing as SONIFICATION. - We have removed the primar output check for getting device strategy Change-Id: Ibe2c381a887a49ea8b776fb2148f38b61532d021 CRs-Fixed: 456842
* qcom-fm: audio: add support for FM featureMingming Yin2013-03-243-0/+25
| | | | | | | | | | | -Add set_fm_volume() to set handle fm volume Change-Id: I2a2c6a60b9855d9360ff8fb90849517e77e5faab Conflicts: audio/AudioPolicyManagerBase.cpp include/hardware_legacy/AudioSystemLegacy.h
* fmradio: cleanup QCOM_FM_ENABLED/STE_FM defs and ifdefGiulio Cervera2013-02-161-2/+5
| | | | Change-Id: Ia34dca04e6b9de3509987ad9d88a5fecc3820e2f
* Merge tag 'android-4.2.2_r1' of ↵Steve Kondik2013-02-121-6/+23
|\ | | | | | | | | | | https://android.googlesource.com/platform/hardware/libhardware_legacy into 1.1 Android 4.2.2 release 1
| * audio policy: notification delay - DO NOT MERGEEric Laurent2012-11-081-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | merge from master: "audio policy: fix notification start delay The mechanism delaying notifications in case of muliple active outputs with long latencies must take into account recently paused audio tracks. Bug 7400428." Change-Id: I4ac9dfac81336e33f475b4f28df82713707d0c46
| * audio policy: fix volume problem - DO NOT MERGEEric Laurent2012-11-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge from master: "audio policy: fix volume change when disabling SCO commit 76e97d39 introduced a regression by having setDeviceConnectionState() force a device change on duplicated outputs even if the selected device is 0. This also forces a device 0 for the two outputs it is duplicated to, which may override a valid device selection on those outputs and apply default volumes. Bug 7429869." Change-Id: I37dd66343c54eb27e420089edbda04444fa1e2c6
| * audio policy: fix dynamic parameter - DO NOT MERGEJohn Grossman2012-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge from master: "Fix a parse error in checkOutputForDevice Fix a small parsing error in parsing the supported formats and sample rates of a stream out with dynamic values for these parameters. The channel mask parser was properly skipping the "=" in the setting string, but formats and sample rates were not (cauing the first reported format and sample rate to end up being skipped)" Change-Id: Id227a44f6b5fc0c223f2ce74f94ebb6abc5fa77d Signed-off-by: John Grossman <johngro@google.com>
| * audio policy: direct output fix - DO NOT MERGEJason Simmons2012-11-081-0/+1
| | | | | | | | | | | | | | merge "Close a newly opened direct output if its parameters are invalid" from master Change-Id: I27ac015217480a854d25273ab9498949971b411a
* | audio: Add support for QCOM audio devices, formats, and channelsMingming Yin2012-12-231-16/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add QCOM supported devices, fomats, and input/output channels in AudioPolicyManagerBase - Add QCOM supported devices in AudioSystemLegacy.h Change-Id: I5e2977a630c2bf9211af62d97ae024c5c57075f9 libhardware_legacy: Add support for DirectTrack - Add support for DirectOutput in libhardware_legacy - Add new APIs to AudioStreamOut base class - Add audio output flags to openOutputStream Change-Id: I301b3b9b2c2ad08dba75f616008d692e825af96f audio: add missing QCOM audio devices, formats, and channels - Add support for FM I/O devices and communication device for VOIP - Add support for mp2 audio format - Add support for 6.1 audio channels Change-Id: I7b3042902c658dc8e5dfa34719fb80d18f3ff4e7 libhardware_legacy: Support LPA Playback Add support to enable Playback in LPA mode When Alarm is playing on headset+spkr, if LPA playback is selected STARTEGY_MEDIA gets selected and switches device from Combo device to Headset. - Fix the issue by selecting Combo device only even incase of LPA when stream ALARM/NOTIFICATION is active. Change-Id: Ifde78a744a17ce613eac92b4c3bcf875167aaeb6 Add ifdefs for QCOM enhanced features Change-Id: I87ce3503ed85458c775d0c8c7fa649d8194e28e3
* | audio_policy: Fix volumes for ICS blob compatRicardo Cerqueira2012-12-231-1/+8
| | | | | | | | | | | | | | Allow usage of the default audio_policy source, even if the primary audio HAL is an ICS binary blob Change-Id: I959a925f458e14380c2e5443b1378c4018d9f084
* | Add support for ICS audio blobsRicardo Cerqueira2012-11-223-1/+50
|/ | | | Change-Id: If0cde8860a5cb1fa63a40787bfe001cf18e9be6d
* audio policy: active analog dock force usageEric Laurent2012-10-261-1/+2
| | | | | | | | Qualify the selection of the analog dock for media by the force use. Bug 7302106. Change-Id: I2ea48fd43866ce8491085bba72a27751b2203401
* Merge "audio policy: fix scanning of supported devices" into jb-mr1-devEric Laurent2012-10-181-2/+2
|\
| * audio policy: fix scanning of supported devicesEric Laurent2012-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | Fix is a bug in checkOutputsForDevice() which makes that we can try to reopen an output stream after a new device is connected because we believe that no opened output is available for this device. Bug 7369475. Change-Id: I2290a9b5ba102657cda495fbb8a995e0003b883a
* | Merge "audio policy: tune voice/video chat volumes" into jb-mr1-devEric Laurent2012-10-181-18/+20
|\ \ | |/ |/|
| * audio policy: tune voice/video chat volumesEric Laurent2012-10-171-18/+20
| | | | | | | | | | | | | | | | | | Add new volume curves for VOICE_CALL stream type to improve voice/video chat volume on speakers. Bug 7346643. Change-Id: Ib282a97570d2234deec6b58391bdfc45846d9cc0
* | audio policy: update output delayMs in setPhoneStateSathishKumar Mani2012-10-171-0/+16
|/ | | | | | | | | | | | | - Issue: When call is connected in HDMI while playing music, Playback is routed to phone shortly - Cause: delayMs is not updated correctly, and no delay is set when setOutputDevice is called - Fix: update delayMs with biggest mOutput latency and mute STRATEGY_MEDIA on all outputs Bug: 7268860 Change-Id: I12b75443a29ab8485314bd0cbfe5ee4789be5c29 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "audio policy: do not route in call audio to HDMI" into jb-mr1-devEric Laurent2012-10-161-20/+24
|\
| * audio policy: do not route in call audio to HDMIEric Laurent2012-10-161-20/+24
| | | | | | | | | | | | | | | | | | In call audio shuold not be routed to HDMI, S/PDIF or USB by default as most platform do not support it. Bug 7339490. Change-Id: Iac4803f3fbde0c321fc7b37ab7ba34af6a16b4aa
* | Initialize mStrategyMutedByDeviceMarco Nelissen2012-10-161-0/+3
| | | | | | | | | | | | Valgrind found this Change-Id: I24c640c2b0b6cac129c23bfc18828aff005ec952
* | Remote audio submix always has priority for media, only plays mediaJean-Michel Trivi2012-10-111-5/+5
|/ | | | | | | | | | | Don't use force use mechanism for remote audio submix routing. Prevent streams of strategy sonification to be played over remote audio submix (e.g. WFD) and HDMI Bug 7318180 Change-Id: Ic5c87d3c568873dffea9002cf87ecf42b403cde6
* AudioPolicyManager supports querying active record sourcesJean-Michel Trivi2012-10-102-0/+20
| | | | | | | | | Add support for querying whether there is currently a recording underway from the specified audio source. Bug 7314859 Change-Id: I8894845b176241134870af5df2bebc5ef27e4de4
* audio policy: add forced uses for systemEric Laurent2012-10-081-13/+18
| | | | | | | | | | | | | The volume and routing policy of AUDIO_STREAM_ENFORCED_AUDIBLE is now controlled by AudioService by means of new forced use type AUDIO_POLICY_FORCE_FOR_SYSTEM with config AUDIO_POLICY_FORCE_SYSTEM_ENFORCED. Property ro.camera.sound.forced is not used anymore. Bug 7032634. Change-Id: I742b0eebbe6b013f61d199846454a06411b52bc8
* audio policy: force device update if disconnectedEric Laurent2012-09-261-1/+4
| | | | | | | | | | | Force the new device selection to be applied when a device is disconnected even if none is select. This is to indicate to the audio HAL that current device selection is not valid anymore even if no new device is selected because no audio track is active. Bug 7141149. Change-Id: Iade02fb53a4cc2051fce9da07870c5391396b696
* audio policy: fix crash when closing HDMI outputEric Laurent2012-09-251-0/+1
| | | | | | | | | When a direct output is closed, the vector containing the previously opened outputs must also be updated. Bug 7157451. Change-Id: I575b1f4928cf7527a4a98632fdec7600664a1e1c
* Support audio recording while remote submix is activeJean-Michel Trivi2012-09-181-2/+18
| | | | | | | When evaluating if an audio record is active, do not count inputs opened on "virtual" devices, such as remote submix, as active. Change-Id: If19c321cf673e3bdf4c3f81e73c163190df7c21e
* audio: new audio devices enumsEric Laurent2012-09-073-90/+170
| | | | | | | | | | Changes for new audio devices enums: - legacy audio HAL wrapper provides conversion between new and old device enums. It exposes a rev 2.0 audio device API to the audio framework and allow legacy implementation to use old device enums. - AudioPolicyManager: use standard enum value for no device (0). Change-Id: I855d72291d672cdd8a6641bedb228634a54b7d9d
* Update Audio Policy Manager for remote submixJean-Michel Trivi2012-09-071-6/+33
| | | | | | | | | | | | Define a new forced mode to route media to remote submix. Update media routing rules according to mode. Modify device connection management for remote submix. Note that this CL doesn't implement changes to not prevent audio recording when WFD is on, as audio recording is currently limited to one input. Change-Id: I458fe1802705da2d091ff82e536dc3e7f092f291
* audio policy: fix ringtone volume on headphonesEric Laurent2012-09-051-2/+3
| | | | | | | | | | | When limiting ringtone volume because headphones are connected and music is playing, the volume was not limited against the right music volume. The is because the device used for music (headphone) is not the same as the one used for ringtone (headphone + speaker). Bug 6816207. Change-Id: I3342be1789a1b7c58705812335b788f030bc6d76
* Update AudioPolicyManagerBase to only use audio_devices_tJean-Michel Trivi2012-08-241-123/+129
| | | | | | | | | | | | The AudioPolicyManagerBase implementation was using some device enum values from AudioSystemLegacy.h, of type audio_devices, and some from /system/audio.h, of type audio_devices_t. Now only uses audio_devices_t, and associated functions to inspect what audio device type they correspond to. Added #define to represent "no audio device" to clarify code. Removed unused variable in AudioPolicyManagerBase::startOutput() Change-Id: Ibec311dac550d6a806397377206a43bc708914c0
* effect_descriptor_t const correctnessGlenn Kasten2012-07-242-4/+4
| | | | Change-Id: I734155d4cebb22b180f25290332c7c48be1e2b36
* Merge "Use audio_channel_mask_t consistently"Glenn Kasten2012-06-252-8/+8
|\
| * Use audio_channel_mask_t consistentlyGlenn Kasten2012-06-192-8/+8
| | | | | | | | Change-Id: I0a274ab9f30a9380bc00eae69988224721fea177
* | audio policy: fix HDMI hot plugEric Laurent2012-06-211-16/+21
|/ | | | | | | | | | | When an HDMI sink is connected it is possible that a direct output is made available for multichannel audio. In this case, the list of outputs available to reach the HDMI device after the connection is different from before. checkOutputForStrategy() must take this into account in order to invalidate tracks so that they can be re connected to the multi channel output if necessary. Change-Id: Id0baeb51688eba8017fe96bf92aaac52eb8e0f59
* audio policy: fix volume upon A2DP connectionEric Laurent2012-06-131-4/+4
| | | | | | | | | | | | | | | setForceUse() should not force new device selection on outputs if the selected device is 0. If a device 0 (no device) selection is forced on a duplicated output, this causes volumes to be reset to their default on outputs the duplicated output is connected to. Also force reapply volumes when a new output is created. It is safer and more explicit than relying on the fact that the selected volume is different from default volume and thus is actually sent to audioflinger. Bug 6658021. Change-Id: I0a14d5229847e001b0d44f60d41c241efdb9946a
* Merge "Increase system stream volume on speaker" into jb-devJean-Michel Trivi2012-06-071-2/+2
|\
| * Increase system stream volume on speakerJean-Michel Trivi2012-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Increase the volume of the system stream for speaker output, so sounds played on this stream can be louder on devices that need it. Additional changes in the rest of the framework will define properties to tune sound effect levels on a per-device basis. Bug 6448481 Change-Id: Ia6c1ff314a321c6e271a682e3f4ff64c250b184e
* | Merge "audio policy: fix notification volume limitation" into jb-devEric Laurent2012-06-071-1/+2
|\ \
| * | audio policy: fix notification volume limitationEric Laurent2012-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The limitation of notification volume when playing music over headphones has been broken for devices where notifications and music are played over separate output streams. Fix computeVolume() to check music stream activity on all outputs. Bug 6623707. Change-Id: Ie25f9b428ea086efe0be5fea2d31551d2528b655
* | | audio policy: remove delay when enabling speakerEric Laurent2012-06-061-2/+5
|/ / | | | | | | | | | | | | | | | | Do not force mute on a strategy when moving it from one output stream to another if no stream is active. Bug 6611972. Change-Id: I21f72b0ef3600639de66e6b0a1c3ae44045fd81f
* | audio policy: improve support for direct outputsEric Laurent2012-06-041-150/+291
|/ | | | | | | | | | | Add the capability to query supported parameters for direct outputs after a device is connected. This allows to dynamically update the output profile for devices like HDMI where the capabilities depend on the connected sink. Also added very verbose log mode for volume and mute. Change-Id: I1d4ba8e7dbc3e1af883582857ce93240441e551c
* Ensure global effects are on the correct outputMarco Nelissen2012-05-311-16/+38
| | | | | | | | | | | Global effects such as the visualizer would sometimes not be on the right output, for example when switching from a2dp to wired headset or back, when there are both regular and deep buffer outputs available. We now check which of the available outputs the global effect should be on when more than one is available. b/6528772 Change-Id: Ie268e32ef41e7888da67c24730dc93750a2cf579
* audio policy: allow disabling A2DP for media.Eric Laurent2012-05-221-15/+22
| | | | | | | | | Added FORCE_NO_BT_A2DP forced use to allow applications to override default policy to use A2DP whenever connected. Bug 6485897. Change-Id: I784271c062294fbe1aff7884965075b40c68dc24
* 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