summaryrefslogtreecommitdiffstats
path: root/ahl-utilities/ahl-interface.h
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-10-30 21:18:41 +0100
committerFulup Ar Foll <fulup@iot.bzh>2017-10-30 21:18:41 +0100
commitc68316b787706d49bbddb387af45e25804678ce6 (patch)
tree828f3b2849e72646baf4c29fa1d5355e0c4fddd6 /ahl-utilities/ahl-interface.h
parentc46955de2731563d1991691cd1a7986f05f019e3 (diff)
Code Reorganisation preparing transfer to gerrit
Diffstat (limited to 'ahl-utilities/ahl-interface.h')
-rw-r--r--ahl-utilities/ahl-interface.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/ahl-utilities/ahl-interface.h b/ahl-utilities/ahl-interface.h
new file mode 100644
index 0000000..0488e96
--- /dev/null
+++ b/ahl-utilities/ahl-interface.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2017 "Audiokinetic Inc"
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AHL_INTERFACE_INCLUDE
+#define AHL_INTERFACE_INCLUDE
+
+///// API /////
+
+// Endpoint types
+#define AHL_ENDPOINTTYPE_SOURCE "source" // source devices
+#define AHL_ENDPOINTTYPE_SINK "sink" // sink devices
+
+// Stream state
+#define AHL_STREAM_STATE_IDLE "idle" // Stream is inactive
+#define AHL_STREAM_STATE_RUNNING "running" // Stream is active and running
+#define AHL_STREAM_STATE_PAUSED "paused" // Stream is active but paused
+
+// Stream mute state
+#define AHL_STREAM_UNMUTED "off" // Stream is not muted
+#define AHL_STREAM_MUTED "on" // Stream is muted
+
+// Property/Volume/Action events
+#define AHL_ENDPOINT_PROPERTY_EVENT "ahl_endpoint_property_event"
+#define AHL_ENDPOINT_VOLUME_EVENT "ahl_endpoint_volume_event"
+#define AHL_ENDPOINT_INIT_EVENT "ahl_endpoint_init_event"
+#define AHL_POST_ACTION_EVENT "ahl_post_action"
+#define AHL_STREAM_STATE_EVENT "ahl_stream_state_event"
+#define AHL_ENDPOINT_INIT_EVENT "ahl_endpoint_init_event"
+
+
+// Stream state event types
+#define AHL_STREAM_EVENT_START "start" // Stream is inactive
+#define AHL_STREAM_EVENT_STOP "stop" // Stream is running
+#define AHL_STREAM_EVENT_PAUSE "pause" // Audio stream paused
+#define AHL_STREAM_EVENT_RESUME "resume" // Audio stream resumed
+#define AHL_STREAM_EVENT_MUTE "mute" // Audio stream muted
+#define AHL_STREAM_EVENT_UNMUTE "unmute" // Audio stream unmuted
+
+///// Interpret returned or configuration information /////
+
+// Known audio domain string definitions (for configuration file format and device URI interpretation)
+#define AHL_DOMAIN_ALSA "alsa"
+#define AHL_DOMAIN_PULSE "pulse"
+#define AHL_DOMAIN_GSTREAMER "gstreamer"
+#define AHL_DOMAIN_EXTERNAL "external"
+
+// ALSA Device URI type
+#define AHL_DEVICEURITYPE_ALSA_HW "hw" // Alsa hardware device URI
+#define AHL_DEVICEURITYPE_ALSA_DMIX "dmix" // Alsa Dmix device URI (only for playback devices)
+#define AHL_DEVICEURITYPE_ALSA_DSNOOP "dsnoop" // Alsa DSnoop device URI (only for capture devices)
+#define AHL_DEVICEURITYPE_ALSA_SOFTVOL "softvol" // Alsa softvol device URI
+#define AHL_DEVICEURITYPE_ALSA_PLUG "plug" // Alsa plug device URI
+#define AHL_DEVICEURITYPE_ALSA_OTHER "other" // Alsa domain URI device of unspecified type
+#define AHL_DEVICEURITYPE_NOT_ALSA "nonalsa"
+
+// Define default behavior of audio role when interrupting lower priority sources (in configuration)
+#define AHL_INTERRUPTBEHAVIOR_CONTINUE "continue" // Continue to play when interrupted (e.g. media may be ducked)
+#define AHL_INTERRUPTBEHAVIOR_CANCEL "cancel" // Abort playback when interrupted (e.g. non-important HMI feedback that does not make sense later)
+#define AHL_INTERRUPTBEHAVIOR_PAUSE "pause" // Pause source when interrupted, to be resumed afterwards (e.g. non-temporal guidance)
+
+///// Naming convention /////
+
+// Standardized name for common audio roles (not enforced in any way, just helps compatibility)
+#define AHL_ROLE_WARNING "warning" // Safety-relevant or critical alerts/alarms
+#define AHL_ROLE_GUIDANCE "guidance" // Important user information where user action is expected (e.g. navigation instruction)
+#define AHL_ROLE_NOTIFICATION "notification" // HMI or else notifications (e.g. touchscreen events, speech recognition on/off,...)
+#define AHL_ROLE_COMMUNICATION "communication" // Voice communications (e.g. handsfree, speech recognition)
+#define AHL_ROLE_ENTERTAINMENT "entertainment" // Multimedia content (e.g. tuner, media player, etc.)
+#define AHL_ROLE_SYSTEM "system" // System level content or development
+#define AHL_ROLE_STARTUP "startup" // Early (startup) sound
+#define AHL_ROLE_SHUTDOWN "shutdown" // Late (shutdown) sound
+#define AHL_ROLE_NONE "none" // Non-assigned / legacy applications
+
+// Standardized list of properties (not enforced in any way, just helps compatibility)
+#define AHL_PROPERTY_BALANCE "balance"
+#define AHL_PROPERTY_FADE "fade"
+#define AHL_PROPERTY_EQ_LOW "eq_bass"
+#define AHL_PROPERTY_EQ_MID "eq_mid"
+#define AHL_PROPERTY_EQ_HIGH "eq_treble"
+
+// Standardized list of events (not enforced in any way, just helps compatibility)
+#define AHL_EVENTS_PLAYSOUND "play_sound"
+#define AHL_EVENTS_ECHOCANCEL_ENABLE "echocancel_enable"
+#define AHL_EVENTS_ECHOCANCEL_DISABLE "echocancel_disable"
+
+#endif // AHL_INTERFACE_INCLUDE