Commit graph

55 commits

Author SHA1 Message Date
Eric Laurent
f6cce347a7 audio: add HW hotword capture flag
Bug: 17575019.
Change-Id: I12c0a2e0200f3d839dfd74650724391e54ac3534
2014-09-19 17:45:18 -07:00
Jon Eklund
fcfa86403e audio.h: Add "safe speaker" device for limited-loudness use cases
Bug: 17319721
Change-Id: Ie1af5b73258f8a0009c3bc3cecb3e0e8b2262ed7
2014-09-10 15:51:48 -07:00
Eric Laurent
d91e6df901 audio: add defines for audio HW sync source
Bug: 16132368.
Change-Id: I4008c315f2cba9c6027998be92f4af649359bcce
2014-08-05 15:02:57 -07:00
Eric Laurent
1e92ed5e83 audio: define type for unique audio Ids.
Define a type for unique audio Ids allocated by AudioFLinger
for use as session Ids or I/O handles.

Bug: 12378680.
Change-Id: Ic9019fff97a1227b60e48c88c57d25dbbdcd7d1e
2014-07-28 14:31:58 -07:00
Eric Laurent
a768c306b2 audio: add audio device address helper function
Add helper function to derive set_parameter command
string from device type and address.

14815883

Change-Id: Icf47218f1809f567ef93bdd99d6308475886b298
2014-07-28 19:24:50 +00:00
Eric Laurent
0a381a379d audio: move struct audio_config definition to audio.h
struct audio_config definition moved from hardware/audio.h to
system/audio.h for use inside the framework and not only at the HAL.

Added frame_count field to struct audio_config.

Bug: 14815883.

Change-Id: Ib0e99a60234b8e5302eb882b89e5a021a94ec2cb
2014-07-28 19:18:39 +00:00
Jean-Michel Trivi
c3dbe121be Define new audio attribute flag: beacon
Flag AUDIO_FLAG_BEACON characterizes streams where the system
  ensures that the playback of the sound will be compatible
  with its use as a broadcast for surrounding people
  and/or devices. Ensures audibility with no or minimal
  post-processing applied.

Bug 15415971

Change-Id: I1df9dc50e3fcc973a0709a55df5b3bd95f81eb58
2014-07-27 14:09:00 -07:00
Jungshik Jang
cadd5bb70e Add force usage and config type for HDMI-CEC system audio mode.
New Usage Type: AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO
New Config Type: AUDIO_POLICY_FORCE_HDMI_SYSTEM_AUDIO_ENFORCED
When HDMI-CEC system audio mode is enabled, AudioService will
call
 setForceUse(AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO,
          AUDIO_POLICY_FORCE_HDMI_SYSTEM_AUDIO_ENFORCED);
in order to notify enabled system audio mode, so that
audio policy manager chooses proper output.
When it turns into off, AudioService will call
 setForceUse(AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO,
          AUDIO_POLICY_FORCE_NONE);

Along with it, add new audio output devic type,
AUDIO_DEVICE_OUT_AUX_LINE, in order to distinguish
line out for headphone and aux output of av device.

Bug: 16305986
Bug: 16002150
Change-Id: Idecdf626737f6635ea3cda638c343260b1661c77
2014-07-16 09:21:04 +09:00
Glenn Kasten
432b7c6da2 Representation of channel masks for position assignment and index assignment
Bug: 16245854
Change-Id: I76c7c39c7d4f8d5035016653aa91fa7c1e749bbd
2014-07-12 13:23:57 +00:00
aarti jadhav-gaikwad
923e740879 audio: add definitions for aac sub formats
add definitions for aac sub formats

Change-Id: I610caa510dfc7347f7c98e19359545423edd76b3
2014-07-11 18:26:00 +00:00
Jungshik Jang
f7e5aeadb7 Fix size of "values" fields of audio_gain_config.
It should be sizeof(audio_channel_mask_t) * 8 not
sizeof(audio_channel_mask_t) alone.

Change-Id: I3523dd4d44a0900ba1845b3675a22451f1fc2f3c
2014-07-11 03:37:42 +00:00
Terry Heo
b63dd8a005 audio: add definition for new audio loopback input device
Bug: 15437484
Change-Id: I62da0596d405c3bb5e00b461f7d4fd11627ed391
2014-07-08 14:52:51 +00:00
Eric Laurent
ce30de3553 audio: added new audio formats.
Bug: 9428304.

