Commit graph

33 commits

Author SHA1 Message Date
Mikhail Naganov
ac5012a193 Audio HAL: extensions for new SoC features
Extend audio channel mask.

Added AC4 format.

Change-Id: I8d365d60127eeea2939fcf6094c5306fa36ab648
Test: make
2017-01-26 17:54:04 -08:00
TreeHugger Robot
4a6bc70009 Merge "update audio common generated vts file" 2016-12-29 22:32:03 +00:00
Yuexi Ma
474b61e5fc update audio common generated vts file
Test: mma

Change-Id: I983cdd883c284d20af95390b38a98541fb6f943b
2016-12-29 20:45:10 +00:00
Jean-Michel Trivi
71280e50b3 Define AUDIO_USAGE_ASSISTANT in list of audio attributes usage
Used hardware/interfaces/update-base-files.sh to update
   file system/media/audio/include/system/audio-base.h

Test: make
Bug: 30947943

Change-Id: Id1f6971a1e40ab963c19f42a95516e6d8a26fc60
2016-12-29 12:11:58 -08:00
Mikhail Naganov
fcbb5d2213 Merge "Fix offload tracks playback" 2016-12-19 16:59:00 +00:00
Mikhail Naganov
685f0e36a1 Fix offload tracks playback
Translation between audio_offload_info_t and AudioOffloadInfo
was missing a field. This was causing compressed tracks to play
using 'deep_buffer' mode instead of 'offload'.

Changing output stream async callback methods to 'oneway',
since they don't require anything from the callee.

Change-Id: I27fe7fb715e421f102db21a10d34e1dc3134cf01
Test: play MP3 file with Play Music, check audioflinger dump
2016-12-16 17:18:08 -08:00
Eric Laurent
d5c2cef024 Merge "audio HAL: add definitions for MMAP stream mode" 2016-12-15 17:26:06 +00:00
Eric Laurent
e1333d8604 audio HAL: add definitions for MMAP stream mode
Bug: 33398120
Test: make marlin-eng with ENABLE_TREBLE

Change-Id: I288005055bee9268bb1eff481e410aad0bfcfdd1
2016-12-14 15:50:44 -08:00
Yifan Hong
f35ee3b192 Revert "Revert "Update makefiles for Java package path.""
This reverts commit a8789f27cb.

Change-Id: I69980b580a556188ba868bb096ae1590b01759f5
2016-12-13 22:20:16 +00:00
Yifan Hong
a8789f27cb Revert "Update makefiles for Java package path."
This reverts commit ab0792ccdc.

Change-Id: I47fc272d9fa8875e3d7ccb10cb748c738fbf8135
2016-12-13 22:18:34 +00:00
Yifan Hong
ab0792ccdc Update makefiles for Java package path.
use V1_0 instead of 1.0.

Bug: 33554192

Test: hidl_test_java
Change-Id: Ic2d95265df10914a60a5bb743d75e839948838c3
2016-12-13 11:32:56 -08:00
Mikhail Naganov
c29205662a Audio HAL: extensions for new SoC features
Extended audio offload structure: added support to add bit_width,
offload buffer size and usage info.

Add support for direct PCM audio stream. Direct PCM stream
is used when pcm data required post processing in DSP. Direct PCM
stream is used for both track offload and PCM offload.

Add audio proxy source device.

Add support for additional audio formats: EVRC, QCELP, WMA, WMA,
AAC_ADIF, AMR, MP2, FLAC, ALAC, APE, DSD, LDAC.

Extend audio channel mask.

Test: make
Change-Id: I02d2f1fff6fa467688c1bad158ae18b5fa8c0f5b
2016-12-06 09:57:35 -08:00
Yifan Hong
501839495f Update makefiles for hidlizing IBase.
A new dependency android.hidl.base@1.0 is added for
all projects.

Test: mma

Change-Id: Ia70d0eb0d74de06475a339698386d383d491a43a
2016-12-03 01:01:14 -08:00
Mikhail Naganov
a9a58c150d Merge "Audio HAL: fixes for issues discovered after client conversion" 2016-12-02 00:06:16 +00:00
Mikhail Naganov
6e81e9bb3c Audio HAL: fixes for issues discovered after client conversion
Several issues addressed:

  -- added IDevice.supportsAudioPatches to query whether
     create/removeAudioPatch is actually supported by HAL;

  -- IStreamOutCallback proxy needs to be owned by IStreamOut
     implementation. In order for the client to reset the reference,
     added method IStreamOut.clearCallback;

  -- IDevice.open{Input|Output}Stream need to return a "suggested" audio
     config from HAL;

  -- code for converting between system/audio.h and HIDL
     data structures has been moved to
     android.hardware.audio.common@2.0-util library for reuse;

  -- added a workaround for the issue with QC effects HAL trying to write
     into the input parameters buffer, which is r/o by Binder design.

