NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

C5000 Connected Audio Framework

From Texas Instruments Wiki
Jump to: navigation, search

The C5000 Connected Audio Framework supports slave USB Audio Class and HID on the C5000 device.

Contents

Overview[edit]

  • USB Audio Class and HID framework allows for playback and record of audio to host USB. (C5000 is operating as USB Slave device)
  • No drivers on host required, since most modern hosts support Audio Class 1.0 devices natively.
Usbac.jpg

USB Audio Class on 55x[edit]

5515usbac.jpg

Features[edit]

  • USB full-speed operation (Device is slave)
  • Audio Device Class 1.0 compliant
    • Audio Record
      • 16-bit PCM
      • 16 kHz or 48 kHz sampling rate (compile-time option)
      • Mono
      • Mute control
      • Asynchronous synchronization
    • Audio Playback
      • 16-bit PCM
      • 48/16 kHz sampling rate
      • Stereo/mono
      • Mute and volume control
      • Adaptive synchronization
  • HID
    • Playback mute
    • Playback volume up / down
    • Record mute


Roadmap[edit]

v2.0[edit]

  • Additional playback and record rates (16, 32, 44.1)
  • Stereo microphone
  • ASRC in record path
  • Updated ASRC for large rate changes (16<->48, 44.1<->48khz, etc.)

Future versions[edit]

  • Codec rate changes
  • Predefined ASRC options for different combinations of quality
  • USB 2.0 Audio class
  • USB High speed mode

Download[edit]

Documentation[edit]

  • Please see the <install directory>\docs directory of the product.

Support[edit]

Known Issues[edit]

  • Build 1.52.01 has the following issues:
  1. None known currently
  • Build 1.52.00 has the following issues:
  1. Documentation is missing from docs directory. (This will be fixed in newer releases)
  • Build 1.51.00.03 has the following issues:
  1. Platform file: info
  2. Pop-click sounds at low volume: info
  3. MUTE ALL: info
  4. No audio when right channel is muted: info

Requirements[edit]

C5515 EVM[edit]

Install the Crystal on the 5515 EVM[edit]

  1. Place 12 MHz Crystal oscillator on OSC1 socket such that pin 1 of oscillator (sharp corner) is aligned with pin 1 of socket (bottom left) - Hint: the text of the Crystal should be oriented same as text of EVM silk screen
  2. Place jumper/ shorting block on JP9 (CLK_SEL) to use 12MHz crystal as clock input

C5535 eZDSP[edit]

  • C5535 eZdsp
  • Micro SD Card
  • SD Card Reader & micro SD card adapter
  • USB Cable (Standard mini Type-B)
  • Speakers or headphones with 3.5mm jack
  • Microphone with 3.5mm jack

Requirements for v01.52.00[edit]

  • The C5000 Connected Audio Framework v1.51.00.03 has been built and tested with the following tools versions:
    • Primary conifguration
      • CCS 4.2.4 (This comes with: BIOS 5.41.2 and C5000 Compiler version 4.3.9)
    • Secondary configuration
      • CCS4 4.2.3.0004
      • BIOS 5.33.06. This can be obtained from: here
      • C5000 Compiler version 4.3.6. This can be obtained from: here
  • Please refer to the readme.txt file in the <install directory>\C55_Connected_Audio_Framework for any additional details such as installation directory, build tools, BIOS versions, etc.
Helpful tips image.jpg

Useful Tip Please refer to the readme.txt file in the <install directory>\C55_Connected_Audio_Framework for any additional details such as installation directory, build tools, BIOS versions, etc.

Unsupported platforms[edit]

5515 EZDSP[edit]

  • This platform is not currently supported, though it is possible to modify the framework to make it work.
  • Please see Here for details
  • See this FAQ

5505 EZDSP[edit]

Installation Instructions[edit]

