mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
Audio: DirectAudio for games, and the microphone, from Bannerlator's Linux session
Two opt-ins on a new Audio screen, both ported from Bannerlator's gamescope runtime where they are proven with voice in Steam's own tester. DirectAudio replaces the audio driver inside the games the client launches - Wine's mmdevapi driver, glibc build - with one that talks to a helper on the Android side over a unix socket. The client keeps PulseAudio either way: it is a native Linux program with no other way to make a sound. The helper runs here because nothing inside the session can open Android's audio: a game is a glibc process in a rootfs that binds no /system, and the uid the helper runs under is what the recording permission is checked against. The microphone is its own opt-in. The helper opens the input stream only when asked and writes it to a pipe; PulseAudio's module-pipe-source turns that into a source the client sees as DirectAudioMic. The daemon makes the pipe and the helper waits for it - the two used to race, and the module fails on EEXIST. The Proton wrappers gain Bannerlator's bl_directaudio, which adds the driver's directory to WINEDLLPATH and names the driver in the prefix, and refuses on any Proton that is not Wine 11 rather than pair a driver with an interface it was not built against, which would be silence rather than an error. bl_game_cpus comes along in the same splice and is inert until BL_GAME_CPUS is set. The driver is staged into the runtime at every launch like the session scripts; the helper ships as libdirectaudiorelay.so beside the PulseAudio daemon. Both are the binaries Bannerlator carries, built by The412Banner/directaudio's relay workflow (linux-wine11 build against ValveSoftware/wine proton_11.0).
This commit is contained in:
1 parent
3182ba780e
commit
f542e59a20
17 files changed
+534
-11
No files matched your search
@@ -17,6 +17,10 @@
|
||||
itself with the phone via boot receivers and signs this client out seconds after every
|
||||
login; a normal permission, and it cannot touch anything in the foreground. -->
|
||||
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
|
||||
<!-- The microphone for the Linux session, only when the user turns it on: the DirectAudio
|
||||
relay helper opens the input stream under this uid, and PulseAudio exposes it to the
|
||||
Steam client as DirectAudioMic. -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
|
||||
<uses-feature android:name="android.hardware.vulkan.version" android:version="0x401000" android:required="true" />
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false" />
|
||||
|
||||
Reference in new issue
Block a user