Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Teensy Bluetooth Audio digital input

  1. #1
    Junior Member
    Join Date
    Mar 2017
    Posts
    5

    Teensy Bluetooth Audio digital input

    Hi.

    Have anyone succesfully managed to get high quality audio via i2s from a bluetooth module, like WT32i, BC127 or RN-52?

    Regards Kristian Solberg

    (Can moderator please move my post to Audio Projects or General discussion?)
    Last edited by KRSO; 03-30-2017 at 07:36 PM. Reason: Wrong forum

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,579
    So far, all the BT audio attempts I've seen have involved using a reduced rate of only 16 ksamples/sec.

    Do any of those adaptors support full 44.1 kHz I2S audio?

  3. #3
    I'm looking into adding Bluetooth to my audio mixer project. Just reopening this thread to see if anyone has gotten bluetooth audio (send or receive) to work with the Teensy Audio Library or just in general.

    I noticed the Teensy Hearing Aid project here has a BT receiver (RN42), and it's an audio related project. I wonder if that project is using BT for audio or just control. https://forum.pjrc.com/threads/40115-Teensy-Hearing-Aid

    For my audio mixer project having bluetooth for both Audio Transmission/Receiving, as well as Open Sound Control signal over Bluetooth to control the mixer would be an excellent addition.

    Do any of those adaptors support full 44.1 kHz I2S audio?
    The Adafruit Bluefruit LE module is inexpensive, and yes I believe it would support that. It's Bluetooth 4.0.
    https://www.adafruit.com/product/2633

  4. #4
    I just received word from @chipaudette

    I've got collaborators who are selling my hearing aid thing as Tympan (http://tympan.org). All versions of Tympan have Bluetooth, but it has different capabilities depending upon the version of Tympan. Rev C is just a serial link allowing non-audio data the be exchanged with the Tympan. Rev D (to be released soon) has a more powerful BT module that allows for both the serial link as well as a BT audio link.

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,534
    RN52 seems (after a quick glance onto the data sheet) to support 16bit@44.1kS/s I2S

  6. #6
    Quote Originally Posted by Theremingenieur View Post
    RN52 seems (after a quick glance onto the data sheet) to support 16bit@44.1kS/s I2S
    The Tympan Rev D is using the BC127. At some point I plan on looking at that project and how it's integrated.

  7. #7
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    190
    On the Tympan D with the BC127, you can talk to it digitally like a Bluetooth classic device, but for Bluetooth audio, we did not connect it to the I2S bus. Instead, we chose to connect the analog audio I/O of the BC127 to spare analog I/O on our audio interface to the Teensy (we use a AIC3206).

    So, while some might not like the fact that we don't have the digital audio coming from the BC127, you do get the flexibility of the analog MUX'ing at the front of the AIC3206. The MUX'ing means that you can do Bluetooth Audio, ambient audio, line-in, mics, or any combination thereof. I think that that's pretty cool. My opinion. (But, of course, I'm biased )

    Chip

  8. #8
    Quote Originally Posted by chipaudette View Post
    On the Tympan D with the BC127, you can talk to it digitally like a Bluetooth classic device, but for Bluetooth audio, we did not connect it to the I2S bus. Instead, we chose to connect the analog audio I/O of the BC127 to spare analog I/O on our audio interface to the Teensy (we use a AIC3206).

    So, while some might not like the fact that we don't have the digital audio coming from the BC127, you do get the flexibility of the analog MUX'ing at the front of the AIC3206. The MUX'ing means that you can do Bluetooth Audio, ambient audio, line-in, mics, or any combination thereof. I think that that's pretty cool. My opinion. (But, of course, I'm biased )

    Chip
    Interesting.

    Using your method you might find that individual control over inputs may be more difficult to volume level. The 3206 only has two PGA's (programmable gain amplifier). So you have one amplifier for left and one for right. Or one for mic 1 and one for mic 2. If you are using one or both for the microphones, and you want to use the "record path" of the TLV you'll be stuck amplifying the BT signal along with the mics. (no individual volume control)

    The other option will be to use the analog bypass (10.3.2.1 ) and go right into the output stage of the 3206. This is OK for your application I guess, but you won't be able to record the "entire mix" as experienced by the user. I doubt that matters at all to you. You'll also have to have some special software to handle changing volumes in the BT, and muxing inside the TLV. Oh, by the way the analog bypass is stated to negatively impact the SNR of the TLV. Using no analog bypass has the cleanest signal according to the datasheet but I doubt it's much of a penalty. I doubt it's noticeable in small consumer ear buds.

    If you would have connected the BT digitally you would mix inside the DSP and you can volume level as required on each individual channel. You can also then record the entire mix and have control over other parameters of the signal. It seems to me like this would add greater functionality, and would also cause less software headaches (all control inside the Teensy "DSP"). Plus, then I could have learned from your code in my project. :-)

    The down side of using the BT->I2S>Teensy is that this method would require either TDM or another I2S line (more pins). The TLV does have TDM so one half of the equation is there. However, it doesn't appear that the BT127 has TDM so it would take up it's own I2S line. I'm now wondering about this for my project... The Bluetooth transceiver takes up an entire I2S line unless I can find one with TDM. Ouch! That's 16 channels of TDM taken by 1 device!

    I see your thought process here. Those TLV features are like a switchboard of possibilities. You have a very nice product and it's cool that it solves a very real world problem for people (hearing).

  9. #9
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    190
    Quote Originally Posted by JayShoe View Post
    The down side of using the BT->I2S>Teensy is that this method would require either TDM or another I2S line (more pins). The TLV does have TDM so one half of the equation is there. However, it doesn't appear that the BT127 has TDM so it would take up it's own I2S line. I'm now wondering about this for my project... The Bluetooth transceiver takes up an entire I2S line unless I can find one with TDM. Ouch! That's 16 channels of TDM taken by 1 device!
    .
    When we were deciding how to integrate BT audio, I wanted to do digital...but it was never clear to me how to have multiple I2S devices working together with the K66 processor at the heart of the Teensy 3.6. It seemed beyond my skill to figure out, especially given my other priorities in the design. So, I wimped out and we went analog.

    Seeing your reply, I feel some validation that my fear was real. I feel a little bit less like a wimp. Yay!

    Someday, I would still like to see how one is supposed to meld different I2S devices together with an embedded processor like the K66. I assume that it can be done? Or is it really not set up for that sort of thing?

    Chip

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •