Commit graph

336 commits

Author SHA1 Message Date
Ying Wang
23853ead7d Cleanup Obsolete LOCAL_PRELINK_MODULE.
Bug: 18675947
Change-Id: I62157cd4bfab0edb445dd6543eb47a981e642848
2014-12-16 12:33:37 -08:00
Elliott Hughes
719b842310 Merge "Remove ARCH_X86." 2014-12-05 17:47:29 +00:00
Elliott Hughes
65d51a15a7 Remove ARCH_X86.
Should have been __GLIBC__, but the code is dead anyway.

Change-Id: I773f296a9c31949fa631cad863b841584c71f0ef
2014-12-04 16:20:52 -08:00
Dan Albert
9a8c57a346 Fix C++11 build.
Not sure how this slipped past my checkbuild...

Change-Id: Id238887a2a47ced387a6128a772fad3e468096be
2014-11-27 21:39:46 -08:00
Dan Albert
6d604b127e Stop using stlport.
Bug: 15193147
Change-Id: I5d53338f239ba18a2b007b345ba050d1560220b4
2014-11-17 14:21:50 -08:00
Jean-Michel Trivi
793a854e45 Fix remote submix crash on null sink
The "remote submix" HAL uses a MonoPipe instance to "pipe" audio
  from the sink of this virtual device HAL to its source.
  The life-cycle of this pipe is:
  - creation when either the input or output stream is open
  - destruction when both input and output are closed.

Changes are:
Fix test for pipe destruction: destroy pipe when both
  input and output streams are NULL.
Count how many read errors went into the logs and cap them
  so as not to spam the logs when the pipe is not properly
  set up. Less 'I' logs, 'D' logs instead.
When opening input stream, check for non-null sink before
  checking if it's shutdown.

Bug 16653334
Bug 17111907

Change-Id: I634b4192b00f9b74a5109f42242423e9c8cb4c7c
2014-10-15 15:16:10 -07:00
Eric Laurent
253def9fa0 usb audio: implement microphone mute.
Bug: 17321604.
Change-Id: I8e3daf2636dfd5f85d990c0093c52c908064afac
2014-09-14 12:32:28 -07:00
Paul McLean
0f519a9e5e Merge "Fix problem with dropouts with multiple USB audio streams." into lmp-dev 2014-08-28 20:44:42 +00:00
Paul McLean
c48cdc8ec0 Fixing non-playback on USB devices with support for MONO playback.
Bug 17136854

Change-Id: Ia0136fa8f9b4789d538b2dccb3f6071ae5062010
2014-08-28 09:16:39 -07:00
Paul McLean
2c6196f20c Fix problem with dropouts with multiple USB audio streams.
Bug 17136569

Change-Id: I94bdbe037533a3fd77f249fdd42f4d828d3bf87f
2014-08-28 07:59:03 -07:00
Glenn Kasten
8f40bc5599 Merge "Quick hack fix for USB accessory audio support" into lmp-dev 2014-08-21 15:35:20 +00:00
Mike Lockwood
7de76b2d4d Quick hack fix for USB accessory audio support
tinyalsa fails to retrieve the correct value for the period count
from the f_audio_source driver and tries to use zero instead.
This wasn't a problem before because the usb audio HAL used hard coded values
that were compatible with the driver.

Bug: 16799652
Change-Id: I6f5b907a0699c58b071e9f419ed8e053a7d9dc77
2014-08-21 14:51:29 +00:00
Paul McLean
93d4e0db0e Fix problem with reloading config of new capture devices
with same card/device numbers.

Bug: 17012657
Change-Id: I7cb50aedc538d8c648e7f66c8e153cf47ce12577
2014-08-13 23:08:41 +00:00
Paul McLean
af5187efbd Fix problem with reloading config of new devices with same card/device numbers.
Bug 16981885

Change-Id: I65c6c418ee0d0f42c87379b614f64302d27f8e77
2014-08-12 13:57:10 -07:00
Eric Laurent
05333d458d usb audio: fix set_parameters read/write concurrency
Do not read the ALSA PCM device configuration when playback
or capture is active.
Do not force ALSA profile update if card and device passed
to out/in_set_parameters() do not change.
Hold the main HAL lock when closing or opening the
ALSA PCM device.

Bug: 15520724.

Change-Id: I2b6087ed46ce7433de0b6dd8b24ec10de2e55d21
2014-08-06 14:18:26 -07:00
Eric Laurent
83cd830918 sound_trigger HAL update
Bug: 12378680.

Change-Id: I556cd316cbff3b8d88331319ca0ad65a09aae0f9
2014-07-31 11:16:16 -07:00
Andy Hung
2352f41f9d Merge "Pass multichannel capability to AudioPolicyManager" into lmp-dev 2014-07-29 21:36:00 +00:00
Andy Hung
ce53d748a3 Pass multichannel capability to AudioPolicyManager
Change-Id: Ifcfe5e9e0c01ccb0e9af25e0c718ea5f04181ae4
2014-07-29 09:50:26 -07:00
Andy Hung
03576bed81 Add multichannel USB handshaking with AudioFlinger
The number of channels can be "forced" using k_force_channels.
If the channel count proposed by AudioFlinger is not permitted
by the device, it is emulated.

Change-Id: Ib20e680c8f95adb84616a4fe52977f659cf4d6ca
2014-07-28 17:37:46 -07:00
Andy Hung
b52eff359f Merge "Add multichannel USB handshaking with AudioFlinger" into lmp-dev 2014-07-28 22:45:16 +00:00
Jeff Brown
d61f84efe2 Delete mcu HAL.
This HAL was intended to support doze mode but it is currently
unused and it's best for it to stay that way.

Bug: 16516536
Change-Id: I4f442e27d68f18ff322afd4c1debd2f392687e80
2014-07-26 14:58:23 -07:00
Eric Laurent
f5e2469c02 audio HAL: add parameters to open stream
Pass device address (and audio source for inputs) to
open_output_stream() and open_input_stream() audio HAL functions.

Bug: 14815883.
Change-Id: I5535677db3f3027917a31a7ed5c0a4c6bc013639
2014-07-28 11:38:40 -07:00
Paul McLean
c88e6ae584 Refactor USB HAL (audio_hw.c)
Refactoring alsa device attributes to alsa_device_profile.h/.c
Refactoring alsa device state to alsa_device_proxy.h/.c
Refactoring format functions into format.h/.c
Refactoring logging functions into logging.h/.c
Sundry (and extensive) code cleanup
Reworked locking on out_write() and in_read() to allow
  simultaneous input/output

Bug: 15986827, 15856702, 12833166

Change-Id: I82c8d0ef252b2f95ee23f263dc175f4c883bfd64
2014-07-25 12:48:51 -07:00
Paul McLean
845e78993b Merge "Move channel expansion/contraction functions to audio_utils/channels.h/.c" into lmp-dev 2014-07-17 21:15:46 +00:00
Paul McLean
c2201159bb Move channel expansion/contraction functions to audio_utils/channels.h/.c
Change-Id: I967a062f6c1cb5ae6acb6e92f4f3df00a0336733
2014-07-16 15:29:31 -07:00
Glenn Kasten
7d973adff4 Add audio_input_flags_t to HAL open_input_stream
Change-Id: I3519bfa45809e064d19473ebe6489c5249d306a8
2014-07-16 12:29:35 -07:00
Paul McLean
a02bc9d4c3 Marking invalid PCM formats with PCM_FORMAT_INVALID, shrinking format table.
Change-Id: I57da4ed85fe128e88e63c03be4fe836f8de76ac8
2014-07-16 09:30:03 -07:00
Paul McLean
eb192973f3 Support for 32-bit data conversions.
Change-Id: I18d955d9b2df99744ae6211bdb924c679ea7a617
2014-07-15 17:11:47 -07:00
Eric Laurent
b8fdeeedc5 Merge "Revert "Added enumeration of legitimate sample rates for input and output."" into lmp-dev 2014-07-15 20:39:52 +00:00
Eric Laurent
13082efc62 Revert "Added enumeration of legitimate sample rates for input and output."
This reverts commit 0a4f9f6662aad6b97a1877030d5efbcfbd94c03c.

Change-Id: I6e7125aecf2ff2e89a4c9206dc669d8e792a6300
2014-07-15 23:15:05 +00:00
Paul McLean
497abe3d99 Added enumeration of legitimate sample rates for input and output.
Change-Id: Ib53ec5254bd47761dbce84646a841eb9b32fd62a
2014-07-15 22:20:04 +00:00
Paul McLean
f899cc1c93 Merge "Added enumeration of legitimate sample rates for input and output." into lmp-dev 2014-07-15 20:39:52 +00:00
Glenn Kasten
2cd18a8715 Merge "Fix warnings" into lmp-dev 2014-07-15 20:39:52 +00:00
Glenn Kasten
6c2a68d081 Fix warnings
Change-Id: I1ba5c871a1cb44df8c383f595cbe6d75fef02aa3
2014-07-15 11:17:19 -07:00
Paul McLean
0467a5fe3e Support for 32-bit data conversions.
Change-Id: I18d955d9b2df99744ae6211bdb924c679ea7a617

