Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume control range problems #75

Open
markwinger opened this issue Nov 15, 2021 · 8 comments
Open

Volume control range problems #75

markwinger opened this issue Nov 15, 2021 · 8 comments

Comments

@markwinger
Copy link

markwinger commented Nov 15, 2021

I am using the stereo audioinjector with OpenAuto pro. (I originally started with a usb audio if and changed to the injector)

After getting it all I chose to use the rca outputs and got it all working but volume control did not work. I tried for days to get softvol to work but was unable to. So I changed to use the headphone output. This worked but the quite right.

At full volume things are good, clean and loud as expected. But as I reduce the volume control, the sound decreases way too quickly. It is completely silent by 60%. I found some discussion about 'base' volume but could not determine how to adjust this. I tried changing volume=merge to volume=ignor. This dropped the point of silence to about 40%, still no great.

Any help appreciated........

@differentieel
Copy link

did you lift the Alsamixer volume slider to 90%?

@markwinger
Copy link
Author

markwinger commented Nov 15, 2021 via email

@differentieel
Copy link

@markwinger
Copy link
Author

That thread is very long and I did not see any discussion relating to my problem. Was it intended to be a suggestion for a fix.

@differentieel
Copy link

in short:

RPi running Raspbian Buster

  1. Edit /boot/config.txt
    Code:
    sudo nano /boot/config.txt

  2. Uncomment these lines (remove the #):
    Code:
    dtparam=i2c_arm=on
    dtparam=i2s=on
    dtparam=spi=on

  3. Comment out this line (add a # at the start):
    Code:
    #dtparam=audio=on

  4. Add the following line just after the one you commented out in the previous step:
    Code:
    dtoverlay=audioinjector-wm8731-audio

  5. Quit and save (ctrl-x, y, enter)

  6. Reboot the pi:

  7. Run alsa mixer:
    Code:
    alsamixer

  8. Scroll across to the one titled 'Output Mixer HiFi' and press 'm' to unmute it. It should now say '00' above it with a green background. Press 'esc' to save and exit.

That should be everything. You can now test that it works with:
Code:
aplay test.wav

@markwinger
Copy link
Author

The only thing different in my setup is I dont have the line
Dtparam=i2s=on, uncommented.

Will this fix the level problem, or enable me to use softvol?

But I am away for the next week so it will be a while before I can try it.

@differentieel
Copy link

the only person that can answer your question is you.

@flatmax
Copy link
Contributor

flatmax commented Nov 23, 2021

I think this may help for softvol : http://forum.audioinjector.net/viewtopic.php@t=572.html

That is from the old audioinjector forum, which can only be searched in google.

Untested, but by editing your .asoundrc file, use a softvol for default :

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

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

You may also need the ctl defined if it gives you troubles :

ctl.!default {
        type hw
        card 0
}

Finally if you get pulse audio funk, make sure you short circuit the pulseaudio defaults placing the following at the top of the ~/.asoundrc file :

@hooks [
    {
        func load
        files [
            "~/.asoundrc"
        ]
        errors false
    }
]

You can see some of that on my stackover answer here : https://stackoverflow.com/questions/34452150/how-to-run-alsa-application-without-killing-pulseaudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants