evo8-linux 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. evo8/__init__.py +3 -0
  2. evo8/about.py +131 -0
  3. evo8/alsa.py +77 -0
  4. evo8/apps.py +76 -0
  5. evo8/calibrate.py +159 -0
  6. evo8/cli.py +214 -0
  7. evo8/data/__init__.py +0 -0
  8. evo8/data/applications/evo8-mixer.desktop +8 -0
  9. evo8/data/evo8-mixer.svg +38 -0
  10. evo8/data/pipewire/pipewire-pulse.conf.d/20-bloquear-volumen-micro.conf +16 -0
  11. evo8/data/pipewire/pipewire.conf.d/20-mezcla.conf +158 -0
  12. evo8/data/systemd/evo8-restore.service +8 -0
  13. evo8/data/udev/70-audient-evo8.rules +7 -0
  14. evo8/gui/__init__.py +1 -0
  15. evo8/gui/app.py +92 -0
  16. evo8/gui/backend.py +485 -0
  17. evo8/gui/meters.py +86 -0
  18. evo8/gui/qml/AboutPage.qml +257 -0
  19. evo8/gui/qml/CardProfiles.qml +118 -0
  20. evo8/gui/qml/ConsolePage.qml +255 -0
  21. evo8/gui/qml/Divider.qml +8 -0
  22. evo8/gui/qml/GlyphButton.qml +30 -0
  23. evo8/gui/qml/HardwarePage.qml +603 -0
  24. evo8/gui/qml/HwMixStrip.qml +178 -0
  25. evo8/gui/qml/Main.qml +139 -0
  26. evo8/gui/qml/PixelSlider.qml +80 -0
  27. evo8/gui/qml/Strip.qml +396 -0
  28. evo8/gui/qml/StripGroup.qml +23 -0
  29. evo8/gui/qml/Theme.qml +22 -0
  30. evo8/gui/qml/Tip.qml +20 -0
  31. evo8/gui/qml/Toggle.qml +41 -0
  32. evo8/gui/qml/VMeter.qml +28 -0
  33. evo8/gui/qml/format.js +88 -0
  34. evo8/gui/qml/qmldir +14 -0
  35. evo8/gui/snapshot.py +98 -0
  36. evo8/hw.py +147 -0
  37. evo8/mix.py +109 -0
  38. evo8/monitor.py +229 -0
  39. evo8/profiles.py +112 -0
  40. evo8/pw.py +164 -0
  41. evo8/state.py +45 -0
  42. evo8/usb.py +122 -0
  43. evo8/user_setup.py +224 -0
  44. evo8_linux-0.1.0.dist-info/METADATA +198 -0
  45. evo8_linux-0.1.0.dist-info/RECORD +49 -0
  46. evo8_linux-0.1.0.dist-info/WHEEL +5 -0
  47. evo8_linux-0.1.0.dist-info/entry_points.txt +5 -0
  48. evo8_linux-0.1.0.dist-info/licenses/LICENSE +21 -0
  49. evo8_linux-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,38 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256">
