Commit Graph

5051 Commits

Author SHA1 Message Date
Eric Laurent 991c092525 am a9024def: audio: implement mute on hdmi multichannel
* commit 'a9024defa11f6502ca55425a4803cd00441d51e7':
  audio: implement mute on hdmi multichannel
2013-04-04 10:10:20 -07:00
Eric Laurent a9024defa1 audio: implement mute on hdmi multichannel
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
2013-04-04 10:01:15 -07:00
The Android Open Source Project f289cf0457 am 36451458: Reconcile with jb-mr2-release - do not merge
* commit '3645145898b9abc49a0b8296aeb46299dfc72e56':
2013-04-02 07:54:52 -07:00
The Android Open Source Project 3645145898 Reconcile with jb-mr2-release - do not merge
Change-Id: I476bbd02389437601ba40b8c2436d8468cb5f892
2013-04-02 07:53:11 -07:00
The Android Automerger 4aafb5c3f1 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-04-01 05:55:56 -07:00
The Android Open Source Project fbde5ec436 am ac0d2e9f: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit 'ac0d2e9fc0a6c5b86dcbcacbf9ac6ad8810cbdb1':
2013-03-29 09:54:37 -07:00
The Android Open Source Project ac0d2e9fc0 Reconcile with jb-mr2-release - do not merge
Change-Id: Ic8c24bd4533dfa8c5f12bcf866dc9ece242ad10a
2013-03-29 09:49:12 -07:00
Ravi Kumar Alamanda 3e0f97d281 am be32c65f: am c301186b: audio/hal: Set playback buffer sizes to integral multiple msec
* commit 'be32c65f1396a9fbf9869a2d950171c54facb0e2':
  audio/hal: Set playback buffer sizes to integral multiple msec
2013-03-28 16:51:00 -07:00
Ravi Kumar Alamanda be32c65f13 am c301186b: audio/hal: Set playback buffer sizes to integral multiple msec
* commit 'c301186b49201c8ebf1dc05b336ba0a5e3877408':
  audio/hal: Set playback buffer sizes to integral multiple msec
2013-03-28 16:46:05 -07:00
Ravi Kumar Alamanda c301186b49 audio/hal: Set playback buffer sizes to integral multiple msec
- 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
2013-03-28 15:33:41 -07:00
The Android Automerger d0c74bc9dc merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-27 05:56:11 -07:00
Ravi Kumar Alamanda 77f14b75f7 am 81b9b396: am b1995069: qcom/audio/hal: Fix ringtone playback issue on Speaker
* commit '81b9b39666eaa27cc10ed3cd6d075691fde7289b':
  qcom/audio/hal: Fix ringtone playback issue on Speaker
2013-03-26 14:51:16 -07:00
Ravi Kumar Alamanda 81b9b39666 am b1995069: qcom/audio/hal: Fix ringtone playback issue on Speaker
* commit 'b199506991c9a93103ed149c6e1ab42c47bb8fc3':
  qcom/audio/hal: Fix ringtone playback issue on Speaker
2013-03-26 14:49:34 -07:00
Ravi Kumar Alamanda b199506991 qcom/audio/hal: Fix ringtone playback issue on Speaker
- 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
2013-03-26 12:29:24 -07:00
The Android Open Source Project 68d7f8a28d am 36b4980a: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit '36b4980ac6cbcabf25364122e67cb157b80298ff':
2013-03-20 16:42:00 +00:00
The Android Open Source Project 36b4980ac6 Reconcile with jb-mr2-release - do not merge
Change-Id: I3c7bd1f8cb10abd5fe288ad8a40c0db87f18dfb0
2013-03-20 09:32:45 -07:00
The Android Automerger 1b8813d181 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-18 05:56:06 -07:00
Ravi Kumar Alamanda d24896cf3f am 2bf04328: am 71c84b70: qcom/audio/hal: Fix the routing logic to route streams independently
* commit '2bf04328e721f2cddaa63ae765788dab6f29250f':
  qcom/audio/hal: Fix the routing logic to route streams independently
2013-03-14 21:32:13 +00:00
Ravi Kumar Alamanda 2bf04328e7 am 71c84b70: qcom/audio/hal: Fix the routing logic to route streams independently
* commit '71c84b70ff7c428e35ac187ca4a234acac558240':
  qcom/audio/hal: Fix the routing logic to route streams independently
2013-03-14 21:30:46 +00:00
Ravi Kumar Alamanda 71c84b70ff qcom/audio/hal: Fix the routing logic to route streams independently
- 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
2013-03-14 10:36:12 -07:00
The Android Open Source Project b547e749d0 am b10756cf: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit 'b10756cf6c650ead77de6cbeb8236fa61b4d9bb7':
2013-03-12 14:16:40 +00:00
The Android Open Source Project b10756cf6c Reconcile with jb-mr2-release - do not merge
Change-Id: Id502924260eb89508aa4e926328ef6b6d97b4b5b
2013-03-12 07:14:56 -07:00
Jean-Baptiste Queru 43044c2117 am ff9bdc8c: (-s ours) am 4f5f408b: am 62752611: am 1954242c: am 83e25988: (-s ours) am 294cefd4: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'ff9bdc8cd6330475e636ec988e0251e22b906635':
2013-03-11 20:56:10 +00:00
Jean-Baptiste Queru ff9bdc8cd6 am 4f5f408b: am 62752611: am 1954242c: am 83e25988: (-s ours) am 294cefd4: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '4f5f408b912ee3e39f31e7e2c558dd6bc5701204':
2013-03-11 20:49:16 +00:00
Jean-Baptiste Queru 4f5f408b91 am 62752611: am 1954242c: am 83e25988: (-s ours) am 294cefd4: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '62752611e864f14768615e0b22184feb66993e78':
2013-03-11 13:44:29 -07:00
Jean-Baptiste Queru 62752611e8 am 1954242c: am 83e25988: (-s ours) am 294cefd4: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '1954242cb27c68ef311abb3fa12c607145a10d7b':
2013-03-11 13:13:34 -07:00
Jean-Baptiste Queru 1954242cb2 am 83e25988: (-s ours) am 294cefd4: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '83e25988078d0c80e07c2055e21f1dc5fcbca0bd':
2013-03-11 12:41:59 -07:00
Jean-Baptiste Queru 83e2598807 am 294cefd4: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '294cefd490efdfc42bfc2a87a80b4d1a364713ee':
2013-03-11 12:27:41 -07:00
Jean-Baptiste Queru 294cefd490 Reconcile with jb-mr1-release - do not merge 2013-03-11 12:20:20 -07:00
Ravi Kumar Alamanda dfc5f352b6 am 1b07c468: am 02317798: qcom/audio/hal: Do not enable Fluence in speaker mode by default
* commit '1b07c46800089bf5e2c0a5a2e4157fb79197ab00':
  qcom/audio/hal: Do not enable Fluence in speaker mode by default
