summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h
diff options
context:
space:
mode:
authorAdrian Scarlat <adrian.scarlat@windriver.com>2015-05-22 14:16:45 +0000
committerJames Thomas <james.thomas@codethink.co.uk>2015-05-22 14:18:47 +0000
commitba709ee7d4f9f81af638a3d3c640b7152bbe32bc (patch)
tree3d05af7d27b462dbafcea61116474c9d9da3b3fd /PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h
parent64d2ba454ecfb1ea9bef3b4b717989afa58db1c7 (diff)
downloadaudiomanager-ba709ee7d4f9f81af638a3d3c640b7152bbe32bc.tar.gz
This Routing Interface is needed for any application that will
be developed on top of AM and will use PulseAudio Sound Server to control the sources and sinks present on the system. It must be loaded by AM; The interface can be built by supplying cmake with the -DWITH_PULSE_ROUTING_PLUGIN=ON; After building one configuration file will be available: 1. libPluginRoutingInterfacePULSE.conf - configuration file for Pulse Routing Plugin; it will be loaded at runtime by the Pulse Routing Interface; Changed files: CMakeLists.txt Added new folders: PluginRoutingInterfacePulse/ Added new files: PluginRoutingInterfacePulse/CMakeLists.txt PluginRoutingInterfacePulse/README PluginRoutingInterfacePulse/data/libPluginRoutingInterfacePULSE.conf PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h PluginRoutingInterfacePulse/include/RoutingSenderPULSE.h PluginRoutingInterfacePulse/src/RoutingSenderMainloopPULSE.cpp PluginRoutingInterfacePulse/src/RoutingSenderPULSE.cpp Signed-off-by: Adrian Scarlat <adrian.scarlat@windriver.com>
Diffstat (limited to 'PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h')
-rw-r--r--PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h b/PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h
new file mode 100644
index 0000000..ff0c1d8
--- /dev/null
+++ b/PluginRoutingInterfacePulse/include/RoutingSenderMainloopPULSE.h
@@ -0,0 +1,97 @@
+/**
+ * SPDX license identifier: MPL-2.0
+ *
+ * Copyright (C) 2011-2014, Wind River Systems
+ * Copyright (C) 2014, GENIVI Alliance
+ *
+ * This file is part of Pulse Audio Interface Routing Plugin.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License (MPL), v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * For further information see http://www.genivi.org/.
+ *
+ * List of changes:
+ *
+ * 21.08.2014, Adrian Scarlat, First version of the code;
+ * Porting code from AM ver1.x to AM ver3.0;
+ * Added Copyright and License information;
+ */
+
+#ifndef ROUTINGSENDERMAINLOPPPULSE_H_
+#define ROUTINGSENDERMAINLOPPPULSE_H_
+
+/* Defines */
+/* In PulseAudio the volume value range from 0 (silence) to 0x10000U=65536 ("maximum" sensible volume). */
+#define MAX_PULSE_VOLUME (0x10000U)
+
+bool routing_sender_create_mainloop(void *thiz);
+
+void * routing_sender_start_mainloop(void *thiz);
+
+void routing_sender_get_sink_info_callback(
+ pa_context *c,
+ const pa_sink_info *i,
+ int is_last, void *thiz);
+
+void routing_sender_context_state_callback(pa_context *c, void *thiz);
+
+bool routing_sender_get_source_info(pa_context *c, void *thiz);
+
+void routing_sender_pa_event_callback(
+ pa_context *c,
+ pa_subscription_event_type_t t,
+ uint32_t idx, void *thiz);
+
+void routing_sender_get_sink_input_info_callback(
+ pa_context *c,
+ const pa_sink_input_info *i,
+ int eol,
+ void *thiz);
+
+void routing_sender_get_source_output_info_callback(
+ pa_context *c,
+ const pa_source_output_info *i,
+ int eol,
+ void *userdata);
+
+bool routing_sender_move_sink_input(
+ pa_context *c,
+ uint32_t sink_input_index,
+ uint32_t sink_index,
+ void *thiz);
+
+bool routing_sender_move_source_output(
+ pa_context *c,
+ uint32_t source_output_index,
+ uint32_t source_index,
+ void *thiz);
+
+bool routing_sender_sink_input_volume_ramp(
+ pa_context *c,
+ uint32_t sink_input_index,
+ uint32_t crt_volume,
+ uint32_t volume,
+ uint16_t ramp_time,
+ void *thiz);
+
+bool routing_sender_sink_input_volume(
+ pa_context *c,
+ uint32_t sink_input_index,
+ uint32_t volume,
+ void *thiz);
+
+bool routing_sender_sink_input_mute(
+ pa_context *c,
+ uint32_t sink_input_index,
+ bool mute,
+ void *thiz);
+
+bool routing_sender_sink_volume(
+ pa_context *c,
+ uint32_t sink_index,
+ uint32_t volume,
+ void *thiz);
+
+#endif