Closed tonyp7 closed 6 years ago
Thanks for the report, looks like that needs to be fixed. PR?
Unfortunately no, I'm not quite sure what is going wrong. I compiled esp-idf bluetooth speaker example (https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/a2dp_sink) to be sure I don't have an issue specific to my setup but this one compiles with no warnings at all.
I don't know if what I did was right, but that method doesn't exist in the sdk version I have here. The PR I made works for me, anyway.
Now I get this one.
/Users/jimmy/git/ESP32_MP3_Decoder/components/bt_speaker/bt_speaker.c: In function 'bt_av_hdl_stack_evt':
/Users/jimmy/git/ESP32_MP3_Decoder/components/bt_speaker/bt_speaker.c:93:9: error: implicit declaration of function 'esp_a2d_register_data_callback' [-Werror=implicit-function-declaration]
esp_a2d_register_data_callback(bt_app_a2d_data_cb);
^
cc1: some warnings being treated as errors
make[1]: *** [bt_speaker.o] Error 1
Is there a mismatch between the SDK and the latest version? If I drop this latest merge, I can compile.
The latest a2dp sink example from esp-idf 3.0.2 (latest stable release) has both:
esp_a2d_register_callback(&bt_app_a2d_cb); esp_a2d_register_data_callback(bt_app_a2d_data_cb);
Yep, I reverted the change because thats not the issue. It seems the build can't see the a2dp headers, I still don't quite understand why.
Turns out you need to separately enable the A2DP option in the bluetooth component in makeconfig, then it works.
added failsafe to kconfig
So I've been playing with the code mostly using web radio. Today I wanted to try the bluetooth speaker. I downloaded a fresh copy of the code and got this message:
Seems like you can't compile the code anymore with just "make" you have to change the default esp-idf config (under make/project.mk) and set the following gcc flag:
-Wno-error=implicit-function-declaration
And this is a pretty scary flag to include!