feat(abs): improve audio abstraction.

This commit is contained in:
Alexandre Pujol 2023-11-24 18:17:26 +00:00
parent ef1023156e
commit cd1de59aad
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
7 changed files with 8 additions and 18 deletions

View File

@ -1,10 +1,13 @@
# apparmor.d - Full set of apparmor profiles # apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2022 Mikhail Morfikov # Copyright (C) 2020-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
/usr/share/sounds/ r,
# PulseAudio module-ladspa-sink (plugin sc4m_1916) # PulseAudio module-ladspa-sink (plugin sc4m_1916)
/usr/lib/ladspa/ r, @{lib}/ladspa/ r,
/usr/lib/ladspa/*.so mr, @{lib}/ladspa/*.so mr,
@{run}/udev/data/+sound:card@{int} r,
@{sys}/class/ r,
@{sys}/class/sound/ r,

View File

@ -58,12 +58,10 @@ profile pipewire-media-session @{exec_path} {
owner @{run}/user/@{uid}/pipewire-[0-9]* rw, owner @{run}/user/@{uid}/pipewire-[0-9]* rw,
@{run}/udev/data/+sound:card@{int} r, # For sound
@{run}/udev/data/c116:@{int} r, # for ALSA @{run}/udev/data/c116:@{int} r, # for ALSA
@{run}/systemd/users/@{uid} r, @{run}/systemd/users/@{uid} r,
@{sys}/class/sound/ r,
@{sys}/class/video4linux/ r, @{sys}/class/video4linux/ r,
@{sys}/devices/**/sound/**/uevent r, @{sys}/devices/**/sound/**/uevent r,
@{sys}/devices/pci[0-9]*/**/modalias r, @{sys}/devices/pci[0-9]*/**/modalias r,

View File

