Commit graph

1612 commits

Author SHA1 Message Date
Eric Laurent
73b8a7414a audio: audio HAL extension for routing and volume control
Added audio HAL functions to control audio routing and audio gain.
Audio HALs above version 3.0 must implement these functions.
These functions will be used by the framework instead of
out_set_parameters("routing"=XXX) for device selection on an output
or input stream.
They will also allow direct connection of input devices to output devices
as well as gain control on devices or streams.

The gain or routing capabilities are exposed in audio_polciy.conf file.

Change-Id: Ic293fd41d492e38e86bdc35e3ad93aa5deb0b48f
2014-05-22 18:24:02 -07:00
Eric Laurent
447cae749c audio HAL: add minimum supported version
Add a definition for the minimum audio HAL version supported
by the audio framework.

Change-Id: Id7df440cc9fcc23b27b61c81bacb569599a20c13
2014-05-22 14:33:55 -07:00
Elliott Hughes
0d1c2a49d6 Switch libhardware to POSIX dprintf.
Bug: 15022164
Change-Id: Ie4c93318c2e7a947a57e16b220a6abceec59e6aa
2014-05-22 11:12:12 -07:00
Stewart Miles
3c0ddf0af9 Merge "Added basic resampling of submix data on read from the input stream." 2014-05-20 19:55:00 +00:00
Wei Wang
6c2e2d3b57 Revert "Revert "LE Multi ADV feature""
This reverts commit cbeca51023.

Change-Id: I3f2130217ffd616099a017db2f26d3d112f2c1ea
2014-05-19 23:49:45 -07:00
Jinsuk Kim
aa7dc51c30 Merge "Update HDMI-CEC HAL interface for TV" 2014-05-20 04:57:28 +00:00
Wei Wang
cbeca51023 Revert "LE Multi ADV feature"
This reverts commit 2d17c28b4f.

Change-Id: I3abe730817a5b1714b0403f387a3ed416ded63f3
2014-05-20 04:52:22 +00:00
Satya Calloji
2d17c28b4f LE Multi ADV feature
Header changes for LE Multi ADV feature

Change-Id: I24a18a2f30ab1618875d3ac9ca1e9f5e5064f62d
2014-05-19 20:19:49 -07:00
Stewart Miles
02c2f7126c Added basic resampling of submix data on read from the input stream.
As described in If592270a17e08c5852b00b730bb9c5166c746ad2 the audio mixer
doesn't work correctly when sending data to an output device that supports
a sample rate that is more than 2x different to the source data rate.

This modifies the remote submix module to resample data from the pipe
when it's read from the input stream.

Bug: 11273000
Change-Id: I9c4b3710bcebf3a2df045965dfdafdd9855b0b25
2014-05-19 19:08:02 -07:00
Stewart Miles
86a5ac7edc Merge "Add optional logging of input and output streams to the submix HAL." 2014-05-20 01:09:54 +00:00
Jinsuk Kim
c4178a66a4 Update HDMI-CEC HAL interface for TV
Added a few more API:
 - is_connected
 - get_port_info
 - set_option
 - set_audio_return_channel

Also added another event type (tx_status) that reports the status
of transmission. The status is reported in asynchronous fashion
since the send operation can take longer due to bus conflict.

Change-Id: I75decb8451a23f8a8eda0895d58f22c45227c0b3
2014-05-20 07:56:36 +09:00
Sasha Levitskiy
fed61d2703 Merge "Libhardware: HAL: Fingerprint: Add template collection progress hint; remove match confidence." 2014-05-19 19:47:52 +00:00
Aravind Akella
6480d8ddbf Merge "Activity Recognition HAL." 2014-05-19 19:04:49 +00:00
Aravind Akella
153c40ce8b Activity Recognition HAL.
Add separate methods for enabling/disabling activities and rename activity constants.

Change-Id: I5986f6cf6ceb12a88f3d881ac5ccb6b9b50a2e58
2014-05-19 11:13:28 -07:00
Stewart Miles
92854f5fcc Add optional logging of input and output streams to the submix HAL.
In order to aid debugging of issues with streaming data in the submix HAL
this change introduces a compile time option to log the input and output
streams to files for offline inspection.

