[-]
[+]
|
Changed |
_service:tar_git:pulseaudio-modules-droid-hidl.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:pulseaudio-modules-droid-hidl.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,12 +1,12 @@
<services>
<service name="webhook">
- <param name="repourl">https://github.com/sailfishos-oneplus5/pulseaudio-modules-droid-hidl.git</param>
+ <param name="repourl">https://github.com/mer-hybris/pulseaudio-modules-droid-hidl.git</param>
<param name="branch">master</param>
</service>
<service name="tar_git">
- <param name="url">https://github.com/sailfishos-oneplus5/pulseaudio-modules-droid-hidl.git</param>
- <param name="branch">v1.0</param>
+ <param name="url">https://github.com/mer-hybris/pulseaudio-modules-droid-hidl.git</param>
+ <param name="branch">master</param>
<param name="revision">HEAD</param>
<param name="token"/>
<param name="debian">N</param>
|
[-]
[+]
|
Deleted |
_service:tar_git:pulseaudio-modules-droid-hidl-1.0.tar.bz2/src/hidl/common.h
^
|
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2019 Jolla Ltd.
- *
- * Contact: Juho Hämäläinen <juho.hamalainen@jolla.com>
- *
- * These PulseAudio Modules are free software; you can redistribute
- * it and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA.
- */
-
-#ifndef __HIDL_PASSTHROUGH_COMMON__
-#define __HIDL_PASSTHROUGH_COMMON__
-
-#include <stdlib.h>
-
-#define HELPER_NAME "hidl-helper"
-
-#define HIDL_PASSTHROUGH_PATH "/org/sailfishos/hidlpassthrough"
-#define HIDL_PASSTHROUGH_IFACE "org.SailfishOS.HIDLPassthrough"
-
-#define HIDL_PASSTHROUGH_METHOD_GET_PARAMETERS "get_parameters"
-#define HIDL_PASSTHROUGH_METHOD_SET_PARAMETERS "set_parameters"
-
-#define PULSE_ENV_LOG_LEVEL "PULSE_LOG"
-#define PULSE_LOG_LEVEL_DEBUG (4)
-
-static inline void log_init(unsigned int *level) {
- const char *e;
-
- if ((e = getenv(PULSE_ENV_LOG_LEVEL))) {
- *level = atoi(e);
-
- if (*level > PULSE_LOG_LEVEL_DEBUG)
- *level = PULSE_LOG_LEVEL_DEBUG;
- }
-}
-
-#endif
|
[-]
[+]
|
Deleted |
_service:tar_git:pulseaudio-modules-droid-hidl-1.0.tar.bz2/src/hidl/hidl-helper.c
^
|
@@ -1,658 +0,0 @@
-/*
- * Copyright (C) 2019 Jolla Ltd.
- * 2019 Slava Monich <slava.monich@jolla.com>
- *
- * Contact: Juho Hämäläinen <juho.hamalainen@jolla.com>
- *
- * This application is free software; you can redistribute
- * it and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation
- * version 2.1 of the License.
- *
- * This application is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this application; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA.
- */
-
-#include <gbinder.h>
-#include <glib-unix.h>
-#include <gutil_log.h>
-#include <gio/gio.h>
-
-#include "common.h"
-
-#define RET_OK (0)
-#define RET_INVARG (2)
-
-#define BINDER_DEVICE GBINDER_DEFAULT_HWBINDER
-#define QCRIL_IFACE_1_0(x) "vendor.qti.hardware.radio.am@1.0::" x
-#define QCRIL_AUDIO_1_0 QCRIL_IFACE_1_0("IQcRilAudio")
-#define QCRIL_AUDIO_CALLBACK_1_0 QCRIL_IFACE_1_0("IQcRilAudioCallback")
-
-#define OFONO_RIL_SUBSCRIPTION_CONF "/etc/ofono/ril_subscription.conf"
-#define OFONO_RIL_SUBSCRIPTION_D "/etc/ofono/ril_subscription.d"
-#define OFONO_RIL_SLOTS_MAX (4)
-#define CONNECT_RETRY_TIMEOUT_S (1)
-
-#define DBGP(...) do { \
- printf(__VA_ARGS__); \
- printf("\n"); \
- fflush(stdout); \
- } while(0)
-
-#define DBG(...) do { \
- if (gutil_log_default.level == GLOG_LEVEL_VERBOSE) {\
- if (standalone) \
- GDEBUG(__VA_ARGS__); \
- else \
- DBGP(__VA_ARGS__); \
- } \
- } while(0)
-
-#define ERR(...) do { \
- if (standalone) \
- GERR(__VA_ARGS__); \
- else \
- DBGP(__VA_ARGS__); \
- } while(0)
-
-
-enum qcril_audio_methods {
- QCRIL_AUDIO_SET_CALLBACK = GBINDER_FIRST_CALL_TRANSACTION,
- QCRIL_AUDIO_SET_ERROR
-};
-
-enum qcril_audio_callback_methods {
- QCRIL_AUDIO_CALLBACK_GET_PARAMETERS = GBINDER_FIRST_CALL_TRANSACTION,
- QCRIL_AUDIO_CALLBACK_SET_PARAMETERS
-};
-
-static gboolean standalone = FALSE;
-static const char pname[] = HELPER_NAME;
-
-typedef struct app App;
-
-typedef struct am_client {
- App *app;
- char* fqname;
- gchar* slot;
- GBinderServiceManager* sm;
- GBinderLocalObject* local;
- GBinderRemoteObject* remote;
- GBinderClient* client;
- gulong wait_id;
- gulong death_id;
-} AmClient;
-
-struct app {
- GMainLoop* loop;
- int ret;
- GBinderServiceManager* sm;
- GSList* clients;
- guint connect_source;
- GDBusConnection *dbus;
- gchar *address;
-};
-
-static gint
-dbus_get_parameters(
- App *app,
- const gchar *keys,
- gchar **reply_values);
-
-static gint
-dbus_set_parameters(
- App *app,
- const gchar *key_value_pairs);
-
-static void
-am_client_registration_handler(
- GBinderServiceManager* sm,
- const char* name,
- void* user_data);
-
-static void
-am_remote_died(
- GBinderRemoteObject* obj,
- void* user_data)
-{
- AmClient* am = user_data;
-
- DBG("%s has died", am->fqname);
- gbinder_remote_object_unref(am->remote);
- am->remote = NULL;
-
- /* Wait for it to re-appear */
- am->wait_id = gbinder_servicemanager_add_registration_handler(am->sm,
- am->fqname, am_client_registration_handler, am);
-}
-
-/* IQcRilAudioCallback::getParameters(string str) generates (string) */
-static gboolean
-am_client_callback_get_parameters(
- AmClient* am,
- const char* str,
- GBinderLocalReply* reply)
-{
- if (str) {
- gchar* result = NULL;
- dbus_get_parameters(am->app, str, &result);
-
- if (result) {
- GBinderWriter writer;
- gbinder_local_reply_init_writer(reply, &writer);
- gbinder_writer_append_int32(&writer, 0 /* OK */);
- gbinder_writer_append_hidl_string(&writer, result);
-
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-/* IQcRilAudioCallback::setParameters(string str) generates (int32_t) */
-static gboolean
-am_client_callback_set_parameters(
- AmClient* am,
- const char* str,
- GBinderLocalReply* reply)
-{
- if (str) {
- GBinderWriter writer;
- guint32 result = 0;
-
- result = dbus_set_parameters(am->app, str);
- gbinder_local_reply_init_writer(reply, &writer);
- gbinder_writer_append_int32(&writer, 0 /* OK */);
- gbinder_writer_append_int32(&writer, result);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-static GBinderLocalReply*
-am_client_callback(
- GBinderLocalObject* obj,
- GBinderRemoteRequest* req,
- guint code,
- guint flags,
- int* status,
- void* user_data)
-{
- AmClient* am = user_data;
- const char* iface = gbinder_remote_request_interface(req);
-
- if (!g_strcmp0(iface, QCRIL_AUDIO_CALLBACK_1_0)) {
- GBinderReader reader;
- GBinderLocalReply* reply = gbinder_local_object_new_reply(obj);
- const char* str;
-
- gbinder_remote_request_init_reader(req, &reader);
|
[-]
[+]
|
Changed |
_service:tar_git:pulseaudio-modules-droid-hidl-1.3.0.tar.bz2/README.md
^
|
@@ -4,8 +4,28 @@
module-droid-hidl
-----------------
-The purpose of this module is to forward calls made to HIDL API to active
-hw module. This means that the module cannot be loaded independently, it
-needs to have module-droid-card or module-droid-{sink,source} or whatever
-module loaded beforehand that parses droid configuration and loads the hw
-module to PulseAudio global object.
+The purpose of this module is to forward calls made to HIDL API or
+AudioFlinger service to active hw module. This means that the module
+cannot be loaded independently, it needs to have module-droid-card
+or module-droid-{sink,source} or whatever module loaded beforehand
+that parses droid configuration and loads the hw module to
+PulseAudio global object.
+
+Helper binary is separated to its own package, audiosystem-passthrough.
+When using the helper from PulseAudio if the defaults are not suitable
+add configuration to PulseAudio sysconfig file. Available options are
+
+ AUDIOSYSTEM_PASSTHROUGH_TYPE={qti,af}
+ AUDIOSYSTEM_PASSTHROUGH_IDX={17,18} # only applicable to af type
+
+Normally just compiling the package against your adaptation should
+provide working module, but for testing one can also run the helper
+binary by hand.
+
+In pa configuration disable helper binary for the module,
+
+ load-module module-droid-hidl helper=false
+
+Run the helper in standalone mode (type can be either qti or af),
+
+ /usr/libexec/audiosystem-passthrough/audiosystem-passthrough -v -a unix:path=.../pulse/dbus-socket -t <type>
|
[-]
[+]
|
Changed |
_service:tar_git:pulseaudio-modules-droid-hidl-1.3.0.tar.bz2/configure.ac
^
|
@@ -20,7 +20,7 @@
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
-DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option" # PulseAudio 0.9.15 usess same + -Wcast-align -Wdeclaration-after-statement
+DESIRED_FLAGS="-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option" # PulseAudio 0.9.15 usess same + -Wcast-align -Wdeclaration-after-statement
for flag in $DESIRED_FLAGS ; do
CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
@@ -177,17 +177,9 @@
AC_SUBST(DROIDUTIL_CFLAGS)
AC_SUBST(DROIDUTIL_LIBS)
-PKG_CHECK_MODULES([LIBGBINDER], [libgbinder] >= 1.0.32)
-AC_SUBST(LIBGBINDER_CFLAGS)
-AC_SUBST(LIBGBINDER_LIBS)
-
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.56])
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.56])
-AC_SUBST(GIO_CFLAGS)
-AC_SUBST(GIO_LIBS)
+PKG_CHECK_MODULES([PASSTHROUGH_COMMON], [audiosystem-passthrough >= 1.0.0])
+AC_SUBST(PASSTHROUGH_COMMON_CFLAGS)
+AC_SUBST(PASSTHROUGH_COMMON_LIBS)
AC_ARG_WITH(
[module-dir],
@@ -201,15 +193,6 @@
AC_SUBST(modlibexecdir)
-AC_ARG_WITH([helper-dir],
- AS_HELP_STRING([--with-helper-dir], [Directory where to install the helper binary (defaults to ${libexecdir}/pulse).]),
- [helperdir=$withval], [helperdir="${libexecdir}/pulse"]
-)
-AC_SUBST(helperdir)
-
-HELPER_LOCATION_CFLAGS="-DHIDL_HELPER_LOCATION=\"\\\"${helperdir}\\\"\""
-AC_SUBST([HELPER_LOCATION_CFLAGS])
-
AC_MSG_CHECKING([If we are using hardfp tool chain])
case `echo | gcc -v -xc -o - - 2>&1 | grep COLLECT_GCC_OPTIONS | tail -1` in
*float-abi=hard*) hardfp=yes; AC_MSG_RESULT([yes]) ;;
@@ -239,5 +222,4 @@
prefix: ${prefix}
modules directory: ${modlibexecdir}
- helper directory: ${helperdir}
"
|
[-]
[+]
|
Changed |
_service:tar_git:pulseaudio-modules-droid-hidl-1.3.0.tar.bz2/src/hidl/Makefile.am
^
|
@@ -3,7 +3,7 @@
$(DBUS_LIBS) \
$(DROIDUTIL_LIBS)
AM_CFLAGS = \
- $(HELPER_LOCATION_CFLAGS) \
+ $(PASSTHROUGH_COMMON_CFLAGS) \
$(PULSEAUDIO_CFLAGS) \
$(DBUS_CFLAGS) \
$(DROIDHEADERS_CFLAGS) \
@@ -20,11 +20,3 @@
module_droid_hidl_la_LDFLAGS = -module -avoid-version -Wl,-no-undefined -Wl,-z,noexecstack
module_droid_hidl_la_LIBADD = $(AM_LIBADD) -lm
module_droid_hidl_la_CFLAGS = $(AM_CFLAGS)
-
-pulselibexecdir=$(libexecdir)/pulse
-
-pulselibexec_PROGRAMS = hidl-helper
-
-hidl_helper_SOURCES = hidl-helper.c
-hidl_helper_LDADD = $(LIBGBINDER_LIBS) $(GLIB_LIBS) $(GIO_LIBS)
-hidl_helper_CFLAGS = $(LIBGBINDER_CFLAGS) $(GLIB_CFLAGS) $(GIO_CFLAGS)
|
[-]
[+]
|
Changed |
_service:tar_git:pulseaudio-modules-droid-hidl-1.3.0.tar.bz2/src/hidl/module-droid-hidl.c
^
|
@@ -51,11 +51,11 @@
#include <droid/droid-util.h>
-#include "common.h"
+#include <audiosystem-passthrough/common.h>
#include "module-droid-hidl-symdef.h"
PA_MODULE_AUTHOR("Juho Hämäläinen");
-PA_MODULE_DESCRIPTION("Droid HIDL passthrough");
+PA_MODULE_DESCRIPTION("Droid AudioSystem passthrough");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_USAGE(
"module_id=<which droid hw module to load, default primary> "
@@ -70,9 +70,19 @@
#define DEFAULT_MODULE_ID "primary"
-#define HELPER_BINARY HIDL_HELPER_LOCATION "/" HELPER_NAME
+#define HELPER_BINARY PASSTHROUGH_HELPER_DIR "/" PASSTHROUGH_HELPER_EXE
#define BUFFER_MAX (512)
+#if ANDROID_VERSION_MAJOR <= 7
+#define DEFAULT_BINDER_IDX "17"
+#elif ANDROID_VERSION_MAJOR <= 8
+#define DEFAULT_BINDER_IDX "18"
+#else
+#define DEFAULT_BINDER_IDX "18"
+#endif
+
+#define QTI_INTERFACE_NAME "IQcRilAudio"
+
struct userdata {
pa_core *core;
pa_module *module;
@@ -94,13 +104,13 @@
return false;
}
-static void hidl_get_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata);
-static void hidl_set_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata);
+static void get_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata);
+static void set_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata);
-enum hidl_passthrough_methods {
- HIDL_PASSTHROUGH_GET_PARAMETERS,
- HIDL_PASSTHROUGH_SET_PARAMETERS,
- HIDL_PASSTHROUGH_METHOD_MAX
+enum audiosystem_passthrough_methods {
+ PASSTHROUGH_GET_PARAMETERS,
+ PASSTHROUGH_SET_PARAMETERS,
+ PASSTHROUGH_METHOD_MAX
};
static pa_dbus_arg_info get_parameters_args[] = {
@@ -111,25 +121,25 @@
{ "key_value_pairs", "s", "in" }
};
-static pa_dbus_method_handler hidl_passthrough_method_handlers[HIDL_PASSTHROUGH_METHOD_MAX] = {
- [HIDL_PASSTHROUGH_GET_PARAMETERS] = {
- .method_name = HIDL_PASSTHROUGH_METHOD_GET_PARAMETERS,
+static pa_dbus_method_handler passthrough_method_handlers[PASSTHROUGH_METHOD_MAX] = {
+ [PASSTHROUGH_GET_PARAMETERS] = {
+ .method_name = AUDIOSYSTEM_PASSTHROUGH_GET_PARAMETERS,
.arguments = get_parameters_args,
.n_arguments = sizeof(get_parameters_args) / sizeof(get_parameters_args[0]),
- .receive_cb = hidl_get_parameters
+ .receive_cb = get_parameters
},
- [HIDL_PASSTHROUGH_SET_PARAMETERS] = {
- .method_name = HIDL_PASSTHROUGH_METHOD_SET_PARAMETERS,
+ [PASSTHROUGH_SET_PARAMETERS] = {
+ .method_name = AUDIOSYSTEM_PASSTHROUGH_SET_PARAMETERS,
.arguments = set_parameters_args,
.n_arguments = sizeof(set_parameters_args) / sizeof(set_parameters_args[0]),
- .receive_cb = hidl_set_parameters
+ .receive_cb = set_parameters
},
};
-static pa_dbus_interface_info hidl_passthrough_info = {
- .name = HIDL_PASSTHROUGH_IFACE,
- .method_handlers = hidl_passthrough_method_handlers,
- .n_method_handlers = HIDL_PASSTHROUGH_METHOD_MAX,
+static pa_dbus_interface_info passthrough_info = {
+ .name = AUDIOSYSTEM_PASSTHROUGH_IFACE,
+ .method_handlers = passthrough_method_handlers,
+ .n_method_handlers = PASSTHROUGH_METHOD_MAX,
.property_handlers = NULL,
.n_property_handlers = 0,
.get_all_properties_cb = NULL,
@@ -143,20 +153,20 @@
u->dbus_protocol = pa_dbus_protocol_get(u->core);
- pa_dbus_protocol_add_interface(u->dbus_protocol, HIDL_PASSTHROUGH_PATH, &hidl_passthrough_info, u);
- pa_dbus_protocol_register_extension(u->dbus_protocol, HIDL_PASSTHROUGH_IFACE);
+ pa_dbus_protocol_add_interface(u->dbus_protocol, AUDIOSYSTEM_PASSTHROUGH_PATH, &passthrough_info, u);
+ pa_dbus_protocol_register_extension(u->dbus_protocol, AUDIOSYSTEM_PASSTHROUGH_IFACE);
}
static void dbus_done(struct userdata *u) {
pa_assert(u);
- pa_dbus_protocol_unregister_extension(u->dbus_protocol, HIDL_PASSTHROUGH_IFACE);
- pa_dbus_protocol_remove_interface(u->dbus_protocol, HIDL_PASSTHROUGH_PATH, hidl_passthrough_info.name);
+ pa_dbus_protocol_unregister_extension(u->dbus_protocol, AUDIOSYSTEM_PASSTHROUGH_IFACE);
+ pa_dbus_protocol_remove_interface(u->dbus_protocol, AUDIOSYSTEM_PASSTHROUGH_PATH, passthrough_info.name);
pa_dbus_protocol_unref(u->dbus_protocol);
u->dbus_protocol = NULL;
}
-static void hidl_get_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata) {
+static void get_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata) {
struct userdata *u;
DBusMessage *reply;
DBusError error;
@@ -193,7 +203,7 @@
dbus_error_free(&error);
}
-static void hidl_set_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata) {
+static void set_parameters(DBusConnection *conn, DBusMessage *msg, void *userdata) {
struct userdata *u;
DBusError error;
char *key_value_pairs = NULL;
@@ -250,9 +260,9 @@
memset(buffer, 0, BUFFER_MAX);
if ((r = pa_read(u->fd, buffer, BUFFER_MAX, NULL)) > 0) {
if (log_level_debug())
- pa_log_debug("[" HELPER_NAME "] %s", buffer);
+ pa_log_debug("[" PASSTHROUGH_HELPER_EXE "] %s", buffer);
else
- pa_log("[" HELPER_NAME "] %s", buffer);
+ pa_log("[" PASSTHROUGH_HELPER_EXE "] %s", buffer);
} else if (r < 0) {
pa_log("failed read");
io_free(u);
@@ -266,11 +276,55 @@
}
}
+static bool file_exists(const char *path) {
+ return access(path, F_OK) == 0 ? true : false;
+}
+
+static bool string_in_file(const char *path, const char *string) {
+ char line[512];
+ FILE *f = NULL;
+ bool found = false;
+
+ pa_assert(path);
+
+ if (!file_exists(path))
+ goto done;
+
+ if (!(f = pa_fopen_cloexec(path, "r"))) {
+ pa_log_warn("open('%s') failed: %s", path, pa_cstrerror(errno));
+ goto done;
+ }
+
+ while (fgets(line, sizeof(line), f)) {
+ if (strstr(line, string)) {
+ found = true;
+ break;
+ }
+ }
+
+done:
+ if (f)
+ fclose(f);
+
+ return found;
+}
+
+static void helper_setenv(const char *dbus_address, const char *impl_type, const char *idx) {
+ setenv(ENV_AUDIOSYSTEM_PASSTHROUGH_ADDRESS, dbus_address, 1);
+ setenv(ENV_AUDIOSYSTEM_PASSTHROUGH_TYPE, impl_type, 0);
+ setenv(ENV_AUDIOSYSTEM_PASSTHROUGH_IDX, idx, 0);
+}
+
+static void helper_unsetenv(void) {
+ unsetenv(ENV_AUDIOSYSTEM_PASSTHROUGH_ADDRESS);
+ unsetenv(ENV_AUDIOSYSTEM_PASSTHROUGH_TYPE);
+ unsetenv(ENV_AUDIOSYSTEM_PASSTHROUGH_IDX);
+}
+
int pa__init(pa_module *m) {
pa_modargs *ma = NULL;
const char *module_id;
bool helper = true;
- char *dbus_address = NULL;
pa_assert(m);
@@ -301,15 +355,41 @@
dbus_init(u);
|