My first post here, so let me start by saying how much I like DietPi. Perfect for a “linux hobbyist” like myself.
I am an audio DIYer making a few very high resolution USB DACs (for myself and family only). I want to control (and sometimes stream-to) the DAC using the RPi and I’m now working on the system controls, which include I2C control of DAC chip registers. Squeezelite in DietPi is sounding very good! I have a specific question and a more general question, but they need a bit of background.
Background:
This DAC must be galvanically isolated so I have made my own RPi hat with all of the needed regulators and isolators to keep any noise from the RPi away from the circuits that touch the I2S stream. The USB front-end that makes the I2S stream is a galvanically isolated USB interface - http://jlsounds.com/i2soverusb.html. Now, my immediate goal is to control music volume using the DAC chip (which I know how to do via I2C), but I want the volume control within the squeezelite player interface to indicate the desired volume level.
My specific question:
I have successfully used the ‘-V Digital’ option in squeezelite plus a ‘softvol’ plug in ALSA to control volume. [It works, but the signal quality obviously suffers.] Even though this works, I can’t read the true volume setting using ‘amixer’. It always reports as 100% even when system volume is much lower.
root@DietPi:/# amixer -c 1 sget 'Digital'
Simple mixer control 'Digital',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 255
Front Left: 255 [100%]
Front Right: 255 [100%]
So, how do I find the true working value of ‘Digital’ as set by Squeezelite?
My general question:
Is there a better way overall to have convenient control of music volume? If I could write my own ‘sound card code’, could I get access to the squeezelite ‘Digital’ volume parameter? Remember, I don’t want ALSA nor Squeezelite to actually attenuate my signal - I will program the DAC chip (ES9038PRO) to do that. All I want Is to somehow ‘read’ Squeezelite’s volume setting without it being applied in the usual way. I will then use that value in a different program that I will write. Within DietPi, I can’t find nor edit the ‘sound card’ configuration files. Would working at the level of sound card configuration offer any advantages? If so, can someone point me the right direction?
That’s it - Thanks for reading and I greatly appreciate any and all suggestions!