2
+ <title>evo8-linux</title>
3
+ <rect x="8" y="8" width="240" height="240" rx="56" fill="#12171a" stroke="#2a363b" stroke-width="4"/>
4
+ <rect x="61.0" y="33.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
5
+ <rect x="89.0" y="33.0" width="22" height="22" rx="3" fill="#ff6b66"/>
6
+ <rect x="117.0" y="33.0" width="22" height="22" rx="3" fill="#ff6b66"/>
7
+ <rect x="145.0" y="33.0" width="22" height="22" rx="3" fill="#ff6b66"/>
8
+ <rect x="173.0" y="33.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
9
+ <rect x="61.0" y="61.0" width="22" height="22" rx="3" fill="#e8b53f"/>
10
+ <rect x="89.0" y="61.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
11
+ <rect x="117.0" y="61.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
12
+ <rect x="145.0" y="61.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
13
+ <rect x="173.0" y="61.0" width="22" height="22" rx="3" fill="#e8b53f"/>
14
+ <rect x="61.0" y="89.0" width="22" height="22" rx="3" fill="#e8b53f"/>
15
+ <rect x="89.0" y="89.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
16
+ <rect x="117.0" y="89.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
17
+ <rect x="145.0" y="89.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
18
+ <rect x="173.0" y="89.0" width="22" height="22" rx="3" fill="#e8b53f"/>
19
+ <rect x="61.0" y="117.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
20
+ <rect x="89.0" y="117.0" width="22" height="22" rx="3" fill="#84c959"/>
21
+ <rect x="117.0" y="117.0" width="22" height="22" rx="3" fill="#84c959"/>
22
+ <rect x="145.0" y="117.0" width="22" height="22" rx="3" fill="#84c959"/>
23
+ <rect x="173.0" y="117.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
24
+ <rect x="61.0" y="145.0" width="22" height="22" rx="3" fill="#84c959"/>
25
+ <rect x="89.0" y="145.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
26
+ <rect x="117.0" y="145.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
27
+ <rect x="145.0" y="145.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
28
+ <rect x="173.0" y="145.0" width="22" height="22" rx="3" fill="#84c959"/>
29
+ <rect x="61.0" y="173.0" width="22" height="22" rx="3" fill="#84c959"/>
30
+ <rect x="89.0" y="173.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
31
+ <rect x="117.0" y="173.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
32
+ <rect x="145.0" y="173.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
33
+ <rect x="173.0" y="173.0" width="22" height="22" rx="3" fill="#84c959"/>
34
+ <rect x="61.0" y="201.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/>
35
+ <rect x="89.0" y="201.0" width="22" height="22" rx="3" fill="#84c959"/>
36
+ <rect x="117.0" y="201.0" width="22" height="22" rx="3" fill="#84c959"/>
37
+ <rect x="145.0" y="201.0" width="22" height="22" rx="3" fill="#84c959"/>
38
+ <rect x="173.0" y="201.0" width="22" height="22" rx="3" fill="#26332e" opacity="0.55"/></svg>
@@ -0,0 +1,16 @@
1
+ # Los navegadores aplican control automático de ganancia (AGC) en videollamadas
2
+ # y cambian por su cuenta el volumen del micrófono del sistema: Meet puede ir
3
+ # bajando la Mezcla en plena llamada. Esto bloquea que esas apps cambien el
4
+ # volumen de cualquier entrada; se sigue ajustando desde el mezclador (evo8-mixer) o evoctl.
5
+ pulse.rules = [
6
+ {
7
+ matches = [
8
+ { application.process.binary = "chrome" }
9
+ { application.process.binary = "chromium" }
10
+ { application.process.binary = "firefox" }
11
+ ]
12
+ actions = {
13
+ quirks = [ block-source-volume ]
14
+ }
15
+ }
16
+ ]
@@ -0,0 +1,158 @@
1
+ # Micrófono virtual "Mezcla" (Audient EVO 8 en perfil "Pro Audio").
2
+ #
3
+ # EVO entrada 1 ─┐
4
+ # EVO entrada 2 ─┼─► mezcla.suma ─► Mezcla (micrófono virtual, mono)
5
+ # Compartido ────┘
6
+ # │
7
+ # └─► salida seleccionada
8
+ #
9
+ # "Compartido" es una salida virtual: lo que suena ahí se escucha por la salida
10
+ # seleccionada y además entra en la Mezcla.
11
+ #
12
+ # Los puentes con destino fijo usan dont-fallback + linger: si su destino
13
+ # desaparece (la EVO se desconecta un instante), esperan y se reconectan solos
14
+ # cuando vuelve, en vez de pasarse a otro dispositivo o destruirse.
15
+ #
16
+ # Volumen de cada parte en la mezcla ("Gain N"):
17
+ # 1 = entrada 1, 2 = entrada 2, 3/4 = Compartido L/R.
18
+ #
19
+ # Compensación de latencia ("compL"/"compR", "Delay (s)"): quien toca oye
20
+ # Compartido con el retardo de la salida y su instrumento vuelve con el de la
21
+ # entrada, así que en la suma el instrumento llega tarde respecto de la música.
22
+ # Retrasar Compartido *solo hacia la suma* los alinea sin cambiar lo que se
23
+ # oye. `evoctl calibrate` mide el valor; `evoctl delay set` lo aplica en vivo
24
+ # y `evoctl apply` lo restaura.
25
+ #
26
+ # Los puentes llevan state.restore-props = false: el volumen y el silencio que
27
+ # les pone el sistema (el monitor silencia la escucha) no deben volver solos
28
+ # tras un reinicio.
29
+
30
+ context.modules = [
31
+ # Sumador: sink interno de 4 canales que sale como micrófono mono.
32
+ # Canales: FL/FR = entradas 1-2, RL/RR = Compartido L/R. (Posiciones
33
+ # estándar: con AUX0/AUX1 el sink entregaba silencio en esos canales.)
34
+ { name = libpipewire-module-filter-chain
35
+ args = {
36
+ node.description = "Mezcla (suma interna)"
37
+ media.name = "Mezcla"
38
+ filter.graph = {
39
+ nodes = [
40
+ {
41
+ type = builtin
42
+ name = mix
43
+ label = mixer
44
+ control = { "Gain 1" = 1.0 "Gain 2" = 1.0 "Gain 3" = 0.5 "Gain 4" = 0.5 }
45
+ }
46
+ {
47
+ type = builtin
48
+ name = compL
49
+ label = delay
50
+ config = { "max-delay" = 1 }
51
+ control = { "Delay (s)" = 0.0 }
52
+ }
53
+ {
54
+ type = builtin
55
+ name = compR
56
+ label = delay
57
+ config = { "max-delay" = 1 }
58
+ control = { "Delay (s)" = 0.0 }
59
+ }
60
+ ]
61
+ links = [
62
+ { output = "compL:Out" input = "mix:In 3" }
63
+ { output = "compR:Out" input = "mix:In 4" }
64
+ ]
65
+ inputs = [ "mix:In 1" "mix:In 2" "compL:In" "compR:In" ]
66
+ outputs = [ "mix:Out" ]
67
+ }
68
+ capture.props = {
69
+ node.name = "mezcla.suma"
70
+ media.class = Audio/Sink
71
+ audio.position = [ FL FR RL RR ]
72
+ priority.session = 0
73
+ priority.driver = 0
74
+ }
75
+ playback.props = {
76
+ node.name = "Mezcla"
77
+ node.description = "Mezcla (entradas 1-2 + Compartido)"
78
+ media.class = Audio/Source
79
+ audio.position = [ MONO ]
80
+ }
81
+ }
82
+ }
83
+
84
+ # EVO entradas 1-2 → sumador.
85
+ { name = libpipewire-module-loopback
86
+ args = {
87
+ node.description = "Mezcla: entradas 1-2"
88
+ capture.props = {
89
+ node.name = "mezcla.entradas"
90
+ state.restore-props = false
91
+ audio.position = [ AUX0 AUX1 ]
92
+ target.object = "alsa_input.usb-Audient_EVO8-00.pro-input-0"
93
+ stream.dont-remix = true
94
+ node.passive = true
95
+ node.dont-fallback = true
96
+ node.linger = true
97
+ }
98
+ playback.props = {
99
+ node.name = "mezcla.entradas.out"
100
+ state.restore-props = false
101
+ audio.position = [ FL FR ]
102
+ target.object = "mezcla.suma"
103
+ stream.dont-remix = true
104
+ node.dont-fallback = true
105
+ node.linger = true
106
+ }
107
+ }
108
+ }
109
+
110
+ # Salida virtual "Compartido" → salida seleccionada (sin target fijo: sigue
111
+ # a la salida por defecto como cualquier app).
112
+ { name = libpipewire-module-loopback
113
+ args = {
114
+ node.description = "Compartido"
115
+ capture.props = {
116
+ node.name = "Compartido"
117
+ node.description = "Compartido"
118
+ media.class = Audio/Sink
119
+ audio.position = [ FL FR ]
120
+ priority.session = 0
121
+ priority.driver = 0
122
+ }
123
+ playback.props = {
124
+ node.name = "mezcla.compartido.escucha"
125
+ state.restore-props = false
126
+ node.description = "Compartido (escucha)"
127
+ audio.position = [ FL FR ]
128
+ }
129
+ }
130
+ }
131
+
132
+ # Lo que suena en "Compartido" → sumador.
133
+ { name = libpipewire-module-loopback
134
+ args = {
135
+ node.description = "Mezcla: Compartido"
136
+ capture.props = {
137
+ node.name = "mezcla.compartido"
138
+ state.restore-props = false
139
+ audio.position = [ FL FR ]
140
+ target.object = "Compartido"
141
+ stream.capture.sink = true
142
+ stream.dont-remix = true
143
+ node.passive = true
144
+ node.dont-fallback = true
145
+ node.linger = true
146
+ }
147
+ playback.props = {
148
+ node.name = "mezcla.compartido.out"
149
+ state.restore-props = false
150
+ audio.position = [ RL RR ]
151
+ target.object = "mezcla.suma"
152
+ stream.dont-remix = true
153
+ node.dont-fallback = true
154
+ node.linger = true
155
+ }
156
+ }
157
+ }
158
+ ]
@@ -0,0 +1,8 @@
1
+ [Unit]
2
+ Description=Restaurar los ajustes del Audient EVO 8 al conectarla
3
+
4
+ [Service]
5
+ Type=oneshot
6
+ # Let snd-usb-audio and PipeWire finish bringing the card up first.
7
+ ExecStartPre=/bin/sleep 3
8
+ ExecStart=%h/.local/bin/evoctl restore
@@ -0,0 +1,7 @@
1
+ # Audient EVO 8 (2708:0007): let the logged-in user send USB control requests
2
+ # (mixer, loop-back, monitoring) without root. The audio itself keeps going
3
+ # through the kernel's snd-usb-audio driver.
4
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="2708", ATTRS{idProduct}=="0007", TAG+="uaccess"
5
+ # When it is plugged in, the user's evo8-restore.service puts back the saved
6
+ # preamps, internal monitor mix and loop-back (the EVO forgets them).
7
+ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2708", ATTRS{idProduct}=="0007", TAG+="systemd", ENV{SYSTEMD_USER_WANTS}+="evo8-restore.service"
evo8/gui/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """Mixer window (PySide6 + QML)."""
evo8/gui/app.py ADDED
@@ -0,0 +1,92 @@
1
+ """evo8-mixer: the mixer window."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import signal
7
+ import sys
8
+ from pathlib import Path
9
+
10
+ QML_DIR = Path(__file__).with_name("qml")
11
+ ICON = Path(__file__).parents[1] / "data" / "evo8-mixer.svg"
12
+
13
+
14
+ def main(argv: list[str] | None = None) -> int:
15
+ try:
16
+ from PySide6.QtGui import QGuiApplication, QIcon
17
+ from PySide6.QtQml import QQmlApplicationEngine
18
+ from PySide6.QtQuickControls2 import QQuickStyle
19
+ except ImportError:
20
+ print("falta PySide6 (pacman -S pyside6)", file=sys.stderr)
21
+ return 1
22
+
23
+ from PySide6.QtNetwork import QLocalServer, QLocalSocket
24
+
25
+ from .backend import Backend
26
+
27
+ QGuiApplication.setApplicationName("evo8-mixer")
28
+ QGuiApplication.setDesktopFileName("evo8-mixer") # Wayland app id
29
+ QQuickStyle.setStyle("Basic")
30
+ app = QGuiApplication(argv if argv is not None else sys.argv)
31
+ # Wayland shells take the icon from the desktop entry (Icon=evo8-mixer);
32
+ # this one covers X11 and running from the source tree.
33
+ app.setWindowIcon(QIcon(str(ICON)))
34
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
35
+
36
+ # One window at a time: a second launch asks the running one to come to
37
+ # the front and exits.
38
+ # EVO8_MIXER_INSTANCE gives a separate instance (tests, a second window).
39
+ name = os.environ.get("EVO8_MIXER_INSTANCE") or f"evo8-mixer-{os.getuid()}"
40
+ # The kernel accepts the connection even when the running window is hung,
41
+ # so only a reply proves it is alive; otherwise take over the name.
42
+ probe = QLocalSocket()
43
+ probe.connectToServer(name)
44
+ if probe.waitForConnected(300):
45
+ probe.write(b"raise\n")
46
+ probe.waitForBytesWritten(300)
47
+ if probe.waitForReadyRead(1000) and probe.readAll().data().startswith(b"ok"):
48
+ return 0
49
+ print("la ventana anterior no responde; abriendo otra", file=sys.stderr)
50
+ probe.abort()
51
+ QLocalServer.removeServer(name)
52
+ server = QLocalServer()
53
+ server.listen(name)
54
+
55
+ backend = Backend()
56
+ engine = QQmlApplicationEngine()
57
+ engine.rootContext().setContextProperty("mixer", backend)
58
+ args = argv if argv is not None else sys.argv
59
+ engine.setInitialProperties({"page": 1 if "--evo" in args else 0})
60
+ engine.load(str(QML_DIR / "Main.qml"))
61
+ if not engine.rootObjects():
62
+ backend.shutdown()
63
+ return 1
64
+ window = engine.rootObjects()[0]
65
+
66
+ def raise_window():
67
+ window.show()
68
+ window.raise_()
69
+ window.requestActivate()
70
+
71
+ # Read the request before answering: closing a Unix socket with unread
72
+ # data resets the peer, which would lose the reply. The caller closes.
73
+ def on_connection():
74
+ while (sock := server.nextPendingConnection()) is not None:
75
+ def answer(sock=sock):
76
+ sock.readAll()
77
+ sock.write(b"ok\n")
78
+ sock.flush()
79
+ raise_window()
80
+ sock.readyRead.connect(answer)
81
+ sock.disconnected.connect(sock.deleteLater)
82
+ if sock.bytesAvailable():
83
+ answer()
84
+
85
+ server.newConnection.connect(on_connection)
86
+ code = app.exec()
87
+ backend.shutdown()
88
+ return code
89
+
90
+
91
+ if __name__ == "__main__":
92
+ sys.exit(main())