Commit graph

29 commits

Author SHA1 Message Date
Glenn Kasten
45b9581fc9 audio_is_valid_format is true for all PCM formats
Change-Id: I733f3208315816575f6d4f7722e906ab50b161af
2014-03-07 12:32:14 -08:00
Andy Hung
173f4995b0 Update audio_bytes_per_sample for PCM 24 bit packed
Change-Id: Ic79f604893f5c4f2e8e35189d6638b5b160435ed
Signed-off-by: Andy Hung <hunga@google.com>
2014-03-07 18:20:15 +00:00
Lajos Molnar
3a436c1c3c Merge "Adding opus to list of audio formats" 2014-03-03 19:45:49 +00:00
Glenn Kasten
c0a51093a2 Add 24-bit packed to audio_format_t
Change-Id: I08c38ee3ade7b24dc9e2b3ed2b7037c42521a555
2014-01-31 07:51:17 -08:00
Vignesh Venkatasubramanian
76edb1c0e6 Adding opus to list of audio formats
Adding opus to the list of audio formats enum.

This CL is part of adding Opus decoding support to android.

Change-Id: I41decf426ed3f76c10b27f247b1264010689c759
2014-01-29 10:11:39 -08:00
Glenn Kasten
1c3e16fb40 Miscellaneous updates to <system/audio.h>
Add single-precision floating-point PCM format:
    - AUDIO_FORMAT_PCM_SUB_FLOAT
    - AUDIO_FORMAT_PCM_FLOAT

Add symbols to replace hard-coded constants in code:
    - AUDIO_IO_HANDLE_NONE
    - AUDIO_IN_ACOUSTICS_NONE
    - AUDIO_INTERLEAVE_*
    - AUDIO_STREAM_MIN

Update comments.

Fix whitespace in switch statement.

Change-Id: I61862c188ebac06657b5d9887164edc24b8ab8f5
2014-01-15 14:11:27 -08:00
Glenn Kasten
b4f2b4eac4 Add AUDIO_SESSION_ALLOCATE
Change-Id: I045f2f04520bc474666c43a0ff1568f0fab3567c
2014-01-14 16:14:18 -08:00
Eric Laurent
04c12ca061 Add HOTWORD audio source to audio.h
- This is a complimentary change to the one adding this new source to
  MediaRecorder.java

Bug: 10640877.

Change-Id: Ie213e82b5a60dad2a277cef367c2f5e4df70df06
2013-09-09 15:42:31 -07:00
Jeff Brown
8ecc7afca4 Add helpers for audio remote submix devices.
Bug: 10265163
Change-Id: Iea7ecab4f2a655b719ff14b04c757d6dbd7a7ef3
2013-08-16 20:21:10 -07:00
Glenn Kasten
c051ffd7c2 Add audio_input_flags_t
Change-Id: Ie65398cc67218cc63be4baa8a2a61d0ea591a2a3
2013-08-02 10:30:42 -07:00
Glenn Kasten
f7326dc0aa Valid channel mask must have at least one channel
Also:
 - Use correct type name audio_channel_mask_t
 - Use the parameter name 'channelMask' instead of the more ambiguous 'channels'

Change-Id: I22bc1821a1bded0e69fe7d99e7b981ff60d77cee
2013-07-23 16:47:17 -07:00
Richard Fitzgerald
05529a1a10 Add defines for audio offload and non-blocking write
- Defines audio output flags for offloaded playback of compressed
    streams, and non-blocking HAL write()/drain()
- Adds audio_offload_info_t to pass additional information about a
    compressed stream when offloading

Change-Id: I4592d0877edd39e68d0c1035d0652adbd397bf3a
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
2013-06-27 17:16:25 -07:00
Eric Laurent
6c70ceeefe audio: added input device for front + back mic
Added a value to audio_channel_mask_t enum for front + back mic
combination to allow parsing of audio_policy.conf file by audio
policy manager.

Change-Id: I8412b4d3cfc03323eff867563a1a73322019c0f3
2013-01-22 17:09:30 -08:00
Eric Laurent
eeeee802e9 audio: new audio devices enum values
Each audio device is identified by a bit in a 32 bit field with
16 bits for output devices and 16 bits for input devices.
The number of output devices is now exhausted.
In order to add new devices a new convention for audio device
identification is defined, allowing 31 different input and output
devices: Bit 31 of the bit field is reserved and when set indicates
an input device.

Also added new output device for wifi display and new input devices
for digital and analog docks, USB and wifi display send.

Change-Id: I849bec0b6d46e082e325a3f08890d313c8dc763b
2012-09-07 10:37:43 -07:00
Jean-Michel Trivi
e11866a879 Device and mode definitions for remote submix
A remote submix is an audio mix of audio streams that
 are not going to be played directly through the platform mix,
 but rather will be mixed together to be handled in a
 different manner. This mix can be obtained by recording
 it through the AUDIO_IN_REMOTE_SUBMIX and presenting it
 remotely (as opposed to local playback == on the device
 itself).

All changes marked "temporary" will be overriden by the
 changes to update the audio device definitions for
 the 2.0 API.

Change-Id: I9c6da607fc50b7b8545d189ac5b083107369cfb5
2012-09-06 15:08:17 -07:00
Glenn Kasten
16a7a0443a Declare audio_devices_t as uint32_t & enum consts
Declare audio_devices_t as uint32_t to permit bit operations,
and a separate anonymous enum for the constants.  This is similar to
audio_channel_mask_t.

Also remove spurious "typedef" on declaration of anonymous enum for
channel mask constants.

Change-Id: Ib4f92e9168261d44a475b3d48fe211e5c70ed441
2012-07-03 16:51:05 -07:00
Eric Laurent
9aec362e76 audio policy: add deep audio buffering flag.
Add a value in audio policy flags to indicate an output
stream providing deep audio PCM buffers. Such an output
helps reducing the power consumption at the expense of audio latency.

Stagefright will indicate a preference for such an output when playing music
only (no video) and the audio duration is more than a given threshold.

Change-Id: I0e6a9f5746a22d2bfea2b21dd182489a34a4b528
2012-04-19 17:57:34 -07:00
Eric Laurent
545ab46063 audio: added definitions for audio HAL device API.
Added definitions for output flags needed by new audio
HAL device API.

These flags where previously defined in audio_policy.h.
Definition in audio_policy.h remains temporarily until
all projects are changed to use new flags.

Change-Id: I371558c78050daae73942a36f51854372ab71068
2012-04-17 16:02:31 -07:00
Eric Laurent
79f90bdc7d audio: added definitions for usb audio devices
Change-Id: I4a4f5919708a09f87974367961b1d09664ae6c06
2012-04-06 14:03:09 -07:00
Glenn Kasten
b1108c8594 Merge "audio_channel_in/out_mask_from_count" 2012-03-19 07:31:50 -07:00
Jean-Michel Trivi
427d2b43c2 Fix switch indentation in audio_bytes_per_sample
Align "case" keyword with "switch" keyword.

Change-Id: I57ef96253fb1fc925315b557ea27ccc35f63c2f8
2012-03-15 10:18:42 -07:00
Glenn Kasten
89f7ba3df8 audio_channel_in/out_mask_from_count
Change-Id: I879d188cf64ea1dbfa1a0574dee77119c2b08e26
2012-03-14 17:06:13 -07:00
Jean-Michel Trivi
4ab051ab46 Add function to derive a channel mask from a channel count
Change-Id: I22523ded9cd8e5283a285a9db21d819bbbc1b6c3
2012-03-05 13:59:09 -08:00
Glenn Kasten
828bf0cdf4 Use audio_format_t consistently
Change-Id: I7eb489b1c1cbe9bfadd43cd7645da86b90fab652
2012-01-12 13:20:35 -08:00
Jean-Michel Trivi
6d4f39754b Fix bug 4319552 Use commonly defined channel mask values in native
The native channel mask values are equal to the Java values, which
 differ from other standards simply for legacy reasons. It is
 preferrable to use commonly used values, and translate from the
 Java constants to the common values when specifying a Java mask.
The new definitions uses the same values and ordering as in
 OpenSL ES and other standards.

Change-Id: I879f64b281714c60684cd8b36fe6ae648a555121
2011-07-25 17:02:11 -07:00
Jean-Michel Trivi
33fad99acf Fix bug 4211099 channel constants and 7.1 mask
Add definitions for the side and elevated channels.

Ccorrect definition of 7.1 mask which uses
 the side channels rather than the front half-pan channels.

Change-Id: I5b6f601f6404d782dc46ef47efac9cc8441fef90
2011-07-24 16:31:03 -07:00
Eric Laurent
da38224875 Fixed some audio helper functions
Make sure audio_is_valid_format() is true only
for formats supported by AudioTrack and AudioRecord.
Generalized audio_is_linear_pcm().
Added audio_bytes_per_sample() function.

Change-Id: If588af6c08f09796ab04bccbbd6e720f1e914412
2011-06-16 21:13:43 -07:00
Eric Laurent
9714b27bb4 Added PCM formats to audio.h
Added formats for 32 bit PCM audio to allow direct use of
common audio formats defined in audio.h by audio effect
API defined in audio_effect.h

Change-Id: I5d58c2db8325ca625ab6d2b10cc0d422ba119ca5
2011-05-26 13:52:47 -07:00
Dima Zavin
e8e4be57aa move core audio definitions under system/core
Change-Id: I58b7324edff834b3afa4d9c86452e66f8c29c63b
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 11:58:48 -07:00