From 4694b48b7b14e6a57742f35343c68e59b55e505c Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 22 Aug 2023 21:05:20 +0300 Subject: [PATCH] alsa-card-profiles: simplify adding custom profiles It is sometimes useful to add a custom profile-set. For that, e.g. `default.conf` needs to be modified. (at least, i have not succeeded in just adding a new file) But that change gets overridden when the package is updated, which could be *extremely* dangerous, e.g. if said profile changed the `volume-limit`. By shipping an "empty" `9999-custom.conf`, the update becomes less problematic, because one can now use e.g. `dpkg-divert` on said file. Refs. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050293 --- .../alsa/mixer/profile-sets/9999-custom.conf | 22 +++++++++++++++++++ .../alsa/mixer/profile-sets/default.conf | 6 +---- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 spa/plugins/alsa/mixer/profile-sets/9999-custom.conf diff --git a/spa/plugins/alsa/mixer/profile-sets/9999-custom.conf b/spa/plugins/alsa/mixer/profile-sets/9999-custom.conf new file mode 100644 index 000000000..df1838d75 --- /dev/null +++ b/spa/plugins/alsa/mixer/profile-sets/9999-custom.conf @@ -0,0 +1,22 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +; Put your custom profiles here. + +; An example for defining multiple-sink profiles +#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo] +#description = Foobar +#output-mappings = analog-stereo iec958-stereo +#input-mappings = analog-stereo diff --git a/spa/plugins/alsa/mixer/profile-sets/default.conf b/spa/plugins/alsa/mixer/profile-sets/default.conf index f0c9d2a2b..f66a94534 100644 --- a/spa/plugins/alsa/mixer/profile-sets/default.conf +++ b/spa/plugins/alsa/mixer/profile-sets/default.conf @@ -573,8 +573,4 @@ fallback = yes priority = 1 direction = input -; An example for defining multiple-sink profiles -#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo] -#description = Foobar -#output-mappings = analog-stereo iec958-stereo -#input-mappings = analog-stereo +.include 9999-custom.conf