Installation[edit]

  1. Run the installer to install the C5000 Connected Audio Framework
    1. Please refer to the readme.txt file in the <install directory>\C55_Connected_Audio_Framework
  2. Check that the requirements in C5000_Connected_Audio_Framework#Requirements are met (i.e. CCS and DSP/BIOS are installed)
Warning Warning: Please make sure to install in a directory that does NOT have spaces. For example "c:\c55\connected-audio" is OK, but "c:\my projects\connected-audio" will result in build problems.

Re-Building the C5000 Connected Audio Framework[edit]

Command Line[edit]

  • Please refer to the readme.txt file in the <install directory>\C55_Connected_Audio_Framework

Code Composer v4.x[edit]

  • Please refer to the readme.txt file in the <install directory>\C55_Connected_Audio_Framework

Installation of C5000 Connected Audio Framework to EVM/DSK/eZDSP using SD Card[edit]

  1. Download and install the package
  2. Copy <filename>.bin to SD card in root directory. (Please see Creating a SD card boot image for C55x for more details)
    1. Rename filename to boot5505.bin for the C5515/14/05/04.
    2. Rename filename to bootimg.bin for the 5535 and newer
  3. Plug into 5515 EVM in slot 0 or Plug into the slot 1 of the eZDSP.
  4. Plug in power, speakers, microphone
  5. DSP will boot from the SD card. The display will start displaying.
  6. Plug into PC, audio device should be recognized by the operating system.
    1. Check the system audio volume to see if USB device is available
    2. Use PC media player (ex: Windows Media Player) to play a file, audio will be output from speakers plugging into the EVM/DSK/eZDSP
    3. Run a audio recording application (ex: Start->Windows recorder) to record audio from the microphone attached to the input.
Helpful tips image.jpg

When using SD card to boot, please make sure your NOR, NAD and other bootable sources are cleared before using the SD card boot. Otherwise, my not boot into the SD card image.

Expected Outcome[edit]

  1. New hardware found: USB Device (VID:0451, PID:9010)
  2. Double-clicking on the Volume icon in the Windows task bar displays "USB Audio Device" below the audio mixer
  3. Playback of audio is heard at the "HEADPHONE" jack of the EVM
  4. Audio input is received from the "STEREO IN 1" jack of the EVM
  5. Push buttons control playback volume:
    1. SW7 (UP) increases volume
    2. SW14 (DN) decreases volume
    3. SW13 (STOP) mutes volume

Frequently Asked Questions[edit]

Product Features[edit]

Q: Does the USB Audio Class support 24-bit samples at 96 ksps?[edit]

  • A: No, the current USB Audio Class does not support 24 bit samples at 96ksps.
  • A: This is a roadmap feature that will be supported at a later date. Please check this wiki site for details for updates. Please note that it was filed internally at TI as enhancement request #493.
  • If you are interested in this feature, please provide more use case information in the C5000 E2E forum: Do you need stereo or mono? Which codec it is connected to? What is the application? This information is used to create engineering and testing plans to make sure we can meet your needs.

Q: Is 44.1Khz playback supported?[edit]

  • A: It can be supported through a SW change, but is currently not avaialable in the product (as of v1.52.00)
  • A: This is filed internally as TI enhancement request #1042

Q: Does the framework offer full duplex audio?[edit]

  • A: Yes

Q: Do I need a special driver for Windows?[edit]

  • A: No, Windows XP SP3 and newer include a generic USB audio class driver which works well.

Q: Does it work with Linux?[edit]

  • A: Yes.
  • A: Note, you must make sure your Linux distribution supports generic USB audio class.

Q: Does it work with MAC?[edit]

  • A: Yes.

Q: Is it operating in USB High speed?[edit]

  • A: No, it is operating at USB full-speed operating.

Q: Can this support more than stereo channels?[edit]

  • A: No, not at this time, but it is on the roadmap.

