Output RCA volume control

Moderator: flatmax

Post Reply
flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Output RCA volume control

Post by flatmax » Sun Mar 19, 2017 8:02 pm

Hi there,

You can control the volume of the headphone jack and input RCA connectors by default using the commandline tools alsamixer or amixer. However if you want to control the RCA line output volume, you would have noticed that you need to use the potentiometers. If however you want to control it from the command line, then this post explains how to setup the softvol plugin to allow you to control the RCA output connector volume from the command line.

The only audio channel which you can't control in the audio chip of this device is the output RCA connectors. If you look at the wm8731 datasheet you can confirm that Wolfson Micro haven't got a volume control in hardware for that audio channel. For that reason we can use ALSA's softvol plugin to control the volume from the command line or alsamixer, as well as the potentiometer.

Reading the information on softvol here, we need to setup out asoundrc file. After setting up (see the file listing below) we can play music to this new device like so :

Code: Select all

aplay -DRCAVolume awesome.track.wav
We can then control the volume using the master control either with amixer, like so :

Code: Select all

amixer set Master 60%
Or we can control the volume using alsamixer.

If you want this type of volume as the default playback device (so that you don't have to use -DRCAVolume as the audio device) it is explained how to do it here : here

For example, save the following as ~/.asoundrc :

Code: Select all

pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 0
}

pcm.RCAVolume {
    type            softvol
    slave.pcm       "default"
    control.name    "Master"
    control.card    0
}
You can now play any track to it using the ALSA device "RCAVolume".

Hope you are enjoying the use of this product.
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

Johnatansef
Posts: 1
Joined: Mon Mar 20, 2017 11:57 pm
Location: Poland
Contact:

RCA volume control

Post by Johnatansef » Tue Mar 21, 2017 4:19 am

I just got the HD 10 - but can't control the volume. It's so low I can barely hear anything. There doesn't seem to be any directions or way to raise the volume. Any suggestions?

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: RCA volume control

Post by flatmax » Tue Mar 21, 2017 8:47 pm

Hi there,
What is an "HD 10" ?

thanks
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

DokG
Posts: 1
Joined: Mon Nov 12, 2018 5:57 am

Re: Output RCA volume control

Post by DokG » Mon Nov 12, 2018 6:09 am

Thanks for the tip. That configuration didn't have any affect for me, but I was able to get it to work using the below content for .asoundrc. I have to control the volume using Softmaster instead of Master (e.g. amixer set Softmaster 50%). According to the softvol plugin docs, you cannot redefine a non-user defined control, which is what I presume Master is (see https://alsa.opensrc.org/Softvol). I assume that's partly why the original configuration caused no change in behavior. To get the default to work right, you have to route it through the RCAVolume device, so then the slave.pcm setting could no longer be "default" because that would cause a loop.

This is my first time reading any of the Alsa documentation or trying to do something like this, so I'm not sure the below is 100% correct but it seems to work for me with my specific hardware/software configuration.

--

pcm.!default {
type plug
slave.pcm "RCAVolume"
}

pcm.RCAVolume {
type softvol
slave.pcm "hw:0,0"
control.name "Softmaster"
control.card 0
}

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests