You are not logged in.

#1 Today 12:36:12

oech3
Member
Registered: 2017-09-03
Posts: 13

How to switch ALSA confing one shot?(about ALSA_CONFIG_PATH)

I need non high quality mixing of sound for few applications.
So I'm trying to use ALSA only and remove any sound servers(pipewire,pulse-native-provider,etc...)

The exclusive setting

#/etc/asound.conf
pcm.!default {
 type hw
 card PCH
}

ctl.!default {
 type hw      
 card PCH
}

is enough for me for almost application. I can enable mixing tempolary by

#~/.asoundrc
pcm.dmixer {
	type dmix
	ipc_key 2048
	slave {
		pcm "hw:PCH"
	}
}

pcm.!default {
	type plug
	slave.pcm dmixer
}

ctl.!default {
	type hw
	card PCH
}

If I need mixing.
I don't want to manage symlink from /pathto/dmix.conf to ./asoundrc frequently. Because I'll forget to remove it.

It seems ALSA_CONFIG_PATH fit for the situation. However, any of

ALSA_CONFIG_PATH=/pathto/dmix.conf chromium
ALSA_CONFIG_PATH=/usr/share/alsa/alsa.conf:/pathto/dmix.conf chromium

failed with

ALSA lib control.c:1575:(snd_ctl_open_noupdate) Invalid CTL hw:0

Including /usr/share/alsa/alsa.conf by https://www.alsa-project.org/alsa-doc/a … hooks.html also fails with

ALSA lib conf.c:4121:(config_file_open) /usr/share/alsa/alsa.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:4043:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:4650:(snd_config_update_r) hooks failed, removing configuration

How to enable dmix one shot?
How to switch ALSA confing one shot?

Offline

Board footer

Powered by FluxBB