Q: Can stereo record be supported?[edit]

  • A: No, not at this time (v1.52.00), but it is on the roadmap.
  • A: TI Internal enhancement request: 1044

Q: Can the demo be booted on the Flash?[edit]

  • A: Yes, either built in flash or SD card.

Q: Is there any external memory used?[edit]

  • A: No

Q: How many channels of DMA are used?[edit]

  • A: One for record (mono)

Q: Is there any DARAM or SARAM requirements?[edit]

Q: Is USB Suspend / Resume supported?[edit]

  • A: This is supported.

Q: Is USB remote wake-up supported?[edit]

  • A: This is supported.

How many audio endpoints can be supported?[edit]

Q: Are the drivers WHQL Certified?[edit]

  • A: No, the drivers are not WHQL certified.
  • A: TI does not provide any INF file for this product as it uses the standard drivers built into Windows, and as such, requires no driver files. Users of the product who choose to ship an INF file and require WHQL certification need to submit their product and their drivers to Microsoft for certification.

Hardware[edit]

Q: Is the C5000 a I2C Master or slave?[edit]

  • A: Master

Q: What is the I2S bus configuration?[edit]

  • A:
Format: I2S/left-justified format.
Mode: Serializer is configured as a slave.
Wordlength: 16-bit data word.
Pack: Data packing mode disabled.
Data delay: 1-bit data delay.
Clock polarity: Receive data is sampled on the rising edge and transmit data shifted on the falling edge of the bit clock.
Frame synch polarity: Frame-synchronization pulse is low for left word and high for right word.

Q: Is the C5000 operating as a USB Host or USB Device?[edit]

  • A: USB Device

Q: Is the C5000 Audio function operating with a Synchronization Type of Asynchronous, Synchronous (slave), or Adaptive?[edit]

  • A: Adaptive Isochronous is used on playback. There is an ASRC (Asynchronous Sample Rate Converter) in the playback path.

Asynchronous synchronization is used on record. Sample rate conversion for the record path is performed on the Host.

Q: Are we using ASRC on both playback and record path?[edit]

  • A: No, ASRC is used for playback only

Installation[edit]

Q: Which version of CCS4 is needed?[edit]

Q: Which version of DSP/BIOS is needed?[edit]

Q: Which version of the compiler is needed?[edit]

Q: Where do I install the DSP/BIOS? (i.e. Which directory should I install to?)[edit]

Q: Where do I install the compiler? (i.e. Which directory should I install to?)[edit]

Q: How do I select which compiler to use in CCS?[edit]

Q: I used an older version of CCS4 and I had errors in building the projects. What should I do?[edit]

  • A: The earlier version of CCS4 (CCS4 4.1.x for example) had problems handling TCONF. Please follow workaround to resolve the problems

For each project and for both debug and release profiles:

Right click on project -> Build Properties

Macros Tab

Under CCS 4.2.3, TCONF_OUTPUT_DIR is defined in “System Macros”.

For CCS 4.1.x, this System Macro isn’t defined, so it needs to be added manually for each build profile (Release, Debug).

Add the following by clicking “New” button on right hand side of “Macros”.

Name: TCONF_OUTPUT_DIR

Type: Directory

Value: <install directory>/build/CSL_USB_IsoFullSpeedExample_Out/Release.

It is recommended the CCS4 be upgraded to version 4.2.3.0004 or later. Here is the link to download CCS4 http://processors.wiki.ti.com/index.php/Download_CCS

Q: Which platform should be used in the target configuration file (c5535_ezdsp.ccxml)?[edit]

  • A: Since C5535 device, the USBSTK5535 board file and GEL file were newly added in CCS 4.2.4, to keep the compatibility of the target configuration file, we still use the C5515 device, the USBSTK5515 board file and GEL file for the target configuration file in current release. It may be changed in a future release.

