0

Sorry if this is a silly question but Is there a way to have an independent gain audio signal from a Raspberry Pi that does not vary with the software volume control?

I am trying to get a constant signal for WLED running on a Arduino for synchronizing sound to light for a Juke Box I am making for my son.

I have a Raspberry Pi 2/3 with DAC+ audio board which I play MP3's through via the excellent Fruit box Jukebox software into a hi-fi amplifier. Using a touch screen, the volume change is controlled through the software NOT the hi-fi amplifier.

At the moment, I have the audio going into the Arduino by feeding a split RCA signal from the Raspberry's DAC Card. I am guessing this is what I need to change.

I am looking for a solution to be able to take the audio signal to operate & synchronize sound to light, but so far I have not been able to get a signal from the Raspberry that does not vary with the volume change on the player. Having set up WLED and get it working great, until you change the volume output then you have to adjust the gain of WLED on the Arduino to get the effect to work correctly again.

I have tried taping into the RCA and of course that signal level changes with the change in volume. I tried and made up a AGC circuit but of course that does not help, it just compresses the signal so still varies according to the volume setting.

I am hoping to get a solution that the lighting effect will stay constant whether at whisper volume, or window rattling volume so an independent constant volume being fed to the Arduino.

I hope I have explained that sufficiently.

So in a nut shell, Is there a way to get an audio stream not effected by volume changes either from the Raspberry or the DAC Audio board i.e. Raspberry to send a volume independent stream to the Arduino? I could not see any GPIO solution. OR can an independent audio be simultaneously sent through GPIO or Headphone socket that will not be effected by the software volume control?

Any one got any ideas? Hardware or software solution.

I considered a software solution to monitor the input to the Arduino and use math's to keep things sort of constant, but I do not know how to use that solution with the WLED program. (I am a novice when it comes to programming but can sometimes find a way to hack my way through things with Python or Arduino code.)

Any alternative ideas also gratefully considered.

1 Answer 1

0

One hardware solution is to use a soundcard with an output which is not effected by software ALSA mixer type of volume changes. In this approach, the sound is output at the full scale amplitude without the audio codec altering its level.

One example sound card which has this feature is the Audio Injector Stereo and Zero sound cards. These sound cards use the WM8731 audio codec which has both a headphones and line level (RCA level) output. The audio mixer fabric on the WM8731 codec does not effect the line level RCA output, it only effects the headphone output. In this way, the audio is output without altering its level over the RCA lines even when the ALSA mixer subsystem has its volume changed.

1
  • Thank you, I will investigate that option.
    – Markal
    Feb 2 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.