Arduino Audiokit HAL (support for ES7148, ES7210, ES7243, ES8311, ES8347, ES8388, TAS5805M, AI-Thinker)

Overview

Arduino AudioKit HAL

There are different ESP32 AudioKit boards available that can be programmed with the Espressif ADF Framework.

Audio Kit

The ADF Framework contains an abstraction layer to support different CODEC chips. Unfortunately ADF can not be used in Arduino, but it would be quite useful to have this functionality also available.

Because I wanted to have a proper support of the AudioKit for my Arduino Audio Tools library and since my Audio Tools are header only, I decided to provide this functionality in a separate project.

I converted the audio_boards and their related drivers into an Arduino Library and provide an easy to use C++ class which configures both the CODEC and I2S. I also tried to abstract away all ESP32 specific funcationality.

So with this project it should now get quite easy to use these boards also in Arduino.

Configuration

You can define your board and the default settings in the AudioKitSettings.h file.

 * @brief AUDIOKIT_BOARD selects a specic board:
 * 1) lyrat_v4_3
 * 2) lyrat_v4_2
 * 3) lyrat_mini_v1_1
 * 4) esp32_s2_kaluga_1_v1_2
 * 5) ai_thinker_v2_2
 * 6) generic_es8388
 */

#define AUDIOKIT_BOARD 1

Here the lyrat v3.4 has been selected.

Example Sketch

Here is an example sketch that writes audio data to the audio kit board via I2S. By default I2S is set up as master and the codec as slave, the sample size is 16 bits and the sample rate is 44.1k/sec - if you did not change the default settings.

You can adjust these parameters by setting your requested values in the cfg below:

#include "AudioKit.h"
#include "SineWaveGenerator.h"

AudioKit kit;
SineWaveGenerator wave;
const int BUFFER_SIZE = 1024;
uint8_t buffer[BUFFER_SIZE];

void setup() {
  // open in write mode
  auto cfg = kit.defaultConfig(true);
  cfg.sample_rate = AUDIO_HAL_22K_SAMPLES;
  kit.begin(cfg);

  // 1000 hz
  wave.setFrequency(1000);
  wave.setSampleRate(cfg.sampleRate());
}

void loop() {
  size_t l = wave.read(buffer, BUFFER_SIZE);
  kit.write(buffer, l);
}

Logging

The functionality has a built in logger. The default log level has been set to Warning. You can change it like this:

  AUDIOKIT_LOG_LEVEL = AudioKitDebug; // or AudiKitInfo, AudioKitWarning, AudioKitError

Documentation

Here is the documentaion of the AudioKit class.

Further information can be found in my Blogs.

Installation in Arduino

You can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with

cd  ~/Documents/Arduino/libraries
git clone https://github.com/pschatzmann/arduino-audiokit.git

If you want to use the library in PlatformIO, you can find a detailed description in the Wiki.

Supported Devices / Processors

The examples have been tested with a AI Thinker v2.2. I do not own any other AudioKit devices, so I can't guarantee that they work properly. I also made sure that the code is compiling on other processors, but I did not perform any tests. Please note that because I2S is not standardized in Arduino, you need to take care of the I2S initialization and processing yourself on other processors.

