HydrogenAudio

CD-R and Audio Hardware => Audio Hardware => Topic started by: Yaztromo on 2013-05-05 20:26:57

Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: Yaztromo on 2013-05-05 20:26:57
I am presently recording some Amiga and C64 game audio to WAV using a Creative Xfi, Ubuntu, Audacity and ALSA.

For simplicity I totally removed Pulseaudio from the system.

The Xfi drivers don't appear to be particularly well documented. The Xfi/emu20k1 docs page on the Alsa homepage are blank!

What I would like to do is record everything at 44.1khz/16bit as anything more would be overkill and a waste of disk space. Does anyone know if any part of my chain would be performing resampling. It would be pointless recording at 44.1 if either the Xfi or ALSA is just resampling down from 48khz, I might as well just record at 48khz in that case.

I also have a dual boot with Win7, and I'm not adverse to running Audacity there. But I find the docs even more confusing. The "audio creation mode" in conjunction with DirectSound seems to suggest that no resampling is performed and the Xfi will work natively at 44.1khz, or is this just for digital inputs?

I'm confused  Does anyone understand what's really going on with Xfi sample rates?

P.S. As a side note, I found that ALSA maps the left and right input channels the wrong way round. I have to setup a .asoundrc file to swap them back the right way
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: Reiginsei on 2013-05-06 12:34:52
I found an article at creative's website that says the source has to be from the SPDIF in.

Bit Accurate Recording and Playback
http://support.creative.com/kb/ShowArticle.aspx?sid=10843 (http://support.creative.com/kb/ShowArticle.aspx?sid=10843)

"You can only achieve Bit-Matched when the audio data's recording source is from the SPDIF Input connector."
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: phofman on 2013-05-06 13:45:07
The Xfi drivers don't appear to be particularly well documented. The Xfi/emu20k1 docs page on the Alsa homepage are blank!


The incomplete xfi driver was provided by Creative without further information.

Quote
Does anyone know if any part of my chain would be performing resampling. It would be pointless recording at 44.1 if either the Xfi or ALSA is just resampling down from 48khz, I might as well just record at 48khz in that case.


The driver does not resample, neither does alsa (hw:X or plughw:X device). XFi? I do not know, there no source code for its firmware available. If you want to make sure Xfi avoids resampling, use 48kHz as that used to be the core frequency of earlier Creative cards.



Quote
P.S. As a side note, I found that ALSA maps the left and right input channels the wrong way round. I have to setup a .asoundrc file to swap them back the right way


If that was a bug in alsa in general, it would have been discovered long time ago. It may be a bug of the xfi driver though, I doubt it has been tested extensively as not many people use this hardly supported card in linux.
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: Yaztromo on 2013-05-06 15:07:45
Many thanks. I'm a lot clearer.

Audacity has a display called "actual rate" which is showing 44100.  So if ALSA doesn't resample and neither does the driver, then I'm reasonably positive the card isn't doing any resampling.

Quote
If that was a bug in alsa in general, it would have been discovered long time ago. It may be a bug of the xfi driver though, I doubt it has been tested extensively as not many people use this hardly supported card in linux.


Still, rather strange I'm first person to find this bug. Maybe others have come accross but never reported it.
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: saratoga on 2013-05-06 15:16:03
I don't know why you would assume there isn't resampling. Test and see.
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: Yaztromo on 2013-05-06 17:35:30
I don't know why you would assume there isn't resampling. Test and see.


Okay, how do I go about testing this?
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: phofman on 2013-05-06 21:11:45
then I'm reasonably positive the card isn't doing any resampling.


AFAIK the older audigy cards had their internal DSP and the downstream DACs/ADCs running at 48kHz and resampled in hardware to the requested samplerate.

I do not know about X-fi.

Quote
Still, rather strange I'm first person to find this bug. Maybe others have come accross but never reported it.


Certainly not for the more common drivers/cards. Are you sure your cable is correctly wired? But again, the x-fi driver can be buggy.
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: saratoga on 2013-05-06 21:35:43
I don't know why you would assume there isn't resampling. Test and see.


Okay, how do I go about testing this?


Play full scale 21KHz tones, record them, and see if/where they alias.
Title: Does any part of the chain resample when I record with XFi and ALSA
Post by: bennetng on 2013-05-07 18:33:56
I don't know about Linux but I've used 3 models of X-Fi cards with SPDIF input. "Bit matched recording" must be enabled to prevent resampling. This mode is same as "External SPDIF sync" or "SPDIF slave mode" in other audio interfaces.

X-Fi XtremeMusic (PCI):
Need a separate I/O module to perform bit-matched recording:
http://ask.creative.com/wwimages/audio_int...vity_module.jpg (http://ask.creative.com/wwimages/audio_int/xfi/xfi_io_connectivity_module.jpg)
The card itself has a SPDIF in jumper pin similar to Live/Audigy but that always apply resampling even in matched sample rate (e.g. 44.1k to 44.1k)
http://kxproject.narod.ru/help/images/a2_ad_ext.jpg (http://kxproject.narod.ru/help/images/a2_ad_ext.jpg)

X-Fi Titanium/Titanium HD (PCIe):
Just use the optical input and enable bit-matched recording will be fine.

I made some illustrations of X-Fi bit-matched recording in the Jplay thread here:
http://www.hydrogenaudio.org/forums/index....st&p=829184 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=92856&view=findpost&p=829184)
http://www.hydrogenaudio.org/forums/index....st&p=829323 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=92856&view=findpost&p=829323)