The data of the USB audio input alternately becomes zero Topic is solved

If you have a simple question and just want an answer.
xmosfan
Member
Posts: 13
Joined: Tue Dec 13, 2016 9:45 am

The data of the USB audio input alternately becomes zero

Post by xmosfan »

Hello.
I'm checking the USB audio in/out and MIDI in/out with XK-AUDIO-216-MC.
Following is my setting of USB audio (2in/2out) and MIDI (in/out) in Makefile.

Code: Select all

XCC_FLAGS_2i2o2mxxxx  = $(BUILD_FLAGS) -DNUM_USB_CHAN_OUT=2 -DNUM_USB_CHAN_IN=2 -DMIDI=1 -DSPDIF_TX=0 -DSPDIF_RX=0
I connected LINE OUT1 and LINE IN1 with a cable. (analogue loop back)
Then, I connected to PC with the USB cable. Thesycon windows driver (Ver.3.34) had been already installed into the PC.
I played sine wave from USB audio out - "Analogue 1", and checked the recorded wave data from USB audio in - "Analogue 1".
The wave data alternately became zero.
I tried with MME, DirectSound, ASIO, several sampling rates and bits, but the results were the same.
I tested 2 versions of USB Audio 2.0 Device Software - Ver.6.12.5 and Ver.6.15.2. the results were the same, too.

When I changed Makefile like following, and checked with same channels, it worked fine.

Code: Select all

XCC_FLAGS_2i10o10mxxxx  = $(BUILD_FLAGS) -DNUM_USB_CHAN_OUT=10 -DNUM_USB_CHAN_IN=10 -DMIDI=1 -DSPDIF_TX=0 -DSPDIF_RX=0
This setting has 10 inputs ("Analogue 1" - "Analogue 8", "IN9", "IN10") and 10 outputs ("Analogue 1" - "Analogue 8", "OUT9", "OUT10"). It seems that greater than 8 inputs or/and 8 outputs helps normal operation. But I would like to design it with 2 inputs and 2 output.
What should I do for it?

Thanks in advance for your reply.
You do not have the required permissions to view the files attached to this post.
View Solution
xmosfan
Member
Posts: 13
Joined: Tue Dec 13, 2016 9:45 am

Post by xmosfan »

I checked with the analogue oscillator. The recorded USB audio in data alternately became zero.
So, I guess that something is wrong in USB audio in.
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1164
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Hi,
are you setting:

Code: Select all

-DI2S_CHANS_DAC=2 DI2S_CHANS_ADC=2
anywhere (Makefile or customdefines.h)?

NUM_USB_CHAN_.. and I2S_CHANS_.. are independently controlled. This is needed in the case of SPDIF having it's own channels or PDM mics input etc...
xmosfan
Member
Posts: 13
Joined: Tue Dec 13, 2016 9:45 am

Post by xmosfan »

infiniteimprobability wrote:Hi,
are you setting:

Code: Select all

-DI2S_CHANS_DAC=2 DI2S_CHANS_ADC=2
anywhere (Makefile or customdefines.h)?

NUM_USB_CHAN_.. and I2S_CHANS_.. are independently controlled. This is needed in the case of SPDIF having it's own channels or PDM mics input etc...
Oh...! I misunderstood that `I2S_CHANS_DAC' and `I2S_CHANS_ADC' are parameters for TDM.
I added above definitions and it goes well!
Thank you!