I have my RPI3 connected to a pair of Edifier S1000 speakers through a device that extracts the audio from the HDMI signal and sends it to the speakers through an optical cable.
The sound is clearly better than using the analogue signal from the Chinese PiFi DAC+ card that I used before, but I would like to have the raw audio signal sent directly to the speakers, untouched by the mixer, and so far I was not able to do that.
The first thing I noticed when I heard my first song was that the sound was clearly distorted (clipped) whenever the music was loud enough. I found out that when the volume is at 100% there is a 4 decibel gain. Why? I mean this is a digital output, what do we get by increasing the volume? So, I went to alsamixer and found out that reducing the volume to 86% would give me approximately 0 decibels gain (EDIT: actually it is better to use amixer cset numid=1 0
more precise in getting to 0dB). That took care of the clipping, but I don't want a mixer to change the audio signal. My speakers include a digital amplifier which is the best way to control the volume.
What I have done so far: I included in /boot/config.txt
no_hdmi_resample=1
hdmi_stream_channels=1
hdmi_force_edid_audio=1
In audacious I selected as output:
hw:CARD=ALSA,DEV=1
Also, in the file /var/lib/alsa/asound.state we can see the dbmax 400 value (I tried to change this value to 0 but it just gets restored on reboot).
state.ALSA {
control.1 {
iface MIXER
name 'PCM Playback Volume'
value 6
comment {
access 'read write'
type INTEGER
count 1
range '-10239 - 400'
dbmin -9999999
dbmax 400
dbvalue.0 6
}
}
Is there any way to, in order of preference:
- skip the alsa mixer completely,
- make the mixer not change the sound data,
- or at least to set the dbmax to 0?
Thanks!