Comments
  • Question: codec mode and input settings (line in)

    Question: codec mode and input settings (line in)

    Why is LINE_IN in the audio_hal_codec_mode_t setting and not in the audio_hal_adc_input_t setting? Isn't it possible to have AUDIO_HAL_CODEC_MODE_BOTH activated and still LINE_IN selected as Input source? (simultaneously doing line in and line out)

    opened by IsiTapier 26
  • Which board to select in Arduino IDE

    Which board to select in Arduino IDE

    Hello there, I haveESP32 Audio Devkit and I have downloaded this code but I am not able to compile this code, could you please let me which board should I select or how to add this board in board manager.

    Best Regards Rajbir

    opened by rjrajbir 8
  • Audiokit v2.2 (2957), version with I2C on 32/33 - two suggestions

    Audiokit v2.2 (2957), version with I2C on 32/33 - two suggestions

    After I got my 'flavour' of the infamous Audiokit v2.2 (2957) with ES8388 to work, I have two suggestions that may shorten the route for other beginners:

    1. Perhaps this version of the board could be added as something like '8) ai_thinker (ES8388) 2957 (I2C on 32/33)' to the AudioKitSettings.h file, and then made selectable via #define AUDIOKIT_BOARD 8, with the following pin definitions in its board_pins_config.c file:
    	i2c_config->sda_io_num = GPIO_NUM_33; 
    	i2c_config->scl_io_num = GPIO_NUM_32;
    	i2s_config->bck_io_num = GPIO_NUM_27;
    	i2s_config->ws_io_num = GPIO_NUM_25;
    	i2s_config->data_out_num = GPIO_NUM_26;
    	i2s_config->data_in_num = GPIO_NUM_35;
    

    Unlike the 18/23 version, this board has no conflict with GPIO18, so volume control through KEY5 and KEY6 will work.

    1. On this flavour of the v2.2 (ES8388) 2957 board, the current file es8388.c results in very low max volume on speakers as well as headphones. An elsewhere suggested fix that worked for me was changing function es8388_get_voice_volume() in that file as follows:
    esp_err_t es8388_set_voice_volume(int volume) {
      esp_err_t res = ESP_OK;
      if (volume < 0) volume = 0;
      else if (volume > 100) volume = 100;
      volume /= 3;
      res = es_write_reg(ES8388_ADDR, ES8388_DACCONTROL4, volume);
      res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL5, volume);
      res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL24, volume);
      res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL25, volume);
      res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL26, volume);
      res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL27, volume);
      return res;
    }
    

    So perhaps this board could have its own es8388_set_voice_volume() function?

    opened by perlix 8
  • SD card via SDMMC instead of SPI?

    SD card via SDMMC instead of SPI?

    Grüezi Phil,

    Triggered by the wiki page about SPI and I2C, I wondered if you ever considered to access the SD card over the fast SDMMC bus instead of SPI. The Audiokit datasheet suggests that the SD slot is connected to all 6 pins of ESP32's SDMMC_HOST_SLOT_1 (2, 4, 12, 13, 14 and 15, all with pullup resistors).

    Using the SD_MMC library, I verified that SDMMC 1-bit mode (using GPIO 2, 14 and 15) is almost twice as fast as SPI. (Couldn't get the even slightly faster SDMMC 4-bit mode working, so GPIO 4 and/or 12 may not actually be connected on my kit).

    This is just an idea. I don't even know if SD speed could ever become a bottleneck for audio projects, but if a board's internal wiring allows it, I always prefer using the SDMMC bus.

    opened by perlix 5
  • Is it possible to set higher sample rate I.e. 96K

    Is it possible to set higher sample rate I.e. 96K

    I am using audio kit v2.2 and tested your examples up to 48khz sampling rate. However for my project I need a higher sampling rate of 96kHz. Is this possible?

    opened by y-sh1 5
  • My ESP32 Audio kit 2762 works with ES3833, not AC101

    My ESP32 Audio kit 2762 works with ES3833, not AC101

    Hello, Contrary to the info on the main page my ESP32 Audio Kit version 2762 works with the AUDIOKIT_BOARD=5. As the audio codec is embedded the ESP32-A1S, not on the ESP32 Audio kit, it might be more correct to list the revision number of the ESP32-A1S instead of listing the revision number of the ESP32 Audio Kit.

    The ESP32-A1S's revision is on the back of the module. Mine is 2794.

    opened by LieBtrau 3
  • How to select/play a single MP3 file by name

    How to select/play a single MP3 file by name

    Hi there! I am looking for an implementation to have an MP3 played by the press of a button/key. I tried changing the source, but for some reason it doesn't accept just the file, only directories. Can you help me out with an example please? Thanks!

    opened by merugear 3
  • output.ino example stops working after a few minutes

    output.ino example stops working after a few minutes

    I am encountering a strange behaviour with the output.ino example (on a LyraT board): the sinewave runs perfectly for a couple of minutes, then it suddenly changes its frequency to a lower note, and later it begins stuttering. Is there something that I should check? This is the output of the serial monitor:

    ets Jul 29 2019 12:21:46

    rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 Info: bool AudioKit::begin(AudioKitConfig) Info: Selected board: 1 Info: headphone detection is active Info: i2c sda: 18 Info: i2c scl: 23 Info: i2c clk_speed: 100000 Info: audio_codec_initialize-END-OK Info: i2s_set_pin Info: I2S0, MCLK output by GPIO0 Info: Codec mode is 2, Ctrl:1

    opened by vanniaz 3
  • PlatformIO: errors compiling  streams-audiokit-audiokit

    PlatformIO: errors compiling streams-audiokit-audiokit

    Hi,

    I try to use the streams-audiokit-audiokit example on my LyraT 4.3 board to send the audio from "line in" to the speaker. I followed the hints in the wiki regarding platformio, my platformio.ini looks like this:

    [env:esp32dev]
    platform = espressif32
    board = esp32dev
    framework = arduino
    
    lib_deps =
        https://github.com/pschatzmann/arduino-audiokit.git
        https://github.com/pschatzmann/arduino-audio-tools.git
    
    lib_ldf_mode = deep+
    build_flags = -DCORE_DEBUG_LEVEL=5 -DAUDIOKIT_BOARD=1 
    
    upload_port = COM4
    monitor_port = COM4
    monitor_speed = 115200
    
    

    The example is untouched like this:

    /**
     * @file streams-audiokit-audiokit.ino
     * @author Phil Schatzmann
     * @brief see https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-audiokit/streams-audiokit-audiokit/README.md
     * 
     * @author Phil Schatzmann
     * @copyright GPLv3
     */
    
    
    #include "AudioTools.h"
    #include "AudioLibs/AudioKit.h"
    
    AudioKitStream kit; // Access I2S as stream
    StreamCopy copier(kit, kit); // copy kit to kit
    
    // Arduino Setup
    void setup(void) {
        Serial.begin(115200);
        AudioLogger::instance().begin(Serial, AudioLogger::Warning);
        
        auto cfg = kit.defaultConfig(RXTX_MODE);
        cfg.sd_active = false;
        cfg.input_device = AUDIO_HAL_ADC_INPUT_LINE2;
        kit.begin(cfg);
    }
    
    // Arduino loop - copy data
    void loop() {
        copier.copy();
    }
    
    

    When I do a build I got lot's of errors I don't understand:

    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioPrint.h:7:0,
                     from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioFilter/Equilizer.h:3,
                     from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:16,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h:70:15: error: 'virtual int audio_tools::AudioStream::availableForWrite()' marked 'override', but does not override
       virtual int availableForWrite() override { return DEFAULT_BUFFER_SIZE; }
                   ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h: In member function 'virtual int audio_tools::AudioStreamWrapper::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h:135:54: error: 'class Stream' has no member named 'availableForWrite'
       virtual int availableForWrite() { return p_stream->availableForWrite(); }
                                                          ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h: In member function 'virtual int audio_tools::ConvertedStream<T, ConverterT>::availableForWrite()':
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\ai_thinker_ac101\board.c.o
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h:925:60: error: 'class Stream' has no member named 'availableForWrite'
    Archiving .pio\build\esp-wrover-kit\lib03c\libOLED.a
             virtual int availableForWrite() { return p_stream->availableForWrite(); }
                                                                ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h: In member function 'virtual int audio_tools::VolumeStream::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h:1078:47: error: 'class Print' has no member named 'availableForWrite'
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\ai_thinker_ac101\board_pins_config.c.o
                 return p_out==nullptr? 0 : p_out->availableForWrite();
                                                   ^
    Archiving .pio\build\esp-wrover-kit\lib824\libNTPClient.a
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h: In member function 'virtual int audio_tools::MeasuringStream::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h:1280:23: error: 'class Print' has no member named 'availableForWrite'
           return p_print->availableForWrite();
                           ^
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\ai_thinker_es8388_2957\board.c.o
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h: In member function 'virtual int audio_tools::FilteredStream<T, TF>::availableForWrite()':.pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreams.h:1458:28: error: 'class Stream' has no member named 'availableForWrite'
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\ai_thinker_es8388_2957\board_pins_config.c.o
               return p_stream->availableForWrite();
                                ^
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\ai_thinker_es8388_3478\board.c.o
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTimer/AudioTimer.h:2:0,
                     from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:11,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioPrint.h: In member function 'virtual size_t audio_tools::MemoryPrint::write(const uint8_t*, size_t)':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioLogger.h:132:94: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 
    has type 'size_t {aka unsigned int}' [-Wformat=]
         snprintf(AudioLogger::instance().str(), LOG_PRINTF_BUFFER_SIZE, PSTR(fmt),  ##__VA_ARGS__); \
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\ai_thinker_es8388_3478\board_pins_config.c.o
                                                                                                  ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioLogger.h:146:83: note: in expansion of macro 'LOG_OUT_PGMEM'
     #define LOGE(fmt, ...) if (AudioLogger::instance().level()<=AudioLogger::Error) { LOG_OUT_PGMEM(AudioLogger::Error, fmt, ##__VA_ARGS__);}
                                                                                       ^
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\esp32_s2_kaluga_1_v1_2\board.c.o
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\esp32_s2_kaluga_1_v1_2\board_pins_config.c.o
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioPrint.h:692:17: note: in expansion of macro 'LOGE'
                     LOGE("Buffer too small: pos:%d, size: %lu ", pos, max_size);
                     ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioLogger.h:132:94: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 
    has type 'size_t {aka unsigned int}' [-Wformat=]
         snprintf(AudioLogger::instance().str(), LOG_PRINTF_BUFFER_SIZE, PSTR(fmt),  ##__VA_ARGS__); \
                                                                                                  ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioLogger.h:146:83: note: in expansion of macro 'LOG_OUT_PGMEM'
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\generic_es8388\board.c.o
     #define LOGE(fmt, ...) if (AudioLogger::instance().level()<=AudioLogger::Error) { LOG_OUT_PGMEM(AudioLogger::Error, fmt, ##__VA_ARGS__);}
                                                                                       ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioPrint.h:692:17: note: in expansion of macro 'LOGE'
                     LOGE("Buffer too small: pos:%d, size: %lu ", pos, max_size);
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\generic_es8388\board_pins_config.c.o
                     ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:16:0,
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\lyrat_mini_v1_1\board.c.o
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioFilter/Equilizer.h: In member function 'virtual int audio_tools::Equilizer3Bands::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioFilter/Equilizer.h:101:29: error: 'class Print' has no member named 'availableForWrite'
                 return p_print->availableForWrite();
                                 ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:23:0,
    Compiling .pio\build\esp-wrover-kit\liba19\audiokit\audio_board\lyrat_mini_v1_1\board_pins_config.c.o
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreamsConverter.h: In member function 'virtual int audio_tools::ChannelFormatConverterStreamT<T>::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreamsConverter.h:68:43: error: 'class Print' has no member named 'availableForWrite'
               return 1.0f / factor * p_print->availableForWrite();
                                               ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:23:0,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreamsConverter.h: In member function 'virtual int audio_tools::NumberFormatConverterStreamT<T, TArg>::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreamsConverter.h:324:27: error: 'class Print' has no member named 'availableForWrite'
               return p_print->availableForWrite();
                               ^
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreamsConverter.h: In member function 'virtual int audio_tools::NumberFormatConverterStream::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioStreamsConverter.h:451:29: error: 'class Print' has no member named 'availableForWrite'
                 return p_print->availableForWrite();
                                 ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:25:0,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/Resample.h: In member function 'int audio_tools::Resample<T>::availableForWrite()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/Resample.h:76:58: error: 'class Print' has no member named 'availableForWrite'
             int availableForWrite() override { return p_out->availableForWrite(); }
                                                              ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:26:0,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioCopy.h: In member function 'size_t audio_tools::StreamCopyT<T>::copy()':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools/AudioCopy.h:95:32: error: 'class Print' has no member named 'availableForWrite'
                 int to_write = to->availableForWrite();
                                    ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:28:0,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioCodecs/AudioEncoded.h: In member function 'virtual int audio_tools::EncodedAudioStream::availableForWrite()':  
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioCodecs/AudioEncoded.h:347:54: error: 'class Print' has no member named 'availableForWrite'
       int availableForWrite() override { return ptr_out->availableForWrite(); }
                                                          ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioHttp/AudioHttp.h:2:0,
                     from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioTools.h:30,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:11:
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioHttp/URLStream.h: In member function 'Client& audio_tools::URLStreamDefault::getClient(bool)':
    .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioHttp/URLStream.h:242:35: error: 'class WiFiClientSecure' has no member named 'setInsecure'
                         clientSecure->setInsecure();
                                       ^
    In file included from .pio\libdeps\esp-wrover-kit\audio-tools\src/AudioLibs/AudioKit.h:4:0,
                     from C:/Users/hartmut/src/hiberbear/src/HiberBear.ino:12:
    .pio\libdeps\esp-wrover-kit\audiokit\src/AudioKitHAL.h: In member function 'i2s_config_t AudioKitConfig::i2sConfig()':
    .pio\libdeps\esp-wrover-kit\audiokit\src/AudioKitHAL.h:129:34: warning: narrowing conversion of 'AudioKitConfig::sampleRate()' from 'uint32_t {aka unsigned int}' to 'int' inside { } [-Wnarrowing]
             .sample_rate = sampleRate(),
                                      ^
    *** [.pio\build\esp-wrover-kit\src\HiberBear.ino.cpp.o] Error 1
    
    

    Can anybody give me hints on what I missed ?

    Sorry for inconvinience and thanks a lot Hartmut

    opened by lnetwalker 2
  • ESP32 S2 - Not compiling

    ESP32 S2 - Not compiling

    Thanks for Both of your audio libraries, I came here after listening to a guy with the swiss accent ;)

    I am trying to run "streams-audiokit-serial" on an ESP 32 S2 board (Specifically Kaluga V1.2) , but it is not compiling and throws below error.

    C:\Users\User\OneDrive\Documents\Arduino\libraries\arduino-audiokit-main\src/AudioKitHAL.h:27:10: fatal error: esp_a2dp_api.h: No such file or directory
     #include "esp_a2dp_api.h"
              ^~~~~~~~~~~~~~~~
    compilation terminated.
    

    My question is did you managed to compile this for any ESP 32 S2 board ?

    Thanks and Regards JAY

    opened by jay6621 2
  • Weired hardware revision of Esp32-audio-kit

    Weired hardware revision of Esp32-audio-kit

    Hi, thanks for that huge amount of genius work! I just checked some examples and came to a point where I need some help. I have got some Esp32-audio-kit boards which are labeled with revision 2957 but I only can get them to work and make sound if I select the AC101 option 6. When I listen to a url in player-url_icy-audiokit the sound is good (I had to comment out kit.processActions(); in the loop otherwise it would halt playing for a brief moment every second -- [I] AudioKit.h : 352 - static void audio_tools::AudioKitStream::actionStartStop(bool, int, void*) is somehow triggered). In other examples the sound is heavily distorted but I hear something. My main problem is I can't get the SD-card to be detected. I got it to work previously with the SD_MMC lib and I checked different boards, so I don't think it is a hardware issue. That's the error from sdbegin (I tried options for boards 5 - 7 all having the same error):

    [E][sd_diskio.cpp:194] sdCommand(): Card Failed! cmd: 0x00 [E][sd_diskio.cpp:775] sdcard_mount(): f_mount failed: (3) The physical drive cannot work [E][sd_diskio.cpp:194] sdCommand(): Card Failed! cmd: 0x00 Card Mount Failed

    I use PlatformIO with freshly installed libs from github (today) Do you have any idea how I could get it to work? Thanks in advance!

    platformio.ini

    [env:esp32dev]
    platform = espressif32
    board = esp32dev
    lib_ldf_mode = deep+
    lib_deps = greiman/SdFat
               https://github.com/pschatzmann/arduino-audio-tools.git
               https://github.com/pschatzmann/arduino-libhelix.git
               https://github.com/pschatzmann/arduino-audiokit.git
               https://github.com/pschatzmann/arduino-midi
    framework = arduino
    build_flags = -DAUDIOKIT_BOARD=6 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function -Wno-format-extra-args 
    
    opened by fricklr 2
  • AI Thinker v2.2 3378 - Audio Left side only

    AI Thinker v2.2 3378 - Audio Left side only

    I am able to get this board partially working.

    The board appears to work with AUDIOKIT_BOARD values of 1 (lyrat_v4_3) or 7 (ai_thinker (ES8388) 2957).

    I had to use AI_THINKER_ES8388_VOLUME_HACK, otherwise the volume levels are way too low (i.e. barely audible).

    On earphones, I am only get the left audio (i.e. the right side is completely silent).

    If anybody can share their solution for 3378 or point me in the rough direction to solve this, I would be grateful.

    opened by andrewwakeling 2
  • esp32-s3-korvo-v3

    esp32-s3-korvo-v3

    Hi Sir ;

    I have a esp32s3-korvo-v3 board . I am working for bidirectional audio live streaming on http. I got a following issue on streams_audiokit_webserver_acc example .

    C:\Users\tatva\OneDrive\Documents\Arduino\libraries\arduino-audio-tools-main\src/AudioAnalog/AnalogAudioESP32.h:7:10: fatal error: soc/dac_channel.h: No such file or directory #include "soc/dac_channel.h"

    opened by Tatvatecnovation 37
Releases(v0.6.2)
  • v0.6.2(Dec 15, 2022)

  • v0.6.1(Nov 18, 2022)

  • v0.6.0(May 12, 2022)

    • Wire1 is now used as default to communicate with the Audio chip. This can be configured in AudioKitConfig.h
    • Option to configure SPI to use VSPI AudioKitConfig.h
    • Example to start SD with SDMMC
    • Added Wire option in SD example

    Further details can be found in the Wiki

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Apr 1, 2022)

    • Configuration of AI_THINKER_ES8388_VOLUME_HACK
    • Support for AI Thinker 2957
    • Resolve compile errors for non ESP32 Processors
    • AudioKitConfig additional parameters
    • Support for ai_thinker AC101 sound chip
    • Compile error in output.ino example
    • Error messages for unsupported samplerate
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Jan 27, 2022)

    • move driver to src directory
    • Move HAL files into audio_hal directory
    • AudioKit AC101 Buttons
    • AIThinker - AudioKit has no touch pins!
    • set sd active by default
    • rename AUDIOKIT_LOG_LEVEL to LOGLEVEL_AUDIOKIT
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jan 26, 2022)

  • v0.2.0(Dec 15, 2021)

  • v0.1.0(Dec 13, 2021)

    I finally managed to have the last issue resolved: The I2C is now also working with the Arduino Wire library So I am proud to announce that the first release of my Arduino AudioKit HAL library is ready!

    Source code(tar.gz)
    Source code(zip)
Owner
Phil Schatzmann
Phil Schatzmann
This repository gives an idea about how to use UART/SPI/I2C communication using HAL APIs

STM32-UART-SPI-I2C communication with Arduino board using HAL APIs This repository gives an idea about how to use UART/SPI/I2C communication using HAL

Shrilesh(Skrillex) 1 Nov 1, 2021
ADXL345 Library for STM32-HAL

ADXL345-STM32 ADXL345 Library for STM32-HAL This library is not complete so this library may run unstable. How to use this library Change the header f

Can Guveren 2 May 26, 2022
Library for STM32 microcontrollers with HAL to communicate with absolute orientation sensor Bosh BNO055.

Bosh BNO055 sensor library fro STM32 with HAL Library for STM32 microcontrollers with HAL to communicate with absolute orientation sensor Bosh BNO055.

Eryk Możdżeń 1 Nov 20, 2021
Generic force-feedback vibrator HAL for upstream haptics drivers

vibrator-ff, a generic vibrator HAL for force feedback haptics. Most downstream haptics / vibrator drivers are implemented as LED class devices, this

AOSP Mainline 4 Feb 2, 2022
An optimized "RTOS" (more than HAL but less than RTOS) for ROV controling and getting sensor data

Nitori-ROV-OS 一个专门为水下机器人(ROV、AUV)进行优化的实时操作系统,暂命名为 Nitori,中文名 荷取 可以通过修改硬件兼容层(Port)进行移植 预计最初版本支持stm32f407和stm32h750,并在实验室目前的水下机器人中进行部署 系统分为四层,六个主要组件: 硬件

Doublues_G 2 Jan 10, 2022
Full Firmware Package for the STM32WB series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects

STM32Cube is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.

STMicroelectronics 142 Dec 28, 2022
Filter driver which support changing DPI of mouse that does not support hardware dpi changing.

Custom Mouse DPI Driver 하드웨어 DPI 변경이 불가능한 마우스들의 DPI 변경을 가능하게 하는 필터 드라이버 경고: 해당 드라이버는 완전히 테스트 되지 않았습니다 Install 해당 드라이버는 서명이 되어있지않습니다. 드라이버를 사용하려면 tests

storycraft 4 Sep 23, 2022
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE

INSTRUCTIONS - The codes for the Fingerprint Door lock are present in the Code For Fingerprint Door Lock folder The instructions of how to operate the

Akhil Sahukaru 15 Mar 3, 2022
Arduino M-BUS Master node for Arduino MKR M-BUS Shield

Arduino M-BUS Master node for Arduino MKR M-BUS Shield This software will read out a M-BUS device connected to an Arduino MKR board equipped with our

null 6 Nov 30, 2022
Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor

Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor. When the sensor data gets stuck, the library has a hard reset function to ensure that it is read continuously.

Paul Ryan Santiago 3 Apr 11, 2022
Internet of things created using arduino IoT cloud, consisting of esp and arduino boards

Internet of things created using arduino IoT cloud, consisting of esp and arduino boards. Goal of the project is to create a 3D printed RFID protected (with PIN) lock, including surveillance.

null 2 Sep 1, 2022
Support for TrueType (.ttf) font files with Simple Directmedia Layer.

This library is a wrapper around the excellent FreeType 2.0 library

Simple Directmedia Layer 192 Dec 31, 2022
C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Archived cquery is no longer under development. clangd and ccls are both good replacements. cquery cquery is a highly-scalable, low-latency language s

Jacob Dufault 2.3k Jan 2, 2023
Dynamic 3D cellular automata engine with lua scripting support

Cell3D Cell3D is a dynamic 3D cellular automata engine with lua scripting support Installation Dependencies: Lua 5.3 Raylib Simplest possible build co

null 2 Oct 7, 2022
a undetectable tool by modify odyssey, support sign disable & dylib injection, test on iphoneX(13.5.1 expolit by FreeTheSandbox), our qqgroup is 703156427

a undetectable ios root access tool by modify odyssey, support sign disable & dylib injection, test on iphoneX(13.5.1 expolit by FreeTheSandbox), our

null 58 Nov 22, 2021
Tiny FEL tools for allwinner SOC, support RISC-V D1 chip

XFEL Tiny FEL tools for allwinner SOC, support RISC-V D1 chip. How to build The xfel tools depends on the libusb-1.0 library, you need to install libu

xboot.org 132 Dec 30, 2022
Add Sidecar support to unsupported models

SidecarFixup Lilu Kernel extension for enabling Sidecar support on the following SMBIOS

Acidanthera 262 Jan 2, 2023
Backtrace support for Rust `no_std` and embedded programs.

mini-backtrace This crate provides backtrace support for no_std and embedded programs. This is done through by compiling LLVM's libunwind with certain

Amanieu d'Antras 27 Dec 18, 2022
Xournal++ is a handwriting notetaking software with PDF annotation support

Xournal++ is a handwriting notetaking software with PDF annotation support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu, Debian, Arch, SUSE), macOS and Windows 10. Supports pen input from devices such as Wacom Tablets.

Xournalpp 7.9k Jan 4, 2023