Closed maks closed 9 months ago
@maks 10 is what was there. This is unfortunately a hardware limitation and I think that it varies widely between headphones and line level. I think we need to test this further and decide what route to take, can see multiple options:
@maks @democloid You need to do in the project window - master volume, and set the volume to 50%, I think that will get rid of the problem temporarily, a lot of people. But it would be more convenient to make a mixer. However, as a temporary solution, make only master volume control.
@RAWJUNGLE I'm well aware that we could simply left/right shift the 16bit values to control the volume, but that's not ideal as we are losing accuracy in the actual output data going to the DAC, so that's a last resort.
@democloid So I did a little bit of research on this. So according to docs, Line Out is supposed to go into other equipment (with it's own amps) so those inputs are expected to be high impedance so the line out sec only needs to drive a low current for the required voltage range. But my (na d most) headphones are the opposite: low impedance, so normally a headphone out needs an amp to be able to drive them with sufficient volume (I still at least remember my v=ir from school 😅).
But strangely what we are seeing is the opposite, high volume when going into a low impedance headphones. Unfortunately I don't have a fancy pair of high impedance headphones to test this with (and I probably wouldn't want to test with super expensive headphones anyways I guess 😂)
Also doing a quick read of the PCM5102 data sheet shows that it's a pretty basic DAC but does show it has "advanced mute control" hooked up to "analog mute" blocks on the line out but the data sheet talks about that being for muting in undervoltage protection, not something for output control :-(
Anyways the current behaviour leaves me very confused on what's going on...
Yes here we go, it's 2V into 10kohm!
No way my earbuds are 10kohm 😂
So more data sheet reading gives:
surpasses all other charge-pump based line drivers by supporting loads down to 1kΩ.
I looked up the rating on my old Sony 1000mx3's and it says they are 16ohm passive mode, 47ohm in active mode.
But I've now found this on SO: https://electronics.stackexchange.com/a/218336/9898
which helps explain I think what's happening, headphones only need a relatively small amount of current so no wonder the lineout can drive headphones very hard.
So tl;dr this is the best quality solution for now: https://www.jaycar.com.au/stereo-in-line-volume-control/p/AA2004
@democloid I guess adding a pot on the output would be another nice enhancement for a v2 PCB but I think you're ahead of me and already told me that 🙂
After discussions with @democloid the way forward here is to use 32bit samples via i2s to allow scaling the output volume cleanly, as 32bits gives a huge dynamic range for us to work with to control output volume without losing any noticeable quality.
Currently the output volume seems to be very high at the moment and the master volume setting stops at a value of 10 not 0.
I'm not across I2S or how the PCM5102 is controlled, but I guess either the actual audio data sent via I2S needs to be made lower or there is some sort of control of the PCM5102 on board amplifier?
In regards to the master volume UI @democloid did you set the min to 10 or is that legacy from Lgpt?