this post was submitted on 20 Dec 2023
21 points (81.8% liked)

Technology

59322 readers
5106 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

might be helpful to someone so here we are cross-posted from: https://lemmy.ml/post/9547307

so since I digged pretty hard to find what is a ucm profile and how to seperate headphones from speakers in pipewire and alsa so yeah heres a guide first of all these are my sources:

https://github.com/luisbocanegra/linux-guide-split-audio-ports https://www.reactivated.net/writing_udev_rules.html https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3556 https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3552

you need a custom ucm profile use this command since its helpful lspci -nn -vvv

SUBSYSTEM!="sound", GOTO="pipewire_end"
ACTION!="change", GOTO="pipewire_end"
KERNEL!="card*", GOTO="pipewire_end"

ATTRS{subsystem_vendor}=="0x103c", ATTRS{subsystem_device}=="0x8742", ENV{ACP_PROFILE_SET}="custom.conf"

LABEL="pipewire_end"

and than create a file in /usr/share/alsa-card-profile/mixer/profile-sets/custom.conf and yeah I guess

https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/

and this especially

https://github.com/luisbocanegra/linux-guide-split-audio-ports

they helped a lot

[General]
auto-profiles = yes

[Mapping headphones]
device-strings= hw:0,2
channel-map = left,right
paths-output = behe-headphones
paths-input = analog-input-headphone-mic analog-input-headset-mic
priority = 20

[Mapping speaker]
device-strings= hw:0,0
channel-map = left,right
paths-output = behe-speaker
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
priority = 18

[Profile help]
input-mappings = speaker headphones
output-mappings = speaker headphones
description = both_both_is_good
skip-probe = yes
priority = 100

.include 9999-custom.conf

and yes that was my custom.conf and yes just reboot now and you are set btw no need to touch hdajackretask and that idor 0,2 and 0,0 I just switched profile to proaudio and than ran pactl list sinks short and took the ids from there I am basically following the guides and mimicking /usr/share/alsa-card-profile/mixer/profile-sets/default.conf to be completely honest yes thats all

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 3 points 10 months ago* (last edited 10 months ago) (1 children)

Okay, so you're splitting these up into control profiles, but why wouldn't you just use pavucontrol if your goal is simplified and isolated control over each device with apps requesting sink access?

[โ€“] [email protected] 3 points 10 months ago

I want to for exemple even when my headphones are plugged have the ablility to play audio through my speakers using qpwgraph and stuff like that its just a cool little thing I wanted to do also you can't do that in pavucontrol natively when you plug in headphones its as if your speaker doesn't exist you can't for example play the same audio on your headphones and speakers at the same time or play different audio its relatively niche kinda thing but its handy for the few times I needed it to be honest