@ -180,13 +180,11 @@ profile pulseaudio @{exec_path} {
@{run}/systemd/users/@{uid} r, @{run}/systemd/users/@{uid} r,
@{run}/udev/data/+pci:* r, @{run}/udev/data/+pci:* r,
@{run}/udev/data/+sound:card@{int} r, # For sound
@{run}/udev/data/c116:@{int} r, # for ALSA @{run}/udev/data/c116:@{int} r, # for ALSA
@{run}/udev/data/c23[4-9]:@{int} r, # For dynamic assignment range 234 to 254 @{run}/udev/data/c23[4-9]:@{int} r, # For dynamic assignment range 234 to 254
@{run}/udev/data/c24[0-9]:@{int} r, @{run}/udev/data/c24[0-9]:@{int} r,
@{run}/udev/data/c25[0-4]:@{int} r, @{run}/udev/data/c25[0-4]:@{int} r,
@{sys}/class/sound/ r,
@{sys}/devices/**/sound/**/{uevent,pcm_class} r, @{sys}/devices/**/sound/**/{uevent,pcm_class} r,
@{sys}/devices/virtual/dmi/id/{bios_vendor,board_vendor,sys_vendor} r, @{sys}/devices/virtual/dmi/id/{bios_vendor,board_vendor,sys_vendor} r,

View File

@ -72,14 +72,12 @@ profile mpv @{exec_path} {
owner @{PROC}/@{pid}/task/ r, owner @{PROC}/@{pid}/task/ r,
@{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad @{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad
@{run}/udev/data/+sound:* r,
@{run}/udev/data/c13:@{int} r, # for /dev/input/* @{run}/udev/data/c13:@{int} r, # for /dev/input/*
@{run}/udev/data/c116:@{int} r, # for ALSA @{run}/udev/data/c116:@{int} r, # for ALSA
@{sys}/bus/ r, @{sys}/bus/ r,
@{sys}/class/ r, @{sys}/class/ r,
@{sys}/class/input/ r, @{sys}/class/input/ r,
@{sys}/class/sound/ r,
@{sys}/devices/**/input/**/capabilities/* r, @{sys}/devices/**/input/**/capabilities/* r,
@{sys}/devices/**/input/**/uevent r, @{sys}/devices/**/input/**/uevent r,
@{sys}/devices/**/sound/**/capabilities/* r, @{sys}/devices/**/sound/**/capabilities/* r,

View File

@ -163,7 +163,6 @@ profile steam @{exec_path} flags=(attach_disconnected,mediate_deleted,complain)
owner /tmp/steam_chrome_shmem_uid@{uid}_spid@{int} rw, owner /tmp/steam_chrome_shmem_uid@{uid}_spid@{int} rw,
@{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad @{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad
@{run}/udev/data/+sound* r,
@{run}/udev/data/+pci:* r, @{run}/udev/data/+pci:* r,
@{run}/udev/data/c13:@{int} r, # for /dev/input/* @{run}/udev/data/c13:@{int} r, # for /dev/input/*
@ -180,7 +179,6 @@ profile steam @{exec_path} flags=(attach_disconnected,mediate_deleted,complain)
@{sys}/class/hidraw/ r, @{sys}/class/hidraw/ r,
@{sys}/class/input/ r, @{sys}/class/input/ r,
@{sys}/class/net/ r, @{sys}/class/net/ r,
@{sys}/class/sound/ r,
@{sys}/devices/**/input@{int}/ r, @{sys}/devices/**/input@{int}/ r,
@{sys}/devices/**/input@{int}/capabilities/* r, @{sys}/devices/**/input@{int}/capabilities/* r,
@{sys}/devices/**/input/input@{int}/ r, @{sys}/devices/**/input/input@{int}/ r,

View File

@ -190,7 +190,6 @@ profile steam-game @{exec_path} flags=(attach_disconnected) {
owner /tmp/pressure-vessel-*/{,**} rwl, owner /tmp/pressure-vessel-*/{,**} rwl,
@{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad @{run}/udev/data/+input:input@{int} r, # for mouse, keyboard, touchpad
@{run}/udev/data/+sound* r,
@{run}/udev/data/c13:@{int} r, # for /dev/input/* @{run}/udev/data/c13:@{int} r, # for /dev/input/*
@{run}/udev/data/c116:@{int} r, # for ALSA @{run}/udev/data/c116:@{int} r, # for ALSA
@ -203,7 +202,6 @@ profile steam-game @{exec_path} flags=(attach_disconnected) {
@{sys}/class/ r, @{sys}/class/ r,
@{sys}/class/hidraw/ r, @{sys}/class/hidraw/ r,
@{sys}/class/input/ r, @{sys}/class/input/ r,
@{sys}/class/sound/ r,
@{sys}/devices/**/input@{int}/ r, @{sys}/devices/**/input@{int}/ r,
@{sys}/devices/**/input@{int}/**/{vendor,product} r, @{sys}/devices/**/input@{int}/**/{vendor,product} r,
@{sys}/devices/**/input@{int}/capabilities/* r, @{sys}/devices/**/input@{int}/capabilities/* r,

View File

@ -46,7 +46,6 @@ profile wireplumber @{exec_path} {
@{run}/systemd/users/@{uid} r, @{run}/systemd/users/@{uid} r,
@{run}/udev/data/+sound:card@{int} r, # For sound
@{run}/udev/data/c14:@{int} r, # Open Sound System (OSS) @{run}/udev/data/c14:@{int} r, # Open Sound System (OSS)
@{run}/udev/data/c81:@{int} r, # For video4linux @{run}/udev/data/c81:@{int} r, # For video4linux
@{run}/udev/data/c116:@{int} r, # For ALSA @{run}/udev/data/c116:@{int} r, # For ALSA
@ -59,8 +58,6 @@ profile wireplumber @{exec_path} {
@{sys}/bus/ r, @{sys}/bus/ r,
@{sys}/bus/media/devices/ r, @{sys}/bus/media/devices/ r,
@{sys}/class/ r,
@{sys}/class/sound/ r,
@{sys}/devices/**/device:*/**/path r, @{sys}/devices/**/device:*/**/path r,
@{sys}/devices/**/sound/**/pcm_class r, @{sys}/devices/**/sound/**/pcm_class r,
@{sys}/devices/**/sound/**/uevent r, @{sys}/devices/**/sound/**/uevent r,