If dual sim device has two SIM cards inserted,
in airplane mode it sets "gsm.operator.iso-country" prop
to a single comma, which prevents ToneGenerator to access
prop for "gsm.sim.operator.iso-country" - SIM provider
country code. When VoWifi is used to make a call,
incorrect ringback tone is being played (generic one),
instead if one being read from gsm.sim.operator.iso-country.
This patch fix this, and allows ToneGenerator to correctly
recognize SIM country code.
Bug: 65859291
Test: Check ringback tone during SIM2 VoWiFi in flight mode
Change-Id: Ibb57d38432f3d99f2eac568aec2a949af5e2a9cd
Make AudioStreamTrack derive from PlayerTrackBase to
provide playback and volume control via IPLayer interface.
Bug: 62027849
Test: verify aaudio playback regressions and registration of aaudio
players in AudioService
Change-Id: I5c04110f1554233eae3f1bc357a64a584d7303d1
Generalized the IPlayer implementation done for OpenSL ES
so that it can be used by other native audio players
Created two classes:
- PlayerBase implementing the interfacin native AudioManager and
IPlayer methods
- TrackPlayerBase, a derived class specialized for AudioTrack.
Bug: 62027849
Test: verify regressions with OpenSL ES buffer queue player
Change-Id: If5ad21a3c1a243fba0b312001c5034102e6d6672
Implement device switch detection on legacy path (AudioTrack and
AudioRecord) based on audio routing callbacks forcing the stream state
to disconnected.
Bug: 33355262
Bug: 62090113
Test: tested with write_sine and input_monitor command line tools.
Change-Id: I9e0421fee233964b1bf318acb640569196a00f13
1) Limit number of VolumeShapers that can be created.
a) 16 system VolumeShapers
b) 16 application/client VolumeShapers
2) Return proper volume before VolumeShaper is started.
3) Consistent xOffset definition used internally:
a) this is now always the position on the volumeshaper curve
which can go backwards if in REVERSE.
b) normalized time is always forward going and is scaled
to 0.f and 1.f depending on progress relative to
the curve's duration.
4) Fix replace method.
5) Add comments.
Test: Use updated CTS VolumeShaperTest
Bug: 37536598
Change-Id: I837ab2a481adc0abbd3f1338bfe2cb79831b11fa
Functions in headers that are not static inline will cause duplicate
symbol errors when linking if the header is ever included twice
into different compilation units of the same module. It also causes
-Wunused-function warnings if they are not used in the cpp file, which
were hidden by the use of -isystem frameworks/av/include.
Bug: 31751828
Test: m -j checkbuild
Change-Id: I36f258bb4f5c3df54e874280beab344e63c519d5
(cherry picked from commit 413adafb04)
The libc_malloc_debug_backtrace includes the log functions so there
is no need to also add the libc log library.
Test: Built and booted a bullhead device.
Change-Id: I00457ad0c321b385e68232ee87575588a8188db7
Consider whether VolumeShaper has been started or not when
restoring (position). If the VolumeShaper hasn't been started
we restore in that state. If it has been started already,
we advance to the end assuming the duration has been played out.
Test: CTS and headset / kill audioserver
Bug: 37536598
Change-Id: I4b55dca6f6a859563fd20bad4c8f67d2c92321c0
This is needed for AAudioStream_getFramesPerBurst(),
which is needed for callbacks to work correctly.
Bug: 34716038
Bug: 36489240
Test: CTS test_aaudio.cpp
Change-Id: I0e3f3f18a22bf6da8c288f0d2caec0bff0153f2f
Signed-off-by: Phil Burk <philburk@google.com>
Include mFrameCount in shared memory corrupt error log.
Fix typo in log for primary audio interface.
Include the new server frame count in logs for fast tracks.
Always log when fast is successful for output tracks, as it helpful
(was already there for input).
Cleanup dumpsys for threads.
Bug: 37153050
Test: builds OK, and logs contain more information
Change-Id: I2b5b4d700e8eb7c261a3125fb03ddc00bf08537e
(cherry picked from commit 1bfe09a0b1)
Changed type of ToneGenerator::WaveGenerator constructor parameter
samplingRate from unsigned short to uint32_t to permit output
sample rates such as 96000 Hz.
Bug: 33969539
Test: dialer tones work when output sink operates at 96000 Hz
Change-Id: I5551409c467a4fd98ea4d5c9703b120a526a443e
include/camera -> camera/include/camera
include/media/audiohal -> media/libaudiohal/include
include/media/AudioResampler*.h -> media/libaudioprocessing/include
include/media/Audio*.h,IAudio*.h,IEffect*.h,ToneGenerator.h -> media/libaudioclient/include
include/media/EffectsFactoryApi.h -> media/libeffects/include
include/media/stagefright -> media/libstagefright/include
include/media/nbaio -> media/libnbaio/include
include/media/<rest of files> -> media/libmedia/include
include/cpustats -> media/libcpustats/include/cpustats
Added symlinks from old location to new ones
Bug: 33241851
Test: VNDK linked modules will need to add explicit lib dep.
All other modules should compile the same
Change-Id: I0ecf754a2132640ae781a3cc31428fb8c0bd1669
The VolumeShaper is used to apply a volume
envelope to an AudioTrack or a MediaPlayer.
Test: CTS
Bug: 30920125
Bug: 31015569
Change-Id: I42e2f13bd6879299dc780e60d143c2d465483a44
Protect the Audio Policy Manager by adding extra checks
for data.readCString() strings when parsing / decoding
a Binder transaction.
Also:
* Moved audio_is_output_device() / audio_is_input_device() checks
inside handleDeviceConfigChange()
from the AudioPolicyInterface to the AudioPolicyManager
* Removed similar redundant checks inside
AudioPolicyService::setDeviceConnectionState()
Test: code compilation
Change-Id: Ib32a28ba2669b73aaf32b31bb18f41c8dd7d2605
* Since system/bt depends on this library, it needs to be converted to
Android.bp before the conversion in system/bt can be continued.
* Majority of work is done by androidmk Android.mk > Android.bp
* Fixed sanitize arguements
* Removed LOCAL_EXPORT_C_INCLUDE_DIRS as Android.bp only supports
exporting sub-directories of current Android.bp file
* Removed frameworks/av/media/libmedia/aidl include path as it no longer
exists and Android.mk failed to check that
* Removed include path for audio-utils as it is being automatically
included when we link against libaudioutils
* Android.mk file must be deleted as a library of the same name can only
be defined once in either Android.bp or Android.mk
* A library defined in Android.bp can be used by either Android.bp or
Android.mk files. However, a library defined in Android.mk cannot be
used by Android.bp file. Therefore, for system/bt to link against this
library in the Android.bp, this library must be converted first
Bug: 32958753
Test: Code compilation, no user visible effect
Change-Id: I2ae87a1151ed4235122c7774096c2dbff8b1fc62
* Added new call handleDeviceConfigChange() to the Media Framework.
That call can be used when there are device configuration changes
(e.g., Bluetooth A2DP codec configuration has changed).
* Added new method AudioPolicyManager::handleDeviceConfigChange().
That method toggles the UNAVAILABLE/AVAILABLE connection state of the
device, so it can be reconfigured as appropriate - e.g., the audio
feeding parameters can be updated.
* Fix ALOGVV compilation errors when extra logging is enabled.
Test: A2DP streaming to headsets
Bug: 30958229
Change-Id: I388abbbb3ec4d1a003b441cb0c77e00d80cad668
In case of error during openRecord_l(), there is a possibility
that a newly created AudioRecordThread is resumed by requestExit()
just after entering the Thread class _threadLoop() but before
entering the class threadLoop(). In this case, processAudioBuffer()
is executed once with mCblk == 0 and we assert.
Test: test case at bug
Bug: 29993798
Change-Id: I15d4f138218f6f01a020c4fc568a5b4831cb92a7
This will allow to track activity at the track level instead of
at audio session level as only possible with current implementation.
AudioTracks and AudioRecords will receive a unique audio port ID the
first time they register to audio policy with
getOutputForAttr()/getInputForAttr() and keep this ID for their
lifetime.
This CL is the first partial change and just updates the
audio policy and audio flinger APIs used at track creation time.
Test: basic regression test of audio playback and capture use cases
Change-Id: I8d612e67738e120494f61e3f7c60bfd0b2c6a329