Bug: 30222631
Change-Id: I64af24d79c12d6ac3b0f87d085a821913e29237b
Test: tried using with WIP HIDL client on N5X
2016-12-01 13:48:58 -08:00
Steven Moreland
d26dc50abb Always specify underlying enum type.
Bug: 33197891
Test: compiles
Change-Id: I3d4822ea9a665708302d3bd1460425fddf1dcda9
2016-11-29 14:22:10 -08:00
Steven Moreland
bbff14d4bb Merge "Update makefiles for logging." 2016-11-22 17:25:36 +00:00
Steven Moreland
f8d68ec855 Update makefiles for logging.
Bug: 32943424
Test: pass
Change-Id: Ic88ce6adf04e0e36db53e4cc06ac2ec5a90c011c
2016-11-21 16:28:54 -08:00
Keun Soo Yim
9ea2824097 add Android.mk to audio/common for audio/common/2.0/Android.mk
Test: mma
Change-Id: I503406aee87a3401e58343921746cd376f76af24
2016-11-19 04:57:31 +00:00
Yifan Hong
6b920e43d3 Split libhidl into base and transport.
Bug: 32756130

Test: mma
Change-Id: Id21cf23abe2910f26bb7895511862443b93dc112
2016-11-18 00:00:54 -08:00
Mikhail Naganov
1054829502 Implement audio devices and streams HAL delegating to legacy HAL
Changes made to the .hal definition:

  - introduce Effect ID returned by the IEffectsFactory that
    needs to be passed to IStream.{add|remove}Effect; otherwise
    it's impossible to retrieve the underlying HAL effect handle;

  - change "bus address" in DeviceAddress to "string" type;

  - fix signature of some methods w.r.t. returning Result;

  - remove unused "struct AudioPatch".

Bug: 30222631
Test: make
Change-Id: Icb51729ef57bb2a5b0b78609735e7481bc04f95c
2016-11-15 08:52:39 -08:00
Yifan Hong
c33bb7455b Update overflowed values for audio.common@2.0::types.
Test: not tested. Manually inspect the generated file.

Bug: 32741002
Change-Id: Id6d3681ecb30298c3a0198d852ad3f56f83071c1
2016-11-09 10:42:28 -08:00
Keun Soo Yim
04e3b482c1 add vts file for audio common
which is needed by a tv hal for example.

Test: mma
Bug: 32640245
Change-Id: Ie490fe811f2ee37d3d7943083d2afa1911e40906
2016-11-07 15:10:48 -08:00
Colin Cross
b785f5b82e Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.

Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
2016-11-04 22:49:15 -07:00
Steven Moreland
fcd74ebcdc Running update makefiles.
https://android-review.googlesource.com/#/c/298160/

Test: pass
Change-Id: I14fcde2d3aacc8f8cd9221f2d69e2feae9ae1226
2016-11-02 10:24:33 -07:00
Steven Moreland
69727778a7 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:04:37 +02:00
Mikhail Naganov
c115895154 Remove redundant prefixes from enums in audio common types and effects HAL
Since in generated C++ code class enums are used, the names of enum
values are scoped anyway, thus carrying the prefix only clutters
code.

For C enums, newly introduced "value_prefix" annotation is used
to add the required prefix.

Added annotations for effects HAL types are just informational,
but can be used would C headers generation ever be required.

Also:

  - renamed AudioInputFlags -> AudioInputFlag for consistency;

  - moved AUDIO_INTERLEAVE_... constants into their own enum.

Bug: 31800672
Change-Id: I5b325f3440e0057ca98c4617040c7e5a89d2283d
Test: make
2016-10-11 08:54:01 -07:00
Eric Laurent
4d2f157ffc Merge "audio hal: add exports to audio-base.h" 2016-10-07 21:13:22 +00:00
Eric Laurent
8b194934f8 audio hal: add exports to audio-base.h
Fixes build errors with double definitions of
some constants here and in audio.h

Change-Id: I1569b86216c6502a20ff6f39a991cd6087be8a23
2016-10-07 12:13:46 -07:00
Steven Moreland
c2962f7c1f Ran update-makefiles.sh.
Audio common and vibrator hals were not in the build system.

Test: hardware/interfaces mma -j64
Change-Id: I9faa3f4692e8778cab7864c94725198c015352a8
2016-10-07 08:23:59 -07:00
Andreas Huber
8d34eec6b2 Annotated android.hardware.audio.common@2.0 package to prepare for automated
extraction of constants into utility header.

Bug: 31800672
Change-Id: If261127a0108536a95ef7f94cca27a313aa21ace
Test: make
2016-10-05 16:24:15 -07:00
Mikhail Naganov
cb700ec199 Remove provisional types from common audio definitions
The following types are not used in HAL and being removed:
 - AudioContentType;
 - AudioUsage;
 - AudioFlagsMask;
 - AudioAttributes.

This is in order to reduce synchronization burden and also
allow extending framework without updating HAL.

Bug: 30222631
Change-Id: Ic5df1800224fd1506dcf624b0cd20f9fd36cb949
Test: make
2016-10-05 13:08:59 -07:00
Mikhail Naganov
f0a5a94fad Add common types for audio
These types are migrated from system/audio.h. The order and syntax
of declarations is preserved where available. The following
changes have been made:

 - names changed to satisfy HAL style guide;

 - some previously separate enums grouped into one to allow
   using values between them (HIDL doesn't allow using values
   of one enum in another, and even if it would, that will
   probably be incompatible with C++11 enum classes it generates;

 - as HIDL doesn't have sizeof, these were substituted with values;

 - unions can't contain HIDL string type, thus some names are
   expressed as uint8_t arrays;

 - "handle" is a reserved word in HIDL;

 - HIDL vector type is used instead of count / array pairs;

 - obviously, macros and inline functions not migrated.

Bug: 30222631
Test: make
Change-Id: If55de3774deaa0b3f68ca6100e61ccaf79f29183
2016-09-30 14:42:16 -07:00