Bluetooth Audio to DAC
Posted: Sun Nov 22, 2020 12:12 pm
Hello,
i want to upgrade my car radio with bluetooth for music streaming. I already got the mC ready to simulate the old cassette hardware, so i can control the music (play/prev/next/pause) with the radio.
Now it comes to the audio part and it sounds horrible. My test-speaker is not the best, but the FM audio sounds much better than the bluetooth audio. I know that the 8bit onboard DAC can not produce perfect results, but in my ears it sounds like clipping. So i guess/hope it is just some configuration problem.
I made an example project to simplify things. There is only the bt a2dp sink connection and a speaker connected to PIN 25 and GND. You can see the code here: https://git.rwth-aachen.de/carstenf/esp ... o_Test.ino
It should be easy to reproduce the problem.
i also added a audio sample. I recorded it with my smartphone, so it's not direct measured from the output pins.
so far i tried to change the bits_per_sample value and it changed the output result. But the lowest accepted value is 16Bit. I thought that 8 may be a better choice since it is a 8bit DAC, but it does not work with 8bit (error on i2s install).
I'm using Visual Studio 2019 with Vmicro and Arduino to write my programs in case this is an important information.
Can someone help me with this problem?
i want to upgrade my car radio with bluetooth for music streaming. I already got the mC ready to simulate the old cassette hardware, so i can control the music (play/prev/next/pause) with the radio.
Now it comes to the audio part and it sounds horrible. My test-speaker is not the best, but the FM audio sounds much better than the bluetooth audio. I know that the 8bit onboard DAC can not produce perfect results, but in my ears it sounds like clipping. So i guess/hope it is just some configuration problem.
I made an example project to simplify things. There is only the bt a2dp sink connection and a speaker connected to PIN 25 and GND. You can see the code here: https://git.rwth-aachen.de/carstenf/esp ... o_Test.ino
It should be easy to reproduce the problem.
i also added a audio sample. I recorded it with my smartphone, so it's not direct measured from the output pins.
so far i tried to change the bits_per_sample value and it changed the output result. But the lowest accepted value is 16Bit. I thought that 8 may be a better choice since it is a 8bit DAC, but it does not work with 8bit (error on i2s install).
I'm using Visual Studio 2019 with Vmicro and Arduino to write my programs in case this is an important information.
Can someone help me with this problem?