Change-Id: Ife1f6968a8d079b477b5afb5e5cf544e8fe3298f
2014-06-19 09:55:54 -07:00
Jean-Michel Trivi
0d580e83dd Define audio attributes type in system audio header
Change-Id: Iac2030a1e4a6827676e6c5f9b408f1e768207f00
2014-06-03 15:47:17 +00:00
Mike Lockwood
c8183af4b3 audio: Add AUDIO_DEVICE_IN_BLUETOOTH_A2DP
Change-Id: I32770abd42702d99f409f0968326041e78d1a826
2014-05-28 13:47:25 -07:00
Mark Salyzyn
881c89c54a am 7aa8cdfb: am 21157abc: am 8814bd1d: Merge "include: cleanup for -Wsystem-header"
* commit '7aa8cdfb317dcb7efb7127b070526df09da05377':
  include: cleanup for -Wsystem-header
2014-05-23 22:33:41 +00:00
Mark Salyzyn
4887842c92 include: cleanup for -Wsystem-header
- warnings as errors, or errors introduced when -Wsystem-header
  was experimentally introduced.

Change-Id: Ia8f5b3c1c1096e191741223d52526aa48c7f1cc4
2014-05-23 15:09:57 -07:00
Eric Laurent
4cd050121f audio: added definitions for audio routing extensions
Added definitons and structures for new audio routing features
in the framework and audio HAL.
The structures describe the objects needed to perform audio
routing and audio gain control: different variants of audio ports
and their corresponding configurations as well as gain controllers.

Change-Id: Iecd1b9186831067a52cc55619a63b7bba57dcbd9
2014-05-21 17:38:33 -07:00
Eric Laurent
abcb99927d audio: add definitions for new audio devices
Change-Id: I7bbc564a81fd693fa7e6bcb3a817986b50568147
2014-05-20 01:05:01 +00:00
Andy Hung
a7e8f8615d Add channel count functions for audio masks
audio_channel_count_from_in_mask
audio_channel_count_from_out_mask

Change-Id: Ic519f2c3f85d14acb9526cc8812360fcbd15346d
Signed-off-by: Andy Hung <hunga@google.com>
2014-05-16 23:11:13 +00:00
Glenn Kasten
fbb9f993a0 Remove AUDIO_CHANNEL_OUT_SURROUND
Change-Id: Id163902dd2c83200201012ffb704d338e81ea471
2014-04-29 09:05:11 -07:00
Glenn Kasten
ee7c17b7fc Add AUDIO_CHANNEL_OUT_5POINT1_SIDE and AUDIO_CHANNEL_OUT_QUAD_SIDE
for use by downmix effect

Also add documentation about platform convention for interleaving.

Change-Id: I44f837e876c6e8f5f70a726d797631ffa556cf9f
2014-04-29 08:58:34 -07:00
Glenn Kasten
b8d59396df Rename AUDIO_CHANNEL_OUT_QUAD and AUDIO_CHANNEL_OUT_5POINT1
to AUDIO_CHANNEL_OUT_QUAD_BACK and AUDIO_CHANNEL_OUT_5POINT1_BACK
respectively, for consistency with terminology used in downmix effect

For the time being, preserve the old names to avoid changing existing code.

Change-Id: I11131e3f66087090a590c93921092ca4fc78cf1c
2014-04-29 08:43:56 -07:00
Rom Lemarchand
aba03c0b7a am d2674cba: am 0a04c556: am 19759a08: Merge "audio: fix audio_is_bluetooth_sco_device()"
* commit 'd2674cbad9dac54ae23d1bbcdf137d75d582258f':
  audio: fix audio_is_bluetooth_sco_device()
2014-04-24 22:25:03 +00:00
Eric Laurent
b526630ab8 audio: fix audio_is_bluetooth_sco_device()
Bug: 14268964
Change-Id: Ia2a185c5e0939930c5114209651a1e0db6c36ef3
2014-04-24 22:03:00 +00:00
Paul McLean
00b8972062 Usb Capture Implementation
Change-Id: I0b5166cc380419455373d590b9a6c4b21bf6634c
2014-04-23 20:55:57 +00:00
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