Q: Why is there a warning about CSL_USB_IsoFullSpeedExample_Out.pjt when rebuilding the project? - "This project contains unresolved buildable linked resources. It might not build as expected" (01.52.01.00 and older)[edit]

  • A: CSL_USB_IsoFullSpeedExample_Out.pjt is a CCS3.3 project file that was removed from the Connected Audio Framework (CCS3.3 is not supported). Remove the warning by deleting CSL_USB_IsoFullSpeedExample_Out.pjt from the project view.

Usage[edit]

Q: If I am using the HID buttons, what happens to the volume?[edit]

  • A: It sends it to windows as a HID, then Windows sends it back to device to modify the codec.

Q: Which HID keys on the EVM perform which function (mute, etc.)[edit]

  • A: TBD

Q: Are the customer programmable API for the ASRC?[edit]

  • A: Not at this time

Q: How do I upgrade the CSL?[edit]

  • A: As of version 1.51.xx.xx the CSL is a slightly upgraded version of CSL version 2.50. If a newer version of CSL is available, you can copy the CSL files into the CSL directory of the framework. However, this has not been tested.
  • A: We plan to enable a library version of the CSL in future releases of the framework.

Q: How do I know which version of the framework has been isntalled?[edit]

  • A: Please check the readme in the installation directory.

Q: Where can I insert my own algorithm into the record and/or playback path?[edit]

  • A: Please check the app_audio_alg.c file. There are two functions PbAudioAlgTsk and RecAudioAlgTsk. They each have a section to insert algorithms:
        /*                                 */
        /* Insert Record audio algorithm here */
        /*                                 */

and for the playback path:

        /*                                      */
        /* Insert Playback audio algorithm here */
        /*                                      */

Q: Do I need a device driver for this framework?[edit]

  • A: No device driver is needed because this framework is using the standard USB audio class and HID drivers which are built into the standard operating system.

Q: Can I change the UID/PID of the 55x?[edit]

  • A: Yes. You need to set it to your own UID/PID combination in the code.

Q: What are the 55x memory requirements for the C55 Connected Audio Framework?[edit]

  • A: Please check the documentation included with the product for details on the memory consumption.
  • A: For the 1.51.00.03 build, the following was reported by sectti is File:Secttireport c55connectedaudio 1 51 00 03.zip
  • A: For the 1.52.00 build, the total size has been decreased.
  • A: In version 2.00.00.01 the MIPS and memory are as follows. Please check the release notes and documentation for the most up to date information.
    • No record-side ASRC (mono): ~98.57kB / 29Mhz (note if stacks are halved, size will be 88.97)
    • With record-side ASRC (mono): ~99.97kB / 36Mhz (note if stacks are halved, size will be 87.67)


Helpful tips image.jpg

For the most accurate memory size, re-build the code with the settings you need for your application and then use these tools: sectti

Q: How can I make the 5535 eZdsp backlight brighter?[edit]

  • A: C5535 eZdsp LCD Back light needs to be enabled (set GPIO12 high). LCD back light uses 13V voltage converter. 13V voltage converter enabled by setting GPIO12 high. LCD screen will be about 2x brighter with back light.

Q: What happens when the PC hibernates?[edit]

  • A: After PC hibernate, DSP will power down because there is no more power on USB. Then, when the PC wakes up, the DSP will boot up and begin USB audio class operation. If media player is playing during hibernate, the audio will stop as the PC halts media player. After waking up, the DSP will receive power upon PC boot up, and will be running the audio class software before windows is fully operational. Once windows is operational, the dsp will already be running as usb audio class, so windows media player will continue playing to the dsp device.

