Commit graph

22 commits

Author SHA1 Message Date
Tomasz Wasilczyk
2c3e53e5dd Use String8/16 c_str
Bug: 295394788
Test: make checkbuild
Change-Id: If5cf93ade13d6e650ae305db9933a9f536e3b525
2023-08-11 18:11:12 +00:00
Mikhail Naganov
afea6a410f Convert mask types from uint32_t to enum type
This applies to the following types:

- audio_gain_mode_t;
- audio_flags_mask_t;
- audio_channel_representation_t;
- audio_channel_mask_t;
- audio_devices_t.

Enum types are distinct thus proper overloading on the type
is possible in C++. Also, assignments to enum types are
less prone to errors.

Bug: 169889714
Test: basic audio functionality
Change-Id: I6366511b421ccab2782310ecc15a13e08d9c17af
2020-10-08 17:25:28 +00:00
Dan Albert
f2d9ad053a Make libhardware_legacy warning clean.
Fix some (note the fun infinite recursion bug from the dawn of time,
apparently no one has called that function), silence those that are
style choices.

Bug: http://b/26936282
Change-Id: I99fa342abf9d134fb729ed8d906e60c011120e89
2016-02-02 14:49:35 -08:00
Eric Laurent
a311a983eb audio HAL: add parameters to open stream functions
Pass device address (and audio source for inputs) to
open_output_stream() and open_input_stream() audio HAL functions.

Bug: 14815883.
Change-Id: Ib1c3e98518733fa5eab54cbca4220e388d3f6211
2014-07-27 17:30:34 -07:00
Glenn Kasten
044bac40a1 Add audio_input_flags_t to HAL open_input_stream
Change-Id: I17db01e92bfa939c7a15e7f9f95197d0a0568033
2014-07-17 07:29:12 -07:00
Eric Laurent
40508f66ca audio: fixed channel count determination from channel mask
Do not use popcount() to derive channel count from channel mask.

Bug: 15000850.
Change-Id: I5050ce7fd7884369eb0de37967e40052630006a9
2014-07-01 20:33:36 -07:00
David Wagner
cc029e59f7 Audio: add an openOutputStreamWithFlags API
The existing openOutputStream API did not allow passing stream flags even
though its audio hardware interface's open_output_stream counterpart does take
a "flags" argument.  This means that, when the audio hw_module is implemented
using libhardware_legacy, the output flag was lost.

This commit adds an API in libhardware_legacy's audio module, allowing to pass
the flag, and updates the default wrapper in order to call this new API instead
of the old version that missed the flag.

Change-Id: I20c102d32b489f87fabbd7d02aa0b28fae13948b
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2014-04-23 14:42:21 +02:00
Eric Laurent
ed8f62d4fa audio: new audio devices enums
Changes for new audio devices enums:
- legacy audio HAL wrapper provides conversion between new and
old device enums. It exposes a rev 2.0 audio device API to the
audio framework and allow legacy implementation to use old device enums.
- AudioPolicyManager: use standard enum value for no device (0).

Change-Id: I855d72291d672cdd8a6641bedb228634a54b7d9d
2012-09-07 10:34:46 -07:00
Glenn Kasten
551b6a3b5c Use audio_channel_mask_t consistently
Change-Id: I0a274ab9f30a9380bc00eae69988224721fea177
2012-06-19 12:29:39 -07:00
Eric Laurent
0fa154b8d4 audio: update to new audio HAL device API.
Change-Id: I27c5e1e1041f62530884ec5d929e7d82f091912a
2012-04-16 19:05:21 -07:00
Mike Lockwood
584c285492 Merge commit '5b71e6f'
Add an implementation of get_next_write_timestamp.

Change-Id: Ie8e19307bafdb057d06bf3c536380c5740f830a6
2012-03-21 17:44:01 -07:00
Mike Lockwood
0b934ade25 Merge commit '617c80a'
Add a bridge implementation of get_master_volume.

Conflicts:
	audio/audio_hw_hal.cpp

Change-Id: Icff9d8dce05d1d811fca815cc39cb38a1df293f9
2012-03-21 17:42:25 -07:00
Glenn Kasten
c97d4bb2bd Merge "Use audio_format_t consistently" 2012-01-20 14:50:30 -08:00
Glenn Kasten
53e2cfab45 Use audio_format_t consistently
Was int

Change-Id: I8cc1beaa8006fb0a135cf1135955155090c8e87e
2012-01-12 15:01:42 -08:00
Glenn Kasten
5c1ebdc9db Use audio_mode_t consistently
Change-Id: I62e23b81e3a411a0d9f012b363373d938827a2e4
2012-01-12 10:49:45 -08:00
Steve Block
5efbd421e0 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Idfcd2f2269080d92a621dc432c65f7cf244588af
2012-01-08 10:18:02 +00:00
John Grossman
5b71e6fd76 Add an implementation of get_next_write_timestamp.
Add a default implementation of get_next_write_timestamp to the C <--> C++
legacy audio HAL implementation allowing HALs using the legacy C++
AudioStreamOut to overload and implement get_next_write_timestamp.  Default
implementation returns INVALID_OPERATION to indicate that the functionality is
not supported.

Change-Id: I087347649e9ba186a74cb34aaadf989bf90720fe
2011-10-27 17:35:47 -04:00
John Grossman
617c80a82e Add a bridge implementation of get_master_volume.
Add an implementation of the new get_master_volume method to bridge from the new
C only audio HAL to the old C++ legacy audio HAL.

Change-Id: I5c29814623b5141b0c69927ea60be9873c8a5dab
2011-10-27 17:35:43 -04:00
Eric Laurent
2d97c20601 Audio HAL: added interface for audio preprocessing
Change-Id: I0a84ddbff53f13662873f69d9be4dfa13ebcb8fe
2011-07-11 12:01:13 -07:00
Dima Zavin
d17f66f332 audio: update for audio/audio_policy header names/locations
Change-Id: I7a414a2e173c2bfd72ae70d57b251fa0d4dbdfa0
Signed-off-by: Dima Zavin <dima@android.com>
2011-06-13 18:18:55 -07:00
Dima Zavin
4a0748be28 update for new audio.h header location
Change-Id: Ia0859cc22cfd50a334235aac5b1e8688bc3d52f4
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-11 14:16:14 -07:00
Dima Zavin
e81531e91e hardware_legacy: provide HAL helpers for legacy audio users
This doesn't actually create a HAL, but rather a set of helper static
libraries that device specific libraries (i.e. the old libaudio pieces)
can link against to create a proper audio HAL module.

We provide an audio_policy static wrapper and audio hardware interface
static wrapper.

Change-Id: Ie56195447ad24b83888f752dca24674b0afd8a76
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 10:48:25 -07:00