Staging:CC3220 Wifi Audio Application

Objective
This example demonstrates ‘Bi-directional Audio Streaming and Playback’ on CC3220 Launchpad setup. The Setup comprises of two LPs (in STA mode) acting as both Audio source and sink. The Source gets audio input from Onboard MIC, MIC IN or Line-In Input on Audio BP. Audio is transmitted over Wi-Fi from source to sink. The Launchpad receives and plays the audio data on Line-Out of Audio BP.

By default the application runs in loopback mode until a connection is established between the two Launchpads

Hardware

 * 1) 2x CC3220 Launchpad
 * 2) 2x CC32XXAUDBOOST-3.0A
 * 3) 2x Headphones/Speakers
 * 4) 2x Audio Sources

Software

 * 1) CC3220 wifi audio app binary
 * 2) Latest CC3220 SDK Firmware Package
 * 3) SimpleLink Image Creator

Setup CC3220 Launchpad

 * 1) Code changes
 * 2) *Modify SSID_NAME, SECURITY_TYPE and SECURITY_KEY macros in example\common.h as per your AP configuration
 * 3) *Compile the code for changes
 * 4) To run in Debug Mode
 * 5) * Connect 2 CC3220 Launch Pad to 2 different machines running IAR/CCS using USB cable
 * 6) * Open the Project as mentioned in '\docs\CC3220-Getting Started Guide.pdf'
 * 7) * Ensure SOP-2 Jumper is connected
 * 8) To run in Functional Mode
 * 9) * Flash the binary file available in \example\wifi_audio_app\ewarm\UniCast\Exe folder using Image Creator. Please refer Getting Started Guide and Image Creator User Guide.
 * 10) * Repeat above step for second Launch Pad
 * 11) * Ensure SOP-2 Jumper is removed after flashing

System Configuration
1. Mount 'Audio Codec Booster Pack' on 'CC3220 LaunchPad' as shown below. Ensure 'J1 &amp; J2' of the booster-pack are aligned with 'P1-P3 &amp; P4-P2' of CC3220-LaunchPad 2. The different connectors in the Audio Booster Pack are detailed below. For Bi-directional audio player

Connect headphone or speaker on J4 of 'Audio Codec Booster Pack' J3 on Audio Codec BP can be used for LINE -IN

Alternatively, Onboard MIC (U6) or Mono-Jack (J5) of 'Audio Codec Booster Pack' can be used for MIC-IN and U4, U5 can be used to connect speakers(Left & Right).

Running Bi-directional Audio Demo
Once the Audio-BP and LaunchPad connections are intact, Run the Reference Application. Based on mode selected, follow the steps
 * 1) Debug Mode
 * 2) * Build and download the application to the board as mentioned in '\docs\CC3220-Getting Started Guide.pdf'
 * 3) * Repeat above steps for second Launchpad
 * 4) Functional Mode
 * 5) * Press Reset (SW1) Button on both the Launchpads
 * 6) The device will try to connect to a pre-configure AP.
 * 7) By default the application will come up in Loopback mode(Mic-in to Audio-out) while actively scanning for another similar device.
 * 8) In Audio Streaming mode,  the following switches (on Launchpad) invokes microphone and speaker on/off actions.

Audio Streamer/Player

 * 1) Ensure Line-IN and Line-OUT points are connected appropriately on both the launch pads.
 * 2) Upon successful connection to AP following log will appear on UARt console [[Image:CC3220_wifi_audio_connect.png|center]]
 * 3) Now press SW2  on LP1, "Streaming Mode Enabled" message will appear on UART console of LP1 [[Image:CC3220_wifi_audio_unicast_lp1.png|center]]
 * 4) Wait till "connected" message appear on UART console of LP2 [[Image:CC3220_wifi_audio_unicast_lp2_connected.png|center]]
 * 5) Now press SW2 on LP2, "Streaming Mode Enabled" message will appear on UART console of LP2 [[Image:CC3220_wifi_audio_unicast_lp2_streammode.png|center]]


 * 1) RED will glow on both the LP.

Known Issues
None.