IMPORTANT NOTE:
CL depends on another CL in frameworks/base
https://partner-android-review.googlesource.com/c/platform/frameworks/base/+/1206275
AudioProductStrategies offers the possibility to dynamically
translate attributes to stream types (and vice versa) within
audio policy engine.
Legacy engine has hard coded rules to maintain the translation
service.
This patch removes the hardcoded translation within the helper
and replaces them by AudioProductStrategy APIs.
Test: AudioPolicyTests: AudioProductStrategiesAllStreamsTest
It loops on all stream types supported by strategy and ensures
device selection matches. Hard coded stuff would prevent right device
selection.
Test: CTS: AudioTrackTest AudioRecordTest
Test: audio smoke test on sailfish, walleye blueline
Change-Id: I76589df5555136ed49dbacc7aac9b0b5e828bef2
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
To play the following tones as per Indian standards.
- Dial tone
- Busy tone
- Congestion tone
- Call waiting tone
- Ringing tone
Bug: 117161543
Test: Play each tone in indian locale
Change-Id: I6b7a2a5674a79a26fba80f987d2ed6ed555ce4bf
* Use time_t for tv_sec type.
* Use 'auto' to avoid explicitly use of 'long'.
* Use (u)int16_t instead of (unsigned) short.
Bug: 112478838
Test: build with WITH_TIDY=1
Change-Id: I023e579b071688731064e51dc94f404274cd59e2
Enable log function in ToneGenerator.cpp, then ToneGenerator
plays consecutively many times and do not stopTone.
"lpToneGen->mNextSegSmp*1000" will go beyond the scope of unsigned
int, and audioserver get crashed.
Test: Enable log function in ToneGenerator.cpp, alarm notification is
played when the phone is online. ToneGenerator plays consecutively.
Do not stopTone. then we get audioserver crash.
Change-Id: I073590088fccb32a73353d14970dc89441045663
ToneGenerator is only used for signalling, never for voice.
In order to use proper audio attributes usage and content type, convert
requests to play on stream VOICE_CALL to stream DTMF.
This will produce consistent routing and volume behavior when apps use
DTMF or VOICE_CALL streams.
Also use audio attributes when creating the AudioTrack
Test: CTS for ToneGenerator, voice and VoIP calls
Change-Id: Ic67abaeed0ea09f08ad5586cebe858e74fe21af9
Ringtone and call waiting tone for Ireland are not
following ITU-T specification.
This patch implements them as per ITU-T specification.
Bug: 68294204
Test: Build and test ringback tone for Ireland
Change-Id: I2cf3f425aec47b9dbc6ecf2ffb3aef44ca4f783c
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
Added the conditions that determine the region for HK,
then support Hong Kong specific ring tone and busy tone.
Bug: 63120797
Test: Build and test ringback tone for Hong Kong
Change-Id: Ifc836321ca1ac1f670d4640305727f4ea3800716
Singapore use CEPT standard supervisory tones except
for busy and ringtone. The Singapore mapping will be
used if gsm.operator.iso-country == "sg".
Bug: 63120560
Test: Build and test ring back tone for Singapore
Change-Id: I86076b0799a741ad8c54968799e400622d223ccd
The change in "Australia Supervisory DIAL tone"
seems not following ITU-T specification.
This patch implements TONE_AUSTRALIA_DIAL as per ITU-T
specification.
Bug: 63120712
Test: Build and test ringback tone for Australia
Change-Id: I7409732e57cf8d39ac2248e7e3e10217e30a118e
Modified gb's SupervisoryTone
when the following ToneType is selected to cover
GB market/operators requirement.
- TONE_SUP_DIAL
- TONE_SUP_BUSY
- TONE_SUP_CONGESTION
Bug: 63121347
Test: Build and Test ringback tone for UK.
Change-Id: I248b1b27f4156de37fd07bc878be719e3f6d6b95
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
This makes it so audioserver doesn't need to link against the entire libmedia,
which has dependencies on camera, ICU, OpenGL and other things that aren't
needed for audio.
Test: build/boot
Change-Id: I99ba1a3dc3b33ca9b3abd98e7519dbf228ee62af