I am using the 3.5mm headphone jack with a pair of Logitech speakers (Z150) for audio feedback when doors open or family members enter the house. Everything is running Hass.io on a RPi3.
Although everything works as expected, I hear a constant and terrible static noise. On multiple forums, I read that users are addressing the issue by adding the following to /boot/config.txt
disable_audio_dither=1
audio_pwm_mode=2
@pvizeli, @balloob, is this something that could be tested on the next update of Hass.io? Perhas, do you have other suggestions to address this problem ?
The problem I had was that I wasn’t sure how to access the config.txt file. After further research, I dug into the Resin.io documentation and ended up on this : https://docs.resin.io/reference/resinOS/advanced/#raspberry-pi. I added the audio_pwm_mode=2 , restarted and the problem seems solved.
Added my sound files to config/www directory. Note that I had to create the www directory. At that point you files should be available at : http://192.168.10.217:8123/local/yourFileName
Finally, I adjusted my automations (automation.yaml) to play a sound based on what I wanted to achieve
Once you have uploaded your audio files to config/www/, you will be able to use 192.168.86.85:8123/local/goodnight.mp3 in your automation as per the example above.
Sorry to use an old thread but I am ussing hassio and the headphone output on a RPI3, but adding both lines of code to config.txt did not solve the issue. The audio trough HDMI works perfectly.
EDIT: My fault, it was the audio cable which was adding a huge static noise. Solved adding a audio splitter (two outputs) between the raspberry and the audio cable.
Hi Christophe,
Can you please explain with a little more detail how exactly you managed to get access to config.txt? Did you use the media on another host and mount the boot partition?
Thx!
still editing the contents of /mnt/boot/config.txt seems to be a popular way of setting boot options on the RPi no matter what the Linux flavor.
Any idea if these can be set at runtime or should I shutdown, mount media on a different host…etc?