Bug: 11273000
Change-Id: Ib2d929d7ba66f63b719e6996df9016f73c9080aa
2014-05-19 10:57:09 -07:00
Stewart Miles
e54c12cd53 Implemented mono->stereo, stereo->mono channel conversion in submix HAL.
The AudioFlinger service currently will only open stereo streams from
mono AudioTracks since all mixing is performed in stereo and then sent
to the HAL stream.  In order to allow a process to record a mono stream
from the submix HAL, this change implements channel conversion in
the submix HAL so that it's possible to open the output stream in stereo
and the input stream in mono.

Bug: 11273000
Change-Id: I840ce0be3cf7e5bc8a4c6de63a70d5408d60b716
2014-05-16 17:41:59 -07:00
Sasha Levitskiy
969466c75b Libhardware: HAL: Fingerprint: Add template collection progress hint; remove match confidence.
Change-Id: I62ce57054b7e0cfda8aa260176e504113677d993
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2014-05-16 15:48:25 -07:00
Stewart Miles
2d199fe082 Modified submix HAL to drop data to the output stream if the pipe could block.
Since it's possible to open an output stream on the submix HAL before the input
stream is open, writes to the output stream that fill the shared pipe result in
indefinitely blocking the thread writing to the stream.  This change modifies
the behavior of writes to a submix output stream such that if a write would
result in blocking the thread and an input isn't open, the pipe is flushed
of the appropriate amount of data such that the write will not block.

Bug: 11273000
Change-Id: Ic81c50e4b44b777273191a1bc8cdf52181c3d2a0
2014-05-16 15:37:24 -07:00
Stewart Miles
c1e0179a95 Merge "Modify submix HAL to allow either input or output streams create the pipe." 2014-05-16 22:34:04 +00:00
Stewart Miles
3dd36f9595 Modify submix HAL to allow either input or output streams create the pipe.
This change is primarily being made as a short term solution to allow an input
audio stream received over the network to be fed into an audio input stream (e.g
the MIC stream) when a physical audio input device isn't present.

This makes both the input and output streams owners of the pipe so that
creation order no longer matters.  In addition, it works around a memory leak
caused by applications that never close input streams.

Bug: 11273000
Change-Id: I5a3fb0b6f2148c113b2f3050b72ff2a8979a3e6d
2014-05-16 12:54:40 -07:00
Jungshik Jang
5bf671610a Add ARC commands
ARC, Audio Return Channel is newly introduced in HDMI CEC 1.4.
Here is a list of new command
<Initiate ARC>
<Report ARC Initiated>
<Report ARC Terminated>
<Request ARC Initiation>
<Request ARC Termination>
<Terminate ARC>

Along with it replaced <Get OSD Name> with <Give OSD Name>
which is renamed in CEC 1.4.

Change-Id: I6a03b30cf90a8f6dca54831355be05682a6df96c
2014-05-16 16:31:27 +09:00
Nick Vaccaro
0ffd860977 am f8cbc9e6: am ad70dc48: add /system/vendor/lib as valid search path for sensor HALs
* commit 'f8cbc9e65cd67da20167a88daaa9e99bf32de8b9':
  add /system/vendor/lib as valid search path for sensor HALs
2014-05-15 21:48:57 +00:00
Nick Vaccaro
f8cbc9e65c am ad70dc48: add /system/vendor/lib as valid search path for sensor HALs
* commit 'ad70dc482f044b1ef03ef1aa74b6e2c5a446d32b':
  add /system/vendor/lib as valid search path for sensor HALs
2014-05-15 21:45:47 +00:00
Nick Vaccaro
ad70dc482f add /system/vendor/lib as valid search path for sensor HALs
MultiHal will now accept sensor HALs listed in the hals.conf file that
reside in either /system/lib/hw or /system/vendor/lib.

