summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-03-15 14:53:29 -0700
committerLinux Build Service Account <lnxbuild@localhost>2021-03-15 14:53:29 -0700
commitd9191d81a0ed496e1392d7d09ca014c353c70ca0 (patch)
treeebeed7d9e56a9f45c0981a29b17b7297d04338d7
parent5b25e40ec8dc849c7ba3405505db9fc352b3165a (diff)
parent3d37d2b17b1d139e97f1974e7336e30ef95918e0 (diff)
Merge 3d37d2b17b1d139e97f1974e7336e30ef95918e0 on remote branch
Change-Id: Iba1ca493a222ffbd5ecabf815f13dafbcad3eb73
-rw-r--r--include/hardware/audio.h74
-rw-r--r--include/hardware/keymaster_defs.h3
-rw-r--r--modules/usbaudio/Android.bp24
3 files changed, 97 insertions, 4 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index c2db50c1..adec3da8 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -459,6 +459,80 @@ struct audio_stream_out {
*/
void (*update_source_metadata_v7)(struct audio_stream_out *stream,
const struct source_metadata_v7* source_metadata);
+
+ /**
+ * Returns the Dual Mono mode presentation setting.
+ *
+ * \param[in] stream the stream object.
+ * \param[out] mode current setting of Dual Mono mode.
+ *
+ * \return 0 if the position is successfully returned.
+ * -EINVAL if the arguments are invalid
+ * -ENOSYS if the function is not available
+ */
+ int (*get_dual_mono_mode)(struct audio_stream_out *stream, audio_dual_mono_mode_t *mode);
+
+ /**
+ * Sets the Dual Mono mode presentation on the output device.
+ *
+ * \param[in] stream the stream object.
+ * \param[in] mode selected Dual Mono mode.
+ *
+ * \return 0 in case of success.
+ * -EINVAL if the arguments are invalid
+ * -ENOSYS if the function is not available
+ */
+ int (*set_dual_mono_mode)(struct audio_stream_out *stream, const audio_dual_mono_mode_t mode);
+
+ /**
+ * Returns the Audio Description Mix level in dB.
+ *
+ * \param[in] stream the stream object.
+ * \param[out] leveldB the current Audio Description Mix Level in dB.
+ *
+ * \return 0 in case of success.
+ * -EINVAL if the arguments are invalid
+ * -ENOSYS if the function is not available
+ */
+ int (*get_audio_description_mix_level)(struct audio_stream_out *stream, float *leveldB);
+
+ /**
+ * Sets the Audio Description Mix level in dB.
+ *
+ * \param[in] stream the stream object.
+ * \param[in] leveldB Audio Description Mix Level in dB.
+ *
+ * \return 0 in case of success.
+ * -EINVAL if the arguments are invalid
+ * -ENOSYS if the function is not available
+ */
+ int (*set_audio_description_mix_level)(struct audio_stream_out *stream, const float leveldB);
+
+ /**
+ * Retrieves current playback rate parameters.
+ *
+ * \param[in] stream the stream object.
+ * \param[out] playbackRate current playback parameters.
+ *
+ * \return 0 in case of success.
+ * -EINVAL if the arguments are invalid
+ * -ENOSYS if the function is not available
+ */
+ int (*get_playback_rate_parameters)(struct audio_stream_out *stream,
+ audio_playback_rate_t *playbackRate);
+
+ /**
+ * Sets the playback rate parameters that control playback behavior.
+ *
+ * \param[in] stream the stream object.
+ * \param[in] playbackRate playback parameters.
+ *
+ * \return 0 in case of success.
+ * -EINVAL if the arguments are invalid
+ * -ENOSYS if the function is not available
+ */
+ int (*set_playback_rate_parameters)(struct audio_stream_out *stream,
+ const audio_playback_rate_t *playbackRate);
};
typedef struct audio_stream_out audio_stream_out_t;
diff --git a/include/hardware/keymaster_defs.h b/include/hardware/keymaster_defs.h
index f2deb72a..a0a1c8e5 100644
--- a/include/hardware/keymaster_defs.h
+++ b/include/hardware/keymaster_defs.h
@@ -95,6 +95,8 @@ typedef enum {
cryptographic operations with the key. */
KM_TAG_MAX_USES_PER_BOOT = KM_UINT | 404, /* Number of times the key can be used per
boot. */
+ KM_TAG_USAGE_COUNT_LIMIT = KM_UINT | 405, /* Number of cryptographic operations left
+ with the key.*/
/* User authentication */
KM_TAG_ALL_USERS = KM_BOOL | 500, /* Reserved for future use -- ignore */
@@ -330,6 +332,7 @@ typedef enum {
KM_PURPOSE_VERIFY = 3, /* Usable with RSA, EC and HMAC keys. */
KM_PURPOSE_DERIVE_KEY = 4, /* Usable with EC keys. */
KM_PURPOSE_WRAP = 5, /* Usable with wrapped keys. */
+ KM_PURPOSE_AGREE_KEY = 6, /* Usable with EC keys. */
} keymaster_purpose_t;
diff --git a/modules/usbaudio/Android.bp b/modules/usbaudio/Android.bp
index c7d403f5..9f787532 100644
--- a/modules/usbaudio/Android.bp
+++ b/modules/usbaudio/Android.bp
@@ -12,18 +12,34 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-cc_library_shared {
- name: "audio.usb.default",
+cc_defaults {
+ name: "audio.usb_defaults",
relative_install_path: "hw",
vendor: true,
srcs: ["audio_hal.c"],
shared_libs: [
"liblog",
"libcutils",
- "libtinyalsa",
"libaudioutils",
- "libalsautils",
],
cflags: ["-Wno-unused-parameter"],
header_libs: ["libhardware_headers"],
}
+
+cc_library_shared {
+ name: "audio.usb.default",
+ defaults: ["audio.usb_defaults"],
+ shared_libs: [
+ "libtinyalsa",
+ "libalsautils",
+ ],
+}
+
+cc_library_shared {
+ name: "audio.usbv2.default",
+ defaults: ["audio.usb_defaults"],
+ shared_libs: [
+ "libtinyalsav2",
+ "libalsautilsv2",
+ ],
+}