From 2238e5448171a95cb5adc97c938ab18517919a44 Mon Sep 17 00:00:00 2001 From: Duke Eagleman <301139544+jerricky26@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:40:15 -0500 Subject: [PATCH] wireplumber: don't force the iPad 7 speaker format on the headphone PCM The 61-omarchy-a-ipad7-speakers rule matched the whole card and forced S16LE/4ch onto the headphone PCM, which only accepts S32_LE, so PipeWire never created the headphones sink. 62 also named every platform-sound output "Speakers". Narrow both to the Speaker node, and add a headphones rule for S32LE/2ch, the Headphones nick, and priority 1100 so the jack becomes the default while it is plugged. Signed-off-by: Duke Eagleman <301139544+jerricky26@users.noreply.github.com> --- .../61-omarchy-a-ipad7-speakers.conf | 8 +++++-- .../62-omarchy-a-speaker-name.conf | 7 +++--- .../63-omarchy-a-headphones.conf | 24 +++++++++++++++++++ 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 system/overlay/etc/wireplumber/wireplumber.conf.d/63-omarchy-a-headphones.conf diff --git a/system/overlay/etc/wireplumber/wireplumber.conf.d/61-omarchy-a-ipad7-speakers.conf b/system/overlay/etc/wireplumber/wireplumber.conf.d/61-omarchy-a-ipad7-speakers.conf index c2e0f4f..3202a7d 100644 --- a/system/overlay/etc/wireplumber/wireplumber.conf.d/61-omarchy-a-ipad7-speakers.conf +++ b/system/overlay/etc/wireplumber/wireplumber.conf.d/61-omarchy-a-ipad7-speakers.conf @@ -3,11 +3,15 @@ # 3 and 4 the right one. Map the channels in slot order so stereo reaches both # speakers, and copy it to the rear channels so no slot stays silent; the link # only takes S16 at 48 kHz. J172 is assumed to match. +# +# Match the Speaker node only. The headphone jack is a second PCM on the same +# card (hw:N,1) that only accepts S32_LE; a card-name match applied this +# format to both, and PipeWire never created the headphones sink. monitor.alsa.rules = [ { matches = [ - { alsa.card_name = "J171 Speakers" } - { alsa.card_name = "J172 Speakers" } + { alsa.card_name = "J171 Speakers", node.name = "alsa_output.platform-sound.HiFi__Speaker__sink" } + { alsa.card_name = "J172 Speakers", node.name = "alsa_output.platform-sound.HiFi__Speaker__sink" } ] actions = { update-props = { diff --git a/system/overlay/etc/wireplumber/wireplumber.conf.d/62-omarchy-a-speaker-name.conf b/system/overlay/etc/wireplumber/wireplumber.conf.d/62-omarchy-a-speaker-name.conf index 07e6a15..5e6aa2c 100644 --- a/system/overlay/etc/wireplumber/wireplumber.conf.d/62-omarchy-a-speaker-name.conf +++ b/system/overlay/etc/wireplumber/wireplumber.conf.d/62-omarchy-a-speaker-name.conf @@ -1,11 +1,10 @@ # The speakers' output keeps ALSA's PCM name as its short name # ("s8000-mca-HiFi HiFi-0"), and the shell's audio menu shows the short name. -# Name it for what it is. The node is the built-in sound card's (the -# simple-audio-card at /sound), with the UCM Speaker device of -# /usr/share/alsa/ucm2/Orchard on every iPad that has one. +# Name it for what it is. Match the UCM Speaker node only; headphones are a +# second output on the same simple-audio-card and must not be named Speakers. monitor.alsa.rules = [ { - matches = [ { node.name = "~alsa_output.platform-sound.*" } ] + matches = [ { node.name = "alsa_output.platform-sound.HiFi__Speaker__sink" } ] actions = { update-props = { node.nick = "Speakers" diff --git a/system/overlay/etc/wireplumber/wireplumber.conf.d/63-omarchy-a-headphones.conf b/system/overlay/etc/wireplumber/wireplumber.conf.d/63-omarchy-a-headphones.conf new file mode 100644 index 0000000..8a3f14e --- /dev/null +++ b/system/overlay/etc/wireplumber/wireplumber.conf.d/63-omarchy-a-headphones.conf @@ -0,0 +1,24 @@ +# The headphone jack on the shared iPad 6 and 7 card is a second PCM +# (hw:N,1): S32_LE, 2ch, 48 kHz. Name it Headphones, and raise its session +# priority above the speakers (WirePlumber ranks PCM 0 at 1000 and PCM 1 at +# 728, so the speakers stay the default even with the jack in). UCM +# PlaybackPriority only ranks routes. While the jack is out, the Headphones +# route is unavailable and this node is skipped. A user-saved default (a +# Bluetooth sink) still wins while it is connected. +monitor.alsa.rules = [ + { + matches = [ + { node.name = "alsa_output.platform-sound.HiFi__Headphones__sink" } + ] + actions = { + update-props = { + node.nick = "Headphones" + audio.format = "S32LE" + audio.rate = 48000 + audio.position = [ FL, FR ] + priority.driver = 1100 + priority.session = 1100 + } + } + } +]