Bug: 14994424
Change-Id: I13f17352b97c36b97cfbcee8c9b6a0d2e1ed6dc3
2014-05-15 14:31:51 -07:00
Prerepa Viswanadham
45edab9af5 LE: Add API to set scan interval and window (1/4)
Delete client_if from scan api's
Change-Id: If24cb134ae7204de69c8c89664ce34f9d59da76a
2014-05-15 17:36:51 +00:00
Stewart Miles
7072684fbf Allow submix module streams to use any NBAIO format.
This modifies the submix module to allow the internal buffer to be any NBAIO
format.  This is useful when sending audio of arbitrary formats between
processes.  AudioFlinger continues to enforce format restrictions as specified
by the device specific audio_policy.conf so the submix streams will have the
same restrictions as before.

Bug: 11273000
Change-Id: I2cd4ff383c5c75e491ab22bc1949c835f04e230f
2014-05-14 09:59:59 -07:00
Stewart Miles
568e66ff9e Modified submix buffer size accessors to use the pipe configuration.
This change stores the period size (fraction of the pipe buffer size)
in the submix device's configuration which is then used to calculate
the input and output stream buffer size.

In addition, accessors for the input / output stream format have been
modified to use the pipe format in the device configuration rather than
returning hard coded values.

Bug: 11273000
Change-Id: I9c14f8d549f4b4a6d7f77a9aeab4edfa5ba6bd1a
2014-05-14 09:17:22 -07:00
Stewart Miles
f645c5e629 Implemented accessors for derived submix HAL objects.
This change cleans up casting from contained to container structures.
Such that if..

struct child {
  struct parent;
  int child_data;
};

is changed to...

struct child {
  int child_data;
  struct parent;
};

functions that cast from "parent" to "child" will continue to function
correctly.

Change-Id: I88d70930d4d4df2e291239e562971b07d8b92f94
2014-05-13 12:15:40 -07:00
Stewart Miles
b253bcc44a Described restrictions for common HAL object methods in nfc.h.
Follow up from change Ibe4300275286ef275b2097534c84f1029d761d87
which extends comments to the nfc_nci_module_t and nfc_nci_device_t
structures.

Change-Id: I060bda450912ff3fc041027faa8f03c24e310870
2014-05-12 15:05:24 -07:00
Jinsuk Kim
3f08cd678e Merge "Described restrictions for common HAL object methods." 2014-05-12 21:39:30 +00:00
Greg Hackmann
1b8191186e update struct-offset.cpp test for gralloc API 0.3
Change-Id: I6509ea0fda3a3d9b4aea83c5342a491993dc9c26
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-05-12 13:49:42 -07:00
Stewart Miles
748c94b581 Merge "Added a compile time option to enable / disable verbose submix logging." 2014-05-12 19:44:21 +00:00
Stewart Miles
84d35492b1 Described restrictions for common HAL object methods.
Inheritance of HAL object is performed by composing a child structure of a
single parent structure located at offset 0 followed by new data members
and function pointers in the child structure.

For example,

struct child {
  struct parent common;
  int a_data_member;
  void (*a_method)(struct child *c, int v);
};

HAL code assumes this layout when accessing child structures given a pointer
to a parent structure such that users write code like the following...

void child_method(struct *parent, int v) {
  struct child * c = (struct child*)parent;
  // do stuff with c
}

Code above will break if a member is added before "common" in "struct child".

This change adds comments that describe the restriction on the location of
parent HAL objects within a derived HAL object.  HAL objects that already
have comments that describe the required location of parent objects are not
modified.

Change-Id: Ibe4300275286ef275b2097534c84f1029d761d87
2014-05-12 12:35:37 -07:00
Stewart Miles
c049a0a3a9 Added a compile time option to enable / disable verbose submix logging.
Along with the following minor changes:
* Fixed all referenced variable compiler warnings.
* Ordered headers in alphabetical order.

Change-Id: I122ef67d25b78056a60b85baf897005293a9efa0
2014-05-12 12:11:20 -07:00
Greg Hackmann
42a7557fe2 am 7c05b1d8: am 6f91ded5: am c63ec07b: Merge "gralloc: Add asynchronous lock/unlock API"
* commit '7c05b1d8f9e01ac4b169533b502e1b9a35f4aeb9':
  gralloc: Add asynchronous lock/unlock API
