You are not logged in.

#1 2020-10-14 14:56:43

icar
Member
Registered: 2020-07-31
Posts: 29

alsa-card-profile overwrites existing configurations

I have a laptop which needs a modification in /usr/share/alsa-card-profile/mixer/paths/analog-output.conf.common to have its 4-speakers system working correctly. An ASUS ZenBook UX431DA.
So far so good, but with the package alsa-card-profile, which replaced another one that used to be where all the .common file were not long ago, now every time it updates, all the files in that path get overwritten:

ll /usr/share/alsa-card-profile/mixer/paths/

.rw-r--r-- 1,4k root 13 d’oct. 14:10 analog-input-aux.conf
.rw-r--r-- 2,2k root 13 d’oct. 14:10 analog-input-dock-mic.conf
.rw-r--r-- 1,4k root 13 d’oct. 14:10 analog-input-fm.conf
.rw-r--r-- 2,2k root 13 d’oct. 14:10 analog-input-front-mic.conf
.rw-r--r-- 2,3k root 13 d’oct. 14:10 analog-input-headphone-mic.conf
.rw-r--r-- 2,4k root 13 d’oct. 14:10 analog-input-headset-mic.conf
.rw-r--r-- 2,8k root 13 d’oct. 14:10 analog-input-internal-mic-always.conf
.rw-r--r-- 3,2k root 13 d’oct. 14:10 analog-input-internal-mic.conf
.rw-r--r-- 2,6k root 13 d’oct. 14:10 analog-input-linein.conf
.rw-r--r-- 1,5k root 13 d’oct. 14:10 analog-input-mic-line.conf
.rw-r--r-- 2,8k root 13 d’oct. 14:10 analog-input-mic.conf
.rw-r--r-- 1,3k root 13 d’oct. 14:10 analog-input-mic.conf.common
.rw-r--r-- 2,2k root 13 d’oct. 14:10 analog-input-rear-mic.conf
.rw-r--r-- 1,4k root 13 d’oct. 14:10 analog-input-tvtuner.conf
.rw-r--r-- 1,4k root 13 d’oct. 14:10 analog-input-video.conf
.rw-r--r-- 2,1k root 13 d’oct. 14:10 analog-input.conf
.rw-r--r-- 5,8k root 13 d’oct. 14:10 analog-input.conf.common
.rw-r--r-- 2,1k root 13 d’oct. 14:10 analog-output-headphones-2.conf
.rw-r--r-- 3,2k root 13 d’oct. 14:10 analog-output-headphones.conf
.rw-r--r-- 4,0k root 13 d’oct. 14:10 analog-output-lineout.conf
.rw-r--r-- 2,0k root 13 d’oct. 14:10 analog-output-mono.conf
.rw-r--r-- 3,7k root 13 d’oct. 14:10 analog-output-speaker-always.conf
.rw-r--r-- 4,6k root 13 d’oct. 14:10 analog-output-speaker.conf
.rw-r--r-- 1,9k root 13 d’oct. 14:10 analog-output.conf
.rw-r--r--  11k root 14 d’oct. 16:36 analog-output.conf.common
.rw-r--r--  193 root 13 d’oct. 14:10 hdmi-output-0.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-1.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-2.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-3.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-4.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-5.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-6.conf
.rw-r--r--  195 root 13 d’oct. 14:10 hdmi-output-7.conf
.rw-r--r--  789 root 13 d’oct. 14:10 iec958-stereo-input.conf
.rw-r--r--  712 root 13 d’oct. 14:10 iec958-stereo-output.conf
.rw-r--r-- 1,1k root 13 d’oct. 14:10 steelseries-arctis-output-chat-common.conf
.rw-r--r-- 1,1k root 13 d’oct. 14:10 steelseries-arctis-output-game-common.conf
.rw-r--r-- 1,3k root 13 d’oct. 14:10 usb-gaming-headset-input.conf
.rw-r--r-- 1,3k root 13 d’oct. 14:10 usb-gaming-headset-output-mono.conf
.rw-r--r-- 1,4k root 13 d’oct. 14:10 usb-gaming-headset-output-stereo.conf

In particular, I need to modify for each update the analog-output.conf.common adding before the [Element PCM] block the following:

[Element Master]
switch = mute
volume = 100

I can chattr +i but that would only show errors when updating with pacman and could introduce more errors in the future.

How can I manage this?

Offline

#2 2020-10-14 15:03:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,831

Re: alsa-card-profile overwrites existing configurations

Create a new file with your modification and then add a udev rule corresponding to your device that loads this additional configuration, look at the existing rules in /usr/lib/udev/rules.d/90-pulseaudio.rules for inspiration/explanation of how you can apply your custom profile for your particular device.

Offline

Board footer

Powered by FluxBB