This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Headset Dev Kit - Audio lags with USB

Other Parts Discussed in Thread: CC85X1USB-RD, TLV320AIC3204, CC8531, CC2590

Hi,

when using USB at the master the audio "lags". It happens about 4-5 times per minute for ~100ms.

I tried it out with a windows 7 PC and with a (different) linux pc - same problem.

It works, when I use the devkit without usb (analog input+output at master and slave), so it's not a RF problem but rather a usb/firmware problem.

I am using recent firmware 1.4.0 with standard (example) configurations.

Some ideas?

Thank you.

Jasmin

  • Hi Jasmin, 

    Only time we encounter something similar is when the OS is doing other tasks that disrupts the USB audio stream. We have not rooted this down to FW issues but the fact that you encounter this frequently on two different OS/PC is a little weird.

    Are you connecting through a USB hub?
    Is the frequency of the lag issue the same on those two PC/OSs?
    Are the two PCs the same hardware / models?
    When you say lag, does this mean the audio drops out or what?

    Regards, 
    Kjetil 

  • Hi Kjetil,

    yes, it's weird. The audio drops out for those periods of a few ms. Sometimes (~5%) it works one minute without a problem, but average are 2-3 drop outs per minute. I do not recognize a different behaviour with the 2 Test-Systems.

    I do not use a usb hub.

    PC#1: windows 7 64bit prof, ICH 7 USB

    PC#2: Linux Mint Debian 64bit, ICH 8 USB

    I use another usb cable or flash [the master to be slave] and [the slave to be master], if you think that's worth a try - but I don't think so.

    Are there more options to debug the firmware?

    Kind Regards

    Jasmin

  • Hi Jasmin, 

    Debug directly on the firmware is challenging. We use a USB sniffer tool (hardware + software) to capture the USB traffic and a log from such a tool when this occurs might reveal what is the issues (look at USB frames and timestamps). Like you I do not believe swapping the hardware (master <-> slave) will do anything, but it is a relatively quick test and will not hurt to do this. 

    You did not answer if the two PCs are the same (e.g are both a Dell Latitude D320 with same hardware/motherboard) or if they are completely different. 
    Do the lagging increase if you load the CPU harder?

    Been running the similar set-up on my end since you reported this this morning and have not heard a single drop-out or lag of any kind. 

    Regards, 
    Kjetil 

  • Hi Kjetil,

    thanks for your message. 

    Meanwhile I have swapped master<>slave - the problem persists.

    I flash the devices, when they are connected via USB to the PC (=>usb power) - and sometimes while sending audio to them via USB. Is that OK?

    One PC is a laptop with Acer Motherboard, the second is a TwinHead Durabook (S15s). 

    As I am not familiar with USB internals I captured data via USBlyzer and attached it - may that helps?

    Kind Regards, Jasmin

    devkit.zip
  • Hi Jasmin, 

    Thank you for the captured data. I'll have a look and see if we can figure out something.
    Flashing devices while connected to a PC and stream audio is OK.  

    Just to rule out a obvious candidate here, can you disable WiFi and see if the issues goes away?

    Regards,
    Kjetil 

  • Hi Kjetil,

    thank you! So if you need additional data/capture/info etc. just write a message.

    I disabled wifi now, but - as expected - it did not help.

    I think it is a firmware problem, because the same devices (at the same place) work correctly, when I flash the master to the "analog headset" (via line in and line out) without USB.

    Regards,

    Jasmin

  • Hi Jasmin, 

    Good to rule out the most obvious things though. 
    We where not able to look at the captured data due to us running 32bit and not 64 bit OS. Might get around this tomorrow.

    Kjetil 

  • Hi Jasmin, 

    The log was not so useful as it only shows events every 10ms from quite high up in the USB driver layers (we need log of every frame including detailed timing). 

    I assume you do not have access to a hardware analyzer (we use http://www.ellisys.com/products/usbex200/index.php but this quite expensive). 

    Can you send us the exact configuration/project files as used?
    Any chance you can test Win XP? We will run some test with your configuration files, Win 7 and Headset kit. 

    Would also like to send you a USB dongle to rule out any hardware issues completely. Can you send me your address (add me as friend and send it in a private conversation if desirable). 

    Regards, 

    Kjetil

  • Hi Kjetil,

    that's right - unfortunately I don't have access to such a hardware analyzer.

    I have now tested with winXP (on the twinhead laptop); the problem persisted. I flashed the master with standard configuration (usb headset master), nothing changed. Then I powered the master off and on and ...no dropout for ~1 hour with winxp. So I switched to win7 again and the drop-outs came back after several minutes; but I was not able to narrow it down to a specific OS/firmware combination; flashing several times /power off/on etc. and winxp seems to help, but it does not work reliably without (or not more than 1) dropouts per hour in USB mode with linux64/win7_64. After some flash procedures there were even more silence-periods (up to a few secs) than audio periods ... flashing again changed the situation to the "regular" drop-out scheme.

    I attached my configuration files - the only difference is the mic volume, you may try it out with win7 64bit or linux 64bit.

    I will send you my address in a private conversation.

    Kind Regards

    Jasmin

    headset.zip
  • Hi Jasmin, 

    Just to update potential readers here; the fault seems to be hardware related as a proven USB design (http://www.ti.com/tool/cc85x1usb-rd) is working just fine. and we are looking at what might be the root cause.

    Will post our findings here once we know more. 

    Best regards,
    Kjetil 

  • Hello Jasmin and Kjetl,

    I am in the development process of a new project right now and would like to hook onto your discussion if that is OK with you. I could start another threat, but let me first try here to get some feedback from you:

    My setup will have at the PC-side the USB_dongle type of interface and at the other side the headset_type of SDK.
    My question is: Will the USB_dongle make itself visible in the PC as Soundcard device? If not, what do I need to do to have the USB_Dongle make itself visible as Soundcard?
    I have to wireless transfer a dual_channel audio signal (not a stereo source, but 2 MONO signals) from a portable device into the PC were the PC recognises te USB_Dongle as an external Soundcard. Is this feasible in your opinion, if so, we order a USB_Dongle SDK + Headset SDK.
    If your advice is to order other SDK, please let me know. I realise the subject I ask is not exactly match your ongoing discussion, but as I read you already have experience in using the USB_Dongle for Audio. Thanks in advance for any help at this stage.

  • Hi Gerrie, 

    Sorry for the late reply here. 

    First, yes, the USB dongle will make itself visible as a soundcard device through standard USB audio classes (no drivers needed). For OS compability matrix, see the start page of the PurePath Wireless Configurator. 

    What you describe is feasible, but not that the CC85xx device will not mix the two mono signals, so this will be sent to the PC as a stereo (L+R)
    As of now we only have the USB dongle available as reference design (http://www.ti.com/tool/cc85x1usb-rd) but the Headset SDK can be set up to support USB as well. This SDK contains two boards, so if you have two separate physical sources for the mono signals you will need two SDKs. 

    Hope this answers your question.
    Best regards,
    Kjetil 

  • Hi Kjetil,

    Thank you for your clear answer. To be honest I did not wait for your reply and already ordered and received the CC85x1DK-Headset. Meanwhile I get it running exactly as what we expected it to do; The master at the PC USB port can receive two independand mono sources from the slave (analog inputs at the line right and left input socket). The two independand analog signals are supossed to remain seperated all the way to the PC, so your worry is not valid, the 2 signals must NOT be mixed. However I found some crosstalk and needed to remove the 2 MIC_BIas (2K2) resistors from the Slave to elimintae it. Normally this crosstalk will not be present and noticable I guess due to the low output impedance of the source that is connected to the 3.5mm input socket. In my case I think the output impedance of the sources was not low enough to prevent crosstalk and I solved it by removing the resistors. I will not connect electret microphones anyway to the 3.5mm input at the slave-side.

    What I now am working on to be able to set the input_volume at the master (received the audio from the Slave). I configured in the PurePath Wireless Configurator the minimum (-40dB) and default volumes (0dB) and the slider is able to move for the master microphone mixer, but it has no effect whatsoever. Even if I click 'MUTE' in the slider-menu. the audio is still received at the master. If it was a normal USB_soundcard, I was able to mute it isn't it? Any good idea on this? I checked for effect by using the standard windows recorder function, but also wrote software that reads the USB sound_samples and presents them in 2 seperated XY-graphs (oscilloscope-style).  

    Thanks in advance for your great support,

    Gerrie 

  • Hi Gerrie, 

    You will need to do two things for this to work. A little complicated, but this is due to the flexibility of the volume control in our offering (needs to support all scenarios and devices). I recommend reading the 'volume control panel' section of the configurator help system if you have not done so already.

    For the master you will need, as I assume you already have, to set the 'remote input volume' to have a minimum volume of lets say -10 dB and default could be 0 dB
    For the slave you will need to set 'input volume' control source to 'remote' with fixed offset set to 10 dB and minimum volume to -10 dB

    This will allow for input volume control remotely on slaves. 

    Hope this helps, if not let me know and we can take it from there. 

    Regards, 
    Kjetil 

  • Thanks Kjetil!

    I verified your solution immediately today and it works!
    I am now able to set the Slave -> Master received volume and even the MUTE tickbox in the USB_soundcard functions.
    This helps me forward quite a lot and I can now focus on the next items in the project.
    Without your help I very much doubt whether I could have get it to work only by reading the 'volume control panel' information.

    Anyway, I hope no big issues come up from here onwards, otherwise I trust you can help me again.

    Gerrie 

     

  • Hello TI-Team,

    Meanwhile I proceeded and achieved great progress. I have build my own modules that incorporate a CC8531, TLV320AIC3204 and a range-extender CC2590. A have been able to download the firmware into both modules and plugged the modules onto their Mainboards. These mainboards makes the system complete, one side holds the USB_connector and a DC/DC-converter for the module (3.3V from 5V USB), the other Mainboard holds hardware that will feed 2 channels audio into the 'Slave' so the master can read the audio through USB. The RF-link is fine, pairing no-sweat so at first I was happy.
    Now the issue I observe is I don't get the audio into the USB at the Master. Remember my modules are the same for the PurePath platform.
    Luckily I own the CC85xxdk-headset reference design hardware kit. This kit I have used to turn the direction into were the audio is send over the link around from PC-out to Slave (normal usage for a headphone) into Slave_input_to_PCUSB. Just for debugging I paired the module marked 'Master' in the development-kit to my Slave which transmits the audio. To my surprise this worked fine. Then I used exactly the same configuration (written in the PurePath Configurater) and flashed it again into my own environment -> NO AUDIO over the link to the PC....
    Then I used the default reference-headset firmware just to confirm USB signals in my design were correct and it worked fine -> Audio from my hardware from PC_USB to my Slave hardware OK.
    Then I revert back to the configuration were PC_USB is supposes to be input from a PurePath Slave (Wireless 2CH line in) and re-connected to the TI Master from the kit -> Audio from Slave to Master visible in PC.

    Now the weird thing: When using the same configuration-file and flash the TI Slave in the development kit with the proven configuration, no audio is visible in the PC! The configuration-file is exactly the same, just change from the Master-hardware to Slave-hardware. I assumed both the Slave and the Master are exactly the same hardware as in my modules this is also! I have checked over and over the documentation but cannot see any deviations why a Master is a Master and a Slave is a Slave. I am stuck at this point and look desperate for your assistance.

    Sorry for the long post...I wanted to be as clear as possible and draw your attention on this.

    Looking forward to your reply,



    Gerrie
  • Kjetil,

    So everyone with a headset dev kit should suffer this issue? Recently I picked up my setup and I'm facing the same thing. Regardsless of the distance between the Tx and Rx there are audio drops.
    If it is still relevant, I have a Beagle USB Analyser. So I can make USB loggings if necessary.