Skip to content

Commit

Permalink
pulse: replace dbus control with QubesDB + local socket
Browse files Browse the repository at this point in the history
Since pacat-simple-vchan not necessary run in dom0 anymore, it needs
some better control mechanism than dbus, to be cross-domain compatible.
Use QubesDB for notification of the audio-input state. But use local
socket + qrexec service (coming in the next commit) for changing the
state, as it gives immediate feedback if it was received by
pacat-simple-vchan.

QubesOS/qubes-issues#4547
  • Loading branch information
marmarek committed Apr 9, 2020
1 parent 576ce38 commit de42489
Show file tree
Hide file tree
Showing 12 changed files with 165 additions and 406 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ install:
install -D gui-daemon/qubes-guid $(DESTDIR)/usr/bin/qubes-guid
install -m 0644 -D gui-daemon/qubes-guid.1 $(DESTDIR)$(MANDIR)/man1/qubes-guid.1
install -D pulse/pacat-simple-vchan $(DESTDIR)/usr/bin/pacat-simple-vchan
install -D -m 0644 pulse/pacat-control-api.xml $(DESTDIR)/usr/share/dbus-1/interfaces/org.qubesos.Audio.xml
install -D -m 0644 pulse/org.qubesos.Audio.conf $(DESTDIR)/etc/dbus-1/system.d/org.qubesos.Audio.conf
install -D shmoverride/X-wrapper-qubes $(DESTDIR)/usr/bin/X-wrapper-qubes
install -D shmoverride/shmoverride.so $(DESTDIR)$(LIBDIR)/qubes-gui-daemon/shmoverride.so
install -D -m 0644 gui-daemon/guid.conf $(DESTDIR)/etc/qubes/guid.conf
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Build-Depends:
libconfig-dev,
libpng-dev,
libnotify-dev,
libdbus-glib-1-dev,
qubesdb-dev,
help2man
Standards-Version: 4.1.3
Homepage: https://qubes-os.org/
Expand Down
2 changes: 0 additions & 2 deletions debian/qubes-gui-daemon-pulseaudio.install
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
usr/bin/pacat-simple-vchan
usr/share/dbus-1/interfaces/org.qubesos.Audio.xml
etc/dbus-1/system.d/org.qubesos.Audio.conf
14 changes: 4 additions & 10 deletions pulse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ CC=gcc
CFLAGS=-Wall -Wextra -Werror -g -O2
VCHANLIBS=`pkg-config --libs vchan-$(BACKEND_VMM)`
VCHANCFLAGS=`pkg-config --cflags vchan-$(BACKEND_VMM)`
GLIBCFLAGS=`pkg-config --cflags glib-2.0` `pkg-config --cflags dbus-glib-1`
GLIBLIBS=`pkg-config --libs glib-2.0` `pkg-config --libs dbus-glib-1` `pkg-config --libs gthread-2.0`
GLIBCFLAGS=`pkg-config --cflags glib-2.0`
GLIBLIBS=`pkg-config --libs glib-2.0`
all: module-vchan-sink.so pacat-simple-vchan
pacat-simple-vchan.o: pacat-simple-vchan.c
$(CC) $(CFLAGS) -c $(VCHANCFLAGS) -I. $(GLIBCFLAGS) pacat-simple-vchan.c
pacat-control-object.o: pacat-control-object.c pacat-control-object.h pacat-control-stub.h
$(CC) $(CFLAGS) -c $(VCHANCFLAGS) -I. $(GLIBCFLAGS) $<
pacat-simple-vchan: pacat-simple-vchan.o pacat-control-object.o
pacat-simple-vchan: pacat-simple-vchan.o
$(CC) -o pacat-simple-vchan $^ \
$(VCHANLIBS) -lpulse -lpulse-mainloop-glib $(GLIBLIBS)
# Do not autogenerate because dbus-binding-tool from dbus-glib-0.86 (in chroot)
# produces output incompatible with dbus-glib-0.84 (in Qubes dom0).
#pacat-control-stub.h: pacat-control-api.xml
# dbus-binding-tool --mode=glib-server --prefix=pacat-control $< > $@
$(VCHANLIBS) -lpulse -lpulse-mainloop-glib -lqubesdb $(GLIBLIBS)
clean:
rm -f *.so *.o pacat-simple-vchan *~
19 changes: 0 additions & 19 deletions pulse/org.qubesos.Audio.conf

This file was deleted.

16 changes: 0 additions & 16 deletions pulse/pacat-control-api.xml

This file was deleted.

220 changes: 0 additions & 220 deletions pulse/pacat-control-object.c

This file was deleted.

49 changes: 0 additions & 49 deletions pulse/pacat-control-object.h

This file was deleted.

Loading

0 comments on commit de42489

Please sign in to comment.