Conflicts:
	modules/usbaudio/audio_hw.c
2014-07-15 10:54:26 -07:00
Paul McLean
f62d75ebc6 Added enumeration of legitimate sample rates for input and output.
Added device_profile to enable refactoring of query methods.
Refactored query methods (in_get_parameters/out_getParameters)
  in terms of device_get_parameters.
Freeing ALSA parameter structures (pcm_params_free)

Eliminated unnecessay input & output card/device (to support
 other changes).

Change-Id: I771cf4681a628f87ca6d6ee3f85f76ae4d7f1504
2014-07-14 15:18:56 -07:00
Eric Laurent
30f3e6d348 sound trigger: update HAL
New start_recognition() prototype with recognition
configuration structure specifying:
- List of keyphrases to listen to.
- Recognition mode for each keyphrase
- List of users and min confidence levels for each users

New recognition event format with confidence level and user ID
for each user.

Bug: 12378680.
Change-Id: I95e998c735321ceb5c27f477d894b574a6eca860
2014-07-07 10:15:45 -07:00
Paul McLean
99e35eba21 Merge "Multi-format USB audio input" 2014-07-02 18:22:50 +00:00
Paul McLean
6b1c0fef80 Multi-format USB audio input
Change-Id: I716a9f79dcfea35eacd0aeeda530e3e3c7eb4d32
2014-07-07 09:37:42 -07:00
Eric Laurent
c51e49259a Merge "audio: different frame size calculation for input and output" 2014-07-06 02:28:07 +00:00
David Turner
5933cb296d am 611a3b71: am 3e618a6a: Merge "gralloc: let target configure page flipping ioctl"
* commit '611a3b71431293a123a11af99ff731ab30067632':
  gralloc: let target configure page flipping ioctl
2014-07-04 13:34:54 +00:00
David Turner
611a3b7143 am 3e618a6a: Merge "gralloc: let target configure page flipping ioctl"
* commit '3e618a6aa10c783d1536f20edfc3347939cfa18e':
  gralloc: let target configure page flipping ioctl
2014-07-04 13:30:22 +00:00
David Turner
3e618a6aa1 Merge "gralloc: let target configure page flipping ioctl" 2014-07-04 08:02:36 +00:00
Eric Laurent
c5ae6a0304 audio: different frame size calculation for input and output
Bug: 15000850.
Change-Id: I7813e99a0b7ce613cc3b7d7c95be0525cb2d6c81
2014-07-03 16:51:09 -07:00
Brian Carlstrom
18cf130c43 Fix my-dir issue
(cherry picked from commit 52f493189b02c44c6dc329c86da3176ac9c22ad3)

Change-Id: I3dcca1fc0fb9d58f0d2f3867f8ab89f87a983cc1
2014-07-02 09:38:41 -07:00
Eric Laurent
dd45fd3aed audio: fixed channel count determination from channel mask
Do not use popcount() to derive channel count from channel mask.

Bug: 15000850.
Change-Id: I4d803dc3e1cb680baa0022e539e6f9eab3ffef1a
2014-07-01 20:32:28 -07:00
Brian Carlstrom
8e3009721e Fix my-dir issue
Change-Id: I9c93a273328ac0c6e96f27870b890a16d18479a5
2014-06-30 15:15:45 -07:00
Paul McLean
e32cbc1fdd Multi-format USB Audio suport
Change-Id: I2815e1dc38d39a3d88fb0affd52b1b9f50a73b92
2014-06-30 10:48:06 -07:00
Eric Laurent
fbc02dc16e usb audio: fix capture channel conversion
Change-Id: Ibdff053bd6ecc4bf2bc8bb51384098911f52f6ef
2014-06-27 18:39:21 -07:00
Paul McLean
33a6b171ba Implement minimal buffer size for playback
This will enable low-latency playback in mixer/audioflinger.

Change-Id: I415aa1b92e3c6f945a48be7b626527f0b02a82d7
2014-06-20 10:55:11 -07:00