Hello, I builded a USB audio transport based on reference USB audio 2.0 design software and I need to invert ONE channel (only right) phase polarity (by inverting a data sample for right channel), is there any chance to do it by software? Thank you very much.
Is it posible to get inverted one channel data output in USB Topic is solved
-
- Member++
- Posts: 26
- Joined: Tue Dec 03, 2013 6:57 pm
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
This is nice and straightforward. There are lots of places you can do this in the data path but you could do it close to the pin. That means:
/sc_usb_audio/module_usb_audio/audio.xc. Look in the deliver function for:
for(int i = 0; i < NUM_USB_CHAN_OUT; i++)
{
samplesOut = inuint(c_out);
}
This is where I2S gets the sample from the decouple core over a channel. In stereo, NUM_USB_CHAN_OUT = 2 so you can pick your channel and do:
samplesOut[0] = - samplesOut[0];
for example..
/sc_usb_audio/module_usb_audio/audio.xc. Look in the deliver function for:
for(int i = 0; i < NUM_USB_CHAN_OUT; i++)
{
samplesOut = inuint(c_out);
}
This is where I2S gets the sample from the decouple core over a channel. In stereo, NUM_USB_CHAN_OUT = 2 so you can pick your channel and do:
samplesOut[0] = - samplesOut[0];
for example..
Engineer at XMOS