Skip to content

Commit

Permalink
78-sound-card.rules: Import ID_PATH early
Browse files Browse the repository at this point in the history
Pipewire requires ID_PATH to use the same device names as with systemd's
udev. Some rules, such as the ones in asahi-audio [1] use those names, and
fail if they don't match [2].

On systemd's udev this is instead imported in 71-seat.rules, which we don't
have.

[1]: https://github.com/AsahiLinux/asahi-audio
[2]: AsahiLinux/asahi-audio#16

Signed-off-by: Johannes Nixdorf <[email protected]>
  • Loading branch information
mixi committed Dec 22, 2023
1 parent ddfdf86 commit 917ae64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/78-sound-card.rules
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ KERNEL!="card*", GOTO="sound_end"
ENV{SOUND_INITIALIZED}="1"

IMPORT{builtin}="hwdb"
IMPORT{builtin}="path_id"

SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
SUBSYSTEMS=="usb", GOTO="skip_pci"

Expand All @@ -62,8 +64,6 @@ LABEL="skip_pci"
ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}"
ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}"

IMPORT{builtin}="path_id"

# The values used here for $SOUND_FORM_FACTOR and $SOUND_CLASS should be kept
# in sync with those defined for PulseAudio's src/pulse/proplist.h
# PA_PROP_DEVICE_FORM_FACTOR, PA_PROP_DEVICE_CLASS properties.
Expand Down

0 comments on commit 917ae64

Please sign in to comment.