2014-05-12 18:18:46 +00:00
Greg Hackmann
7c05b1d8f9 am 6f91ded5: am c63ec07b: Merge "gralloc: Add asynchronous lock/unlock API"
* commit '6f91ded57bf133fbf572cde2f5623bb8289f7eaa':
  gralloc: Add asynchronous lock/unlock API
2014-05-12 18:12:33 +00:00
Greg Hackmann
6f91ded57b am c63ec07b: Merge "gralloc: Add asynchronous lock/unlock API"
* commit 'c63ec07b3ca11de8e0321a0875119427bb0bad86':
  gralloc: Add asynchronous lock/unlock API
2014-05-12 18:08:12 +00:00
Greg Hackmann
c63ec07b3c Merge "gralloc: Add asynchronous lock/unlock API" 2014-05-12 18:01:56 +00:00
Francis Hart
2e49f9acbb gralloc: Add asynchronous lock/unlock API
The existing API exposed to clients for software lock/unlock forces the gralloc
implementation to complete these operations synchronously. This change adds new
entry points for lock/unlock functionality that is suited for use with Android's
explicit synchronisation concept. This provides scope for the gralloc module
to internally optimise the work it must do for lock/unlock and to hide this cost
from the client.

Change-Id: If4b1bb5490ab2b20d796214a7da8a96427cfe52d
2014-05-12 09:13:35 -07:00
Greg Hackmann
5d237c6430 am b283598b: am 06c19bd0: am 2d91d000: Merge "Revert "gralloc: Add asynchronous lock/unlock API""
* commit 'b283598bad4ce833b4f19f9526b9f4dc75d9d245':
  Revert "gralloc: Add asynchronous lock/unlock API"
2014-05-09 22:00:04 +00:00
Greg Hackmann
131c35004e am 62cff27d: am 5a1ca138: am e79f167e: Merge "gralloc: Add asynchronous lock/unlock API"
* commit '62cff27d48eada351ea952e5b960ab2f2c15b1d3':
  gralloc: Add asynchronous lock/unlock API
2014-05-09 21:54:48 +00:00
Greg Hackmann
b283598bad am 06c19bd0: am 2d91d000: Merge "Revert "gralloc: Add asynchronous lock/unlock API""
* commit '06c19bd047d63adcf99094f6f0dd17b58150bba6':
  Revert "gralloc: Add asynchronous lock/unlock API"
2014-05-09 21:51:51 +00:00
Greg Hackmann
06c19bd047 am 2d91d000: Merge "Revert "gralloc: Add asynchronous lock/unlock API""
* commit '2d91d000bce3db23ac51888d109c9f29272ea96a':
  Revert "gralloc: Add asynchronous lock/unlock API"
2014-05-09 21:46:45 +00:00
Greg Hackmann
2d91d000bc Merge "Revert "gralloc: Add asynchronous lock/unlock API"" 2014-05-09 21:39:10 +00:00
Greg Hackmann
fd9dc63027 Revert "gralloc: Add asynchronous lock/unlock API"
This reverts commit 2861789f4f.

Change-Id: I334b8ca9b9fdef510df514c18aabb6a593dfaa75
2014-05-09 21:36:14 +00:00
Greg Hackmann
62cff27d48 am 5a1ca138: am e79f167e: Merge "gralloc: Add asynchronous lock/unlock API"
* commit '5a1ca138be2e45284a3a5ad33977ee774a57a56d':
  gralloc: Add asynchronous lock/unlock API
2014-05-09 21:13:17 +00:00
Greg Hackmann
5a1ca138be am e79f167e: Merge "gralloc: Add asynchronous lock/unlock API"
* commit 'e79f167e4a997b92d2da8e14a8a78c557503b48a':
  gralloc: Add asynchronous lock/unlock API
2014-05-09 21:08:39 +00:00
Greg Hackmann
e79f167e4a Merge "gralloc: Add asynchronous lock/unlock API" 2014-05-09 21:02:07 +00:00
Matthew Xie
4c847f2b79 Merge "LE: Add controller based advertising filter API (1/2)" 2014-05-07 05:47:54 +00:00
Matthew Xie
b8fd4eedca Merge "Add transport param to Connect APIs" 2014-05-07 05:47:38 +00:00