Repository navigation
Keep a silent Asahi mic mapping from staying the default input - #610
Merged
Merged
Conversation
…ay's DSP is lost WirePlumber can leave asahi-audio's mic filter half-built, which left the mapper's null-sink monitor as the default input (and its sink as the default output) carrying silence. Move playback off the mapping sink, hand capture to a plugged-in real input and restore the mapping when the array returns, notify once with a click to restart audio, and parse multi-line module arguments so rollback can unload the mapping.
Only a choice of another real input ends the claim; a claimed input that goes away hands over again or lets the returning array take over from the monitor left behind; a muted fallback waits for unmute. The lost-array notice is now timed by the watcher instead of blocking under the mapping lock.
…pping Otherwise the watcher woke every 100 ms until the array returned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket 99. On the M2 Max the hardware tester found the default input was the mic mapper's null-sink monitor carrying digital silence. The kernel mic was fine; WirePlumber 0.5.17 had left asahi-audio's J416 mic filter half-built (no
effect_output.j416-mic), and the mapper bailed out without touching the defaults, so its silent monitor stayed the default input and its null sink the default output. The WirePlumber side is reproducible by switching the mic card profile and is being reported upstream; this PR contains the damage in Omarchy.What changed (mapper only):
omarchy-restart-audio, which recovers the filter.pactl list short modulesoutput with multi-line module arguments (asahi-audio's module-rt) no longer breaks rollback of a failed mapping.Tests:
packages/omarchy-mac/test/mic-test.shcovers loss, handover, mute, ignored switch, user choices during loss/return, unplugged fallback, audio restart mid-loss, silent/unsampled return, notice timing and the watcher wake. Package suites andtest/shell.daudio suites pass on the M2 (keyboard-test fails there on the base too, host-related). Live on the M2 with a stand-in array: loss handed capture to a real input, return reselected the mapping with live signal, one notice shown.Second review: two rounds; fixed claim loss on unplug, stale claim after restart, muted fallback on return, notice wait held under the lock, and a fast wake loop after a restart mid-loss. Known limits are in the ticket.