Stable: 2.5.2
Development: 2.6-alpha3
I suspect that this may be a hardware problem, since I am using an output that has no volume control, and I had to add a softvol for it in ~/.asoundrc.
First off, I normally use jack for music, but I also have voicemail files to play which are 8 kHz wav, and sound much clearer using alsa rather than jack.
The problem I'm finding is trying to work out the correct ALSAMixers to use.
I have "ALSADevice = default" and my ~/.asoundrc has default routed
to a Loopback, and then to jack and out through S/PDIF digital to the amp and speakers.
The main mixer is named Softvol0, which is the one I added to the digital output in ~/.asoundrc.
What I would like is to use that as a second mixer and have an extra
software mixer for the first/main mixer. I can get one named 'Soft' in moc using:
ALSAMixer1 = PCM
ALSAMixer2 = Softvol0
But, however I order those, Softvol0 is *always* the first one
showing, and I must press 'x' twice to get to 'Soft' which is a bit
strange. I don't want to use Softvol0 as the main mixer in moc because it controls all the sound output level.
'Master' controls the analogue speaker outputs, and so has no effect on S/PDIF at all.
Extra info:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: D2X [Xonar D2X], device 0: Multichannel [Multichannel]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: D2X [Xonar D2X], device 1: Digital [Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 9: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 9: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 1/1
Subdevice #0: subdevice #0
Some relevant bits of ~/.asoundrc:
pcm.!default {
type plug
slave.pcm "asoftvol"
}
pcm.asoftvol {
type softvol
slave.pcm "amix"
control.name "OUT"
min_dB -51.0
max_dB 15.0
}
pcm.amix {
type dmix
ipc_key 196101
slave.pcm "hw:Loopback"
}
pcm.cloop {
type hw
card Loopback
device 1
subdevice 0
format S16_LE
}
pcm.digi0 {
type softvol
min_dB -51.0
control { name "Softvol0 Playback Volume" card 0 }
slave.pcm "plug:equal"
# slave.pcm "hw:0,0"
}
Anyone have any ideas how to make the 'Soft' volume the first/main mixer in moc, and have Softvol0 as the secondary?
tomaszg
Sat, 2020-10-03 02:19
Permalink
You can't without modifying
You can't without modifying MOC source code. However the change itself is very trivial. If I remember correctly, you need to change the line in audio.c
static int current_mixer = 0;
to
static int current_mixer = 2;
I didn't check it now.