Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

E-MU 0404 and Linux (also issues with REW at 96 kHz)
E-MU 0404 and Linux (also issues with REW at 96 kHz)
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 21st June 2019, 08:54 AM   #31
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
The java patch has been given a go-ahead, now it is my turn. It will take a while though, too many projects underway...

<Sound Dev> Support for linux alsa PCM devices
  Reply With Quote
Old 27th June 2019, 07:31 PM   #32
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
The new "stereo" option in latest beta REW works correctly, java picks the 2ch modes and selects 2ch altsettings all the way up to 192kHz.

For 96kHz the REW generator/analyzer combo is rock solid. For 192kHz there are dropouts in the stream, making the spectrum "flicker", unable to average for any useful time.

Alsa works with two blocks - period and buffer. Period is time/buffer between two soundcard interrupts. Buffer is the block of samples used by the soundcard's DMA engine. While e.g. ASIO has hard-coded 2 periods in buffer, alsa has the number of periods within buffer configurable from 2 to whatever the driver allows.

In java the buffer size is configurable, directly related to the buffer size param in REW. Indeed, 128k of samples translate to buffer_size of the alsa driver (128k = 131072):

Code:
pavel@precision:~$ cat /proc/asound/USB/pcm0p/sub0/hw_params 
access: RW_INTERLEAVED
format: S24_3LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 3840
buffer_size: 131072
However the period size, which tells how often java thread is asked/awoken to supply/provide data, is hardcoded at 20ms (i.e. 3840 samples at 192kHz samplerate)

jdk/PLATFORM_API_LinuxOS_ALSA_PCM.c at 6bab0f539fba8fb441697846347597b4a0ade428 * openjdk/jdk * GitHub

jdk/PLATFORM_API_LinuxOS_ALSA_PCM.c at 6bab0f539fba8fb441697846347597b4a0ade428 * openjdk/jdk * GitHub

That value works OK for simple utils like aplay/arecord (which produce no xruns down to the minimum 500us period time specified by the device), but is apparently too small for processing in java.

When I work on the patch for PCM devices, I will try to make this value also configurable via some environment variable. The latency will grow, but that is no problem for use case like this. Hopefully the java audio engine will work OK with larger period times, IMO there is not reason not to. E.g. 50ms or more (200 ms) should make the processing stable, IMO. Raising the period time is a standard cure for these problems (if the alsa application allows configuring this parameter which is not the case of current java, unfortunately).

Last edited by phofman; 27th June 2019 at 07:36 PM.
  Reply With Quote
Old 27th June 2019, 07:43 PM   #33
Interference is offline Interference  Italy
diyAudio Member
 
Join Date: Jan 2013
Location: Padua
I thought I had answered but apparently this was not the case. I can confirm REW with 96 kHz stereo access works OK.



Also 192 kHz works fine for me on my desktop PC but not on my laptop where indeed I have dropouts and even crashes. Not sure if it's a matter of hardware or kernel / alsa / JRE version.
  Reply With Quote
Old 27th June 2019, 07:54 PM   #34
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
The period time of 20ms is very likely too low for high-latency java at 192kHz. I will add the period time env variable in my java build and see what a change does.
  Reply With Quote
Old 2nd July 2019, 01:45 PM   #35
BSST is offline BSST  United States
diyAudio Member
 
Join Date: Jul 2018
Hi,

In hope of doing FFT spectrum analysis, I recently bought a E-MU 0404 USB from a guitar shop in California (mail order), and of course it came with no manuals or accessories.

Is this device powered via the USB port? It shows no signs of life as yet. I note that it features a 5V power jack, but of course no ac wall wart was included--- hence, my question about powering the unit.

Can anyone point me to a source/links for manual, drivers, etc, for the USB version of the 0404? I downloaded a manual for the computer card version, but it includes no info re the USB version. Via Google searches, I've found some enticing links. One led me to the to the PCI version, not what promised. My paranoia, perhaps groundless, makes me nervous about some of the sites--- some download buttons make me think of event horizons surrounding black holes. I do not want to get sucked in.

Thank you for any advice.
  Reply With Quote
Old 2nd July 2019, 02:06 PM   #36
Interference is offline Interference  Italy
diyAudio Member
 
Join Date: Jan 2013
Location: Padua
Quote:
Originally Posted by BSST View Post
Hi,

In hope of doing FFT spectrum analysis, I recently bought a E-MU 0404 USB from a guitar shop in California (mail order), and of course it came with no manuals or accessories.

Is this device powered via the USB port? It shows no signs of life as yet. I note that it features a 5V power jack, but of course no ac wall wart was included--- hence, my question about powering the unit.

Indeed you need to power it up with an external power supply. Unfortunately it's hard to understand which exact DC jack you need as they come in different sizes without much markings (I have no precision tool to measure the inner/outer diameter on mine, unfortunately).


I think one could build a dedicated USB cable to power the thing, not sure it will work as well as with a separate power supply though.



Quote:
Can anyone point me to a source/links for manual, drivers, etc, for the USB version of the 0404? I downloaded a manual for the computer card version, but it includes no info re the USB version. Via Google searches, I've found some enticing links. One led me to the to the PCI version, not what promised. My paranoia, perhaps groundless, makes me nervous about some of the sites--- some download buttons make me think of event horizons surrounding black holes. I do not want to get sucked in.

Original E-MU site is gone. Here the old product page on Archive.org. From "Support" you can retrieve the manual as well! (I also have a copy but I am not sure it's OK to upload it here because, of course, it's copyrighted material).


Hope this helps
  Reply With Quote
Old 2nd July 2019, 02:14 PM   #37
BSST is offline BSST  United States
diyAudio Member
 
Join Date: Jul 2018
Thank you, Interference!

I've found a plug that appears to be a mate, at least visually, so I should be able to cobble together a source. I'll explore your link.

Thanks again.
  Reply With Quote
Old 2nd July 2019, 03:34 PM   #38
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
As of the power supply - the soundcard reports 2mA consumption requirement in its USB configuration. Clearly only the USB front end is powered.
  Reply With Quote
Old 2nd July 2019, 10:36 PM   #39
trobbins is offline trobbins  Australia
diyAudio Member
 
trobbins's Avatar
 
Join Date: Feb 2009
Location: Melbourne, Oz
5V with nominal consumption of about 0.4A but the supply needs to support at least 0.7A. I'd also recommend using a 12V batt via heatsunk 7805 (with series diode and dropper resistor to lessen the heatsinking) if you want to avoid one mains hum entry point for low noise floor testing.
Also note the left channel noise artefacts, and use the beta driver for Win OS.
  Reply With Quote

Reply


E-MU 0404 and Linux (also issues with REW at 96 kHz)Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
E-MU 0404 USB Modification? lumanauw Digital Line Level 241 28th December 2018 08:52 PM
Issues using E-MU 0404 USB for measurements (ARTA and RMAA) maxw Equipment & Tools 102 23rd September 2018 06:17 PM
emu 0404 usb Nikitas Swap Meet 6 9th October 2013 09:55 AM
E-mu 0404 problem tonyptony Digital Line Level 2 25th August 2012 02:00 AM
EMU 0404 PCI - Needs a fixin' first, but... jbeckva Digital Line Level 1 28th December 2010 03:53 PM


New To Site? Need Help?

All times are GMT. The time now is 04:43 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki