hadess / CHIP-bluetooth-speaker

Turn a CHIP into a Bluetooth speaker
53 stars 13 forks source link

Noise even when playing #5

Closed hadess closed 7 years ago

hadess commented 8 years ago

There's a bit of noise in the background both when playing and not playing anything. It might be a hardware shielding problem.

bafoed commented 7 years ago

From http://stackoverflow.com/questions/38343909/pulseaudio-static-noise-for-10-minutes-after-boot:

The C.H.I.P. from NextThing has a 3.5mm TRRS jack, which does not only output stereo audio but component video as well. Now if you plug in a standard 3.5mm jack, the ground pin does does interfere with the component video connector. Thats why there was this humming noise on the audio output. And thats why it disappeared exactly after 10mins, because the screen idle time is 10min, I think.

Composite video can be disabled using kernel command line argument video=none, this must be done from the U-Boot bootloader ("bootargs" environment variable), so you need UART connection to perform that.

hadess commented 7 years ago

I tried turning off the video with a console tool with setterm as per https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling#DPMS_interaction_in_a_Linux_console_with_setterm but that didn't fix the problem.

I guess I could test with video=none in case that fixes the problem. Which should be possible to achieve in script: https://bbs.nextthing.co/t/u-boot-2016-01-00088-g99c771f/11642/2

duckexmachina commented 7 years ago

try this http://docs.getchip.com/chip.html#microphone-and-audio-input it solved the problem for me

duckexmachina commented 7 years ago

meaning that you need to cut that trace. it will stop the noise (and is reversible)

hadess commented 7 years ago

I'd likely try software solutions before hardware ones ;)

duckexmachina commented 7 years ago

its a known issue/feature of the hardware. alternatively, use a four connector TRRS pin

bafoed commented 7 years ago

@hadess I've added video=none to bootargs without UART using tutorial by your link and it's working, there isn't noise even while system booting. Thanks!

hadess commented 7 years ago

Great, I'll integrate that into the script and test.

its a known issue/feature of the hardware. alternatively, use a four connector TRRS pin

The video is the last ring, so this shouldn't be such a problem: http://docs.getchip.com/chip.html#monitor

I guess that the last ring touches the sleeve connection in the socket, which is what causes those problems.

bafoed commented 7 years ago

@hadess I've tested with different sound files and noted that there are some scratch sounds when playing music with low frequencies.

I've fixed it by editing /etc/pulse/daemon.conf (uncomment rows and change values): default-sample-rate = 48000 resample-method = trivial

After reboot all works as expected.