2013-03-06 16:53:23 +00:00
Ravi Kumar Alamanda 1b07c46800 am 02317798: qcom/audio/hal: Do not enable Fluence in speaker mode by default
* commit '02317798dec329868318e75a83c7c654cf5200b3':
  qcom/audio/hal: Do not enable Fluence in speaker mode by default
2013-03-06 16:47:47 +00:00
The Android Automerger 9b99948079 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-06 05:56:19 -08:00
Ravi Kumar Alamanda 02317798de qcom/audio/hal: Do not enable Fluence in speaker mode by default
- 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
2013-03-05 11:04:52 -08:00
The Android Open Source Project 37c2223e8c am c3db47c1: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit 'c3db47c15529aaf9c88fd86d63dcc70e6d9c4e66':
2013-03-05 15:58:53 +00:00
The Android Open Source Project c3db47c155 Reconcile with jb-mr2-release - do not merge
Change-Id: If1ae235f07c2cfe4184e9a18d1fe110a54955e20
2013-03-05 07:53:41 -08:00
The Android Automerger 7e58a5862d merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-05 05:55:45 -08:00
Ravi Kumar Alamanda 74e59d49b1 am a1755750: am 096c87f8: qcom/audio/hal: Fix audio routing to wired headset
* commit 'a175575025477413bb6fc96372d8b47ba13e9aac':
  qcom/audio/hal: Fix audio routing to wired headset
2013-03-05 00:22:16 +00:00
Ravi Kumar Alamanda a175575025 am 096c87f8: qcom/audio/hal: Fix audio routing to wired headset
* commit '096c87f83ccc1439acb639dbab00faf5a393afa7':
  qcom/audio/hal: Fix audio routing to wired headset
2013-03-05 00:20:41 +00:00
Ravi Kumar Alamanda 43d457cbfc am b40b5076: am 3b1816cd: qcom/audio/hal: Use linked list APIs from libcutils
* commit 'b40b50768039961410294593ccb5cc413f7c702f':
  qcom/audio/hal: Use linked list APIs from libcutils
2013-03-04 23:00:21 +00:00
Ravi Kumar Alamanda b40b507680 am 3b1816cd: qcom/audio/hal: Use linked list APIs from libcutils
* commit '3b1816cd594eba53a9869d7b23af36daacf58fa1':
  qcom/audio/hal: Use linked list APIs from libcutils
2013-03-04 22:57:35 +00:00
The Android Open Source Project 0301366456 am 967414c4: (-s ours) Reconcile with jb-mr2-release - do not merge
* commit '967414c4692df6988ea3ae7424199ebf1f89156c':
  qcom/audio/hal: Fix the issue audio not routed to headset
  qcom/audio/hal: Enable debug logs
  Revert "Fix routing for wired headset"
  qcom/audio/hal: Fix no voice call audio on bt-sco device
  Fix routing for wired headset
2013-03-04 19:10:10 +00:00
The Android Open Source Project 967414c469 Reconcile with jb-mr2-release - do not merge
Change-Id: I1b72e802b0ea0288d030d54011a9af97e3cdd5fd
2013-03-04 11:06:54 -08:00
The Android Automerger c6ee42a6d1 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-04 05:55:55 -08:00
Ravi Kumar Alamanda 096c87f83c qcom/audio/hal: Fix audio routing to wired headset
- 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
2013-03-01 14:14:51 -08:00
Ravi Kumar Alamanda 3b1816cd59 qcom/audio/hal: Use linked list APIs from libcutils
- Replace the linked list implementation with relevant APIs
  available in libcutils

Bug: 8292602
Change-Id: I2db173b845cbf4f35e53738b272f7f4a79279f3b
2013-03-01 11:02:13 -08:00
Eric Laurent 150dbfe8b5 audio: fix audio glitch when closing pcm stream
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
2013-02-28 14:56:35 -08:00
The Android Automerger a5dc76f663 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-02-26 08:50:56 -08:00
Ravi Kumar Alamanda 3771884b98 qcom/audio/hal: Move the check for network opeartor to proper place
- 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>
2013-02-26 07:45:27 -08:00
Ravi Kumar Alamanda 6c811e8d5c qcom/audio/hal: Fix the issue audio not routed to headset
- 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
2013-02-22 17:50:30 -08:00
Ravi Kumar Alamanda 616289a008 qcom/audio/hal: Enable debug logs
- 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
2013-02-22 17:50:21 -08:00