On direct output streams the audio HAL must implement
the volume function. In the case of HDMI the only function
required is to mute audio when volume is 0 as volume
is defined as fixed on digital output streams.
Bug 8541062
Change-Id: Ia1342f6ffb7b7c95c7c386e3e2ee5243fe65051b
- The call to pcm_write was taking varying time to complete.
This was because DSP always expects the buffer duration to
be an integral multiple msec. When this is not the case,
DSP waits for the rest of the data to be filled too.
This accumalates the delay and causes the variation
in timing.
- Change the deep buffer playback buffer size to 960 samples(20msec)
and low latency to 240 samples (5msec) to fix the issue.
Change-Id: I9448920e89595a65cf92a5abd9187e02043b699a
- Start music playback on HDMI, go to settings-->sound-->ringtone
and select a ringtone for playback. The ringtone audio playback
starts only after 15sec.
- When ringtone is selected, the low latency path is switched from
HDMI to Speaker device. The low latency path uses only 2 buffers
of 10.3msec each. If the device switch takes more time, the data
filled kernel buffers meet the stop threshold and the ALSA
framework triggers auto stop on the stream. This results PCM
stream to be blocked for more than 10sec and hence no audio
heard until the write is unblocked.
- Fix the issue by setting the stop threshold to INT_MAX to avoid
auto stop.
- This change also ensures that open_output_stream fails if the
HDMI sink does not support 5.1 or 7.1 playback.
Bug: 8401042
Change-Id: I4c1e04be2c47d67087b1cdda87e2dce77bde58f1
- Current implementation assumes that the output devices for all
the output streams and voice call will be same. So it updates
the devices on all the output streams when out_set_parameters()
is called on any stream.
- Update the routing logic to support all the streams independently
based on the devices set by audio policy manager on each stream.
- However, on this target there is a limitation that earpiece,
speaker, and headset devices cannot be enabled concurrently as
they share the same backend. Updated routing logic takes care of
this limitation.
Bug: 8239898
Change-Id: I3091be6894210c77c479b872cec39d821d10bd90
- Speaker volume is low during voice call.
- Fluence is enabled by default even in speaker mode during voice
call. Mako does not meet the spec for Fluence due to mics
placement issue.
- Fix the issue by not enabling Fluence in speaker mode.
- If the device supports it, set the property to enable fluence.
Bug: 8272345
Change-Id: I9c4726409c4eb8d39dfbbb2f47e3075a6f6d5cc3
- Start music playback and plug in headset within 3sec. The
audio is heard on both headset and speaker whereas it is
expected to play on headset.
- Fix the output device updation and selection logic to resolve
the issue.
Bug: 8239898
Change-Id: I476c9ede241e319c90cb960dd302384f41a6b52c
Holding the audio device mutex while calling pcm_close() is not necessary
and will cause writes on other output streams to be blocked until close
completes which can take several hundred milliseconds.
Not holding the audio device mutex during the whole standby sequence
forces to change the lock order between audio device and output stream mutex.
The result is that we do not acquire the audio device mutex systematically before
the stream mutex in out_write(). This is not a problem with this audio HAL
as set_mode() does not acquire the stream mutex and out_set_parameters() is always
called in the same thread (same priority) as out_write().
Same change done for input threads.
Bug 8267567.
Change-Id: I17bb187c0564200f6362586885e61500d52d5bc2
- Check for the network operator at boot up does not return correct
value always
- For the T-Mobile, US the HANDSET and MIC devices need different
gain settings
- Do the check before enabling those devices
Bug: 8255423
Change-Id: I58011f9c239dce87507b581a62e0dcc09164d15a
Signed-off-by: Iliyan Malchev <malchev@google.com>
- Boot the phone without headset plugged in, plug in headset and
play music. Audio is heard on speaker instead of headset.
- The devices of output stream corresponding to music playback
is not being updated correctly.
- Fix by correcting the output device uption logic in
out_set_parameters()
Bug: 8239898
Change-Id: Ie24de09847533660d2280744d33cba7d7fb7d535
- Enable few debug logs to track audio use cases and
sound device activities
- Clean up some ToDos.
- Rename SND_DEVICE_INVALID to SND_DEVICE_NONE.
Bug: 8242117
Change-Id: I0510288334d6a1e71c0846f6d10ac8ba283965a6