BC127 I2S input


#1

Hello,

I am trying to get the BC127 to take an I2S input and output the sound onto my bluetooth speakers.
The I2S input that I am using is a simple 440Hz square wave with a sample rate of 8000Hz and 16 bit sampling and in Left_Justified_Mode. I am doing this using this arduino sample code and setup:
https://www.arduino.cc/en/Tutorial/I2SSimpleTone

The two are connected: Arduino pin---------BC127 pin
LRC---------WS
DIN---------SD_IN
BCLK---------SCK
GND--------GND

I have the BC127 configuration as:
Version: V7.2
AUDIO=1 0
AUDIO_DIGITAL=0 8000 1 100200 ON
My understanding is that I want the AUDIO_DIGITAL set such that it has 16 bits/sample, set to slave, left justified and I don’t think the BCLK prescaling matters when in slave mode.

When I run the code and connect my Bluetooth headphones, I get no sound (not even the ‘pop’ when I run the PLAY command). What else might need to be set up on my AUDIO_DIGITAL?


#2

I eventually solved my own problem. There ended up being a few things that I was doing wrong. First, I made a silly hardware error where I had the SPI_PCM# pin pull up to 3.3V rather than being pulled to ground. Second, bit 2 of <param_2> needs to be set to crop down to 16 bits. Third, the sampling rate needed to be higher, so I configured the Aurduio and BC127 for a sampling rate of 48000. This results in my settings as AUDIO_DIGITAL=0 48000 1 100204 OFF.