Q: Is the C5515 eZdsp also supported?[edit]

  • A: Currently no.
  • A: It is possible to make it work with the following code changes:
  1. In i2s_sample.h,
    • Uncomment #define USE_I2S0_PB /* define to use I2S0 */
    • Uncomment #define USE_I2S0_REC /* define to use I2S0 */
    • Comment #define USE_I2S2_PB /* define to use I2S2 */
    • Comment #define USE_I2S2_REC /* define to use I2S2 */
  2. In csl_usb_iso_fullspeed_example.c,
    • Comment pcgcr_value |= CSL_FMKT(SYS_PCGCR1_I2S0CG, DISABLED);
    • Add pcgcr_value |= CSL_FMKT(SYS_PCGCR1_I2S2CG, DISABLED);
    • (Release 01.51.00.04 and older) Add semicolon to line 156 - gpioIoDir = (((Uint32)CSL_GPIO_DIR_OUTPUT)<<CSL_GPIO_PIN10)

Q: Is the C5505 eZdsp also supported?[edit]

  • A: No. The USB peripheral of the C5505 DSP is not available on the C5505 eZdsp board.

Q: How do I enable 48khz record?[edit]

  • A: see the definitions as below

Playback=2 channels at 48khz, Record=1 channel at 48khz:

Defined:

  • REC_SAMPLE_RATE = RATE_48_KHZ
  • PLAY_SAMPLE_RATE = RATE_48_KHZ
  • SAMPLE_RATE_TX_48kHz
  • SAMPLE_RATE_RX_48kHz
  • SAMPLE_RATE_I2S_48kHz

Undefined:

  • ENABLE_PLAYBACK_TWO_SAMPLE_RATES
  • ENABLE_STEREO_RECORD

Q: What is the VID/PID?[edit]

  • A: VID:0451 and PID:9010

Q: Which files should I change to modify the I2S configuration for a different codec?[edit]

  • A: Please review the dda_i2s.h and dda_i2s.c files. These files contain the functions that initialize and program the I2S port.

Q: Why is the input sensitivity the 5515 EVM Stereo IN 1 (J9) differ from the 5535 EZDSP sensitivity?[edit]

  • A: The EVM software uses J9 Stereo In 1 which is line level. This is because the AIC3204 MICBIAS output is only connected to the on-board microphones via JP12 "MIC_BIAS" jumper. To use an external passive mic, i.e. like one on a headset, you need to blue wire the AIC MICBIAS output to a stereo in connector. Please see p. 19 (as of 2/4/10 version of | schematic) of the 5515 EVM Schemiatics (Codecs) for details of J9 and AIC MICBIAS.

Troubleshooting[edit]

Q: When I set the Windows master volume to maximum and WAV volume to maximum, the sound is very lound and saturated.[edit]

  • A: This is a function of the speaker and codec chosen for the solution. You can turn the volume down to reduce distortion at high volume levels or choose a different speaker and/or codec combination.

Q: Why do I hear pop/click sound, when I adjust the playback volume?[edit]

  • A: With C5535 eZdsp demo, if you change the playback volume by press the SW1 or SW2 while play a tone or almost silient audio, you will hear pop/click sound.
  • The audio pop/click sound during the volume change is caused by the AIC3204. AIC3204 has the minimum step 0.5db for changing the volume. The 0.5db step will cause audible pop sound for tone or any other close to silent audio (for normal music, it is not audible). The soft-stepping will not solve the problem, because 0.5db is the minimum unit for the soft-stepping. We will fix this problem in next release.
  • Internal TI tracking number is 765.

Q: Why doesn't the MUTE ALL button work?[edit]

  • A: The 55x is sending the HID report, but the standard windows driver does not recognize the HID report.
  • A: this is TI internal number 770.

Q: The DSP enumerates as "USB Device" with a description of "USB Composite Device". Can I change this?[edit]

  • A: Note that this is just the text string that is supplised to the PC. The USB descriptors are for USB audio class and HID, and this enumation string is just the text that is displayed for end users.
  • A: The current USB enumeration strings are set to NULL. These can be set to your own product description and name.
  • A: The text strig will be updated in future release of the product. These are TI internal number: 772 and 411.

Q: When I first plug in the eZdsp5535 into my Windows 7 PC (x32 or x64 bit), the device driver install fails.....[edit]

  • A: You may see a message such as "Device driver software was not successfully installed" even after allowing windows to auomatically search Windows Update for drivers.
  • A: If you have an OEM install of windows, the USB audio stack may not have been installed. You can check for the usbaudio.sys file in the system32 folder. Retail versions should have it installed. See here for additional information. Plugging in the device or another audio device for the second time seems to make it install the USB audio driver stack.
  • A: Please plug/unplug the eZdsp5535 and plug it back in.
    • This has been tested and works. Testing has shown that in systems that lack the usbaudio.sys file prior to plugging in the USB device that after plugging it back in the 2nd time, the usbaudio.sys gets installed by windows.

Q: I don't hear any audio when right channel is muted. / Q: Why do I still hear faint audio on right channel when I use windows balance control to output left channel only?[edit]

  • A: This is bug 771 in build 1.51.00.03
  • A: Only Right channel audio playing from left and right channels of headphone output during stereo playback. Reproduce by changing the Volume "Left/Right Balance Slider". Reproduced in Windows XP and Linux. When left channel balance 100% and right channel 0% - no sound on either channel. When left channel balance 0% and right channel 100% - loud sounds on both channels. When left channel balance 95% and right channel 5% - quiet sounds on both channels.
  • A: Note that this issue is being investigated, and appears to be Windows related.
  • A: For the faint audio, the test case has windows volume control balance set to left or right completely, with higher volume. Audio on opposite channel from device is faint when it should not have any audio. This was reproduced on the DSP and on PC with Windows, so it appears to be a Windows bug. If the balance control is done in windows media player, the opposite channel is completely muted as expected.

Q: The display appears frozen.[edit]

  • A: The display only updates when there is audio playing through the USB. If there is no audio, then the display will not update.

Q: I don't hear any audio when I plug in the demo[edit]

  • A: Try the following:
  1. Check to see if the eZDSP/EVM is powered ON and plugged into the PC.
  2. Does the eZDSP/EVM have the USB Audio class software in boot memory? (i.e. Is it burned into the EEPROM or loaded on the SD Card?)
    1. Are there other bootloaders which are running before the USB audio class code boots?
  3. Check that your PC OS can see the 55x as a USB audio class device.
    1. On Windows XP, please check Control Panel-->Sound and Audio Device Properties-->Audio and check the "Sound Playback" and "Sound Recording" default device. The C55x should be there as a enumerated device. As of build 1.51.00.03, it will show as, "USB Device", but this could be a different name if it has been changed by the user or in newer software updates.
  4. Is your audio playing/application recording using the default device or the C55 as the audio devices?
    1. In Windows Media Player, Check the Tools-->Options-->Devices-->Speakers-->Properties-->Sound Playback/Audio Device to use to see if the C55 has been selected (if it is not already the deafult audio device)
      Windows XP media player speaker properties
  5. You may need to reboot your PC if it does not recognize the USB audio device. The need for this may vary by PC and operating system due to operating system differences.
  6. Check if you have an speaker/headphone plugged into the audio output of the eZDSP/EVM.
  7. Check if you have a microphone or audio source plugged into the audio input of the eZDSP/EVM. Make sure it is plugged ALL the way into the connector.
  8. Check if your audio player/source is playing music.
  9. Check if your audio recording application is recording and that your audio source to the DSP is playing music.

Q: Why don't I see the FFT display when I have the balance 100% to the right?[edit]

  • A: The FFT display is computed from the left channel only.

Related[edit]



E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article C5000 Connected Audio Framework here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article C5000 Connected Audio Framework here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article C5000 Connected Audio Framework here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article C5000 Connected Audio Framework here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article C5000 Connected Audio Framework here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article C5000 Connected Audio Framework here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article C5000 Connected Audio Framework here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article C5000 Connected Audio Framework here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article C5000 Connected Audio Framework here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity