pschatzmann / arduino-audio-driver Goto Github PK
View Code? Open in Web Editor NEWFlexible driver library for audio boards and codec chips e.g AC101 ES8388 ES8311 CS43l22 ES7243 etc
License: GNU General Public License v3.0
Flexible driver library for audio boards and codec chips e.g AC101 ES8388 ES8311 CS43l22 ES7243 etc
License: GNU General Public License v3.0
The Arduino IDE isn't suggesting that your libraries need to be updated even though there have been several updates since I downloaded them a few months ago.
Hi, I am using the codec with Arduino Audio Tools on an Audio Kit board.
[E] AACEncoderFDK.h : 234 - Encoding failed: Handle passed to function call was invalid
I am using the streams-audiokit-webserver_aac.ino example.
I am also using the new Auduino-Audio-Driver.
I am also using the auduino-fdk-acc codec
The code builds and uploads but i get this runtime error in the serial monitor when i connect to the web server via Chrome.
Thanks
Eric
Error in title compiling main stream:
for (auto &tmp : spi) {
AD_LOGD("DriverPins::begin::SPI::begin");
if (tmp.function == PinFunction::SD)
if (sd_active)
result &= tmp.begin();
else
result &= tmp.begin();
}
I think that adding braces make code cleaer effectively
for (auto &tmp : spi) {
AD_LOGD("DriverPins::begin::SPI::begin");
if (tmp.function == PinFunction::SD)
{
if (sd_active)
result &= tmp.begin();
else
result &= tmp.begin();
}
}
I have the ESP32 Audio kit V2.2 and I am running this code:
#include <Arduino.h>
/**
* @brief We use a predefied board (AudioKitEs8388V1) and output_device a sine
* with the help of the AudioTools I2SCodecStream
* @author phil schatzmann
*/
#include "AudioTools.h" // install https://github.com/pschatzmann/arduino-audio-tools
#include "AudioLibs/I2SCodecStream.h"
AudioInfo info(44100, 2, 16);
SineWaveGenerator<int16_t> sineWave(32000);
GeneratedSoundStream<int16_t> sound(sineWave);
I2SCodecStream out(AudioKitEs8388V1);
StreamCopy copier(out, sound);
void setup()
{
// Setup logging
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Warning);
LOGLEVEL_AUDIODRIVER = AudioDriverWarning;
// start I2S & codec with i2c and i2s configured above
Serial.println("starting I2S...");
auto config = out.defaultConfig();
config.copyFrom(info);
out.begin(config);
// Setup sine wave
sineWave.begin(info, N_B4);
}
// Arduino loop - copy sound to out
void loop() { copier.copy(); }
on PlatformIO
with this platformio.ini
[platformio]
description = Audio Example
default_envs = esp32dev
[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = arduino
lib_deps =
https://github.com/pschatzmann/arduino-audio-tools.git
https://github.com/pschatzmann/arduino-audio-driver.git
lib_ldf_mode = deep+
build_flags = -DCORE_DEBUG_LEVEL=5 -DAUDIOKIT_BOARD=5
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
Compile and upload work fine, but it keeps rebooting with this message :
ELF file SHA256: 11734f0e505573e4
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_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:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
[ 23][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
starting I2S...
Warning: Pin '13' not set up because of conflict
[ 35][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=33 scl=32 freq=100000
Error: ->p_wire->endTransmission: 2
Error: ES8388 not found on I2C address 10, check wiring
Error: AudioDriver::begin::init failed
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
[E] I2SCodecStream.h : 73 - virtual bool audio_tools::I2SCodecStream::begin()
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400e1cda PS : 0x00060a30 A0 : 0x800d3f4b A1 : 0x3ffb2120
A2 : 0x00000000 A3 : 0x3ffba8a0 A4 : 0x00000400 A5 : 0x3ffb2160
A6 : 0xffffffff A7 : 0x3ffc2f24 A8 : 0x00000000 A9 : 0x3ffb2120
A10 : 0x3ffb2164 A11 : 0x00000010 A12 : 0x40ac101f A13 : 0x37354443
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000018 LBEG : 0x400029ac LEND : 0x400029cb LCOUNT : 0x00000000
Backtrace: 0x400e1cd7:0x3ffb2120 0x400d3f48:0x3ffb2160 0x400d3ff9:0x3ffb21d0 0x400d4039:0x3ffb21f0 0x400d5cd7:0x3ffb2210 0x400d5e90:0x3ffb2230 0x400d5fa6:0x3ffb2270 0x400de4a9:0x3ffb2290
ELF file SHA256: 11734f0e505573e4
Rebooting...
What am I doing wrong?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.