# REW, Linux & MAUDIO2496 not working



## rawdlite (Dec 23, 2011)

Hi all,

this is my first post and english is not my native language, so please excuse any mistakes i should make.
I joined this forum mainly to be able to download the REW software.
From what i have seen and read about in the helpfiles it looks really good.
Great work.
Unfortunately i have run into a problem early on.
REW does not play with my soundcard M-Audio Audiophile 2496.

Here is my setup and what i have tried so far:

I run a linux server under Ubuntu 11.10.
There are two soundcards:
- internal nvidia (card 0)
- M-Audio Audiophile 2496 (card 1)
I use alsa to channel a bitperfect signal through SPDIF.
No pulseaudio, no dmix, no processing.
All processing is done in my AVR Yamaha RX-V2067 (RX-A2000) which is connected via COAX.

Now i understand, that in order to do a soundcard calibration and to access different speaker via Multi-Channel-In i need REW to output on the analog OUTs.
In Preferences i therefore chose M2496(plughw:1,0) and pressed "Check Levels".
No Sound and the output meter shows no activity. (see attachment)

When i choose the internal nvidia soundcard i do get sound and see activity in the output meter.
THe internal soundcard does not support full duplex and is of inferior quality, therefore i would like to use the M-Audio card.

next i checked aplay.
aplay -D plughw:1,0 some.wav
This plays the soundfile via analog out as expected.
I also tried to access the plughw:1,0 device via some other java software (CARMA).
Works as expected.

aplay -l gives:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC888 Digital [ALC888 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: M2496 [M Audio Audiophile 24/96], device 0: ICE1712 multi [ICE1712 multi]
Subdevices: 1/1
Subdevice #0: subdevice #0

i use an asoundrc file to define some convenient pcm names.(also attached)
REW is version 5.0
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Are there further informations needed?
Screenshot of envy24control settings, alsamixer, asound.state ...?

As a clumsy work around i imagine i could connect the nvidia outs withs the maudio ins and calibrate both soundcards.
Or would that be a bad idea?

Please help, i am at the end of my rope here.

LG tom


----------



## rawdlite (Dec 23, 2011)

Me again. Just found this log entry:

Jan 4, 2012 6:41:40 PM roomeqwizard.RoomEQ_Wizard main
INFO: REW started
Jan 4, 2012 6:49:38 PM roomeqwizard.dB B
SEVERE: Exception trying to open replay device 
{0}

javax.sound.sampled.LineUnavailableException: M2496 [plughw:1,0] has no lines available supporting PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
at roomeqwizard.dB.E(Unknown Source)
at roomeqwizard.Q.actionPerformed(Unknown Source)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
......

and


javax.sound.sampled.LineUnavailableException: M2496 [plughw:1,0] has no lines available supporting PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
at roomeqwizard.dB.E(Unknown Source)
at roomeqwizard.Q.actionPerformed(Unknown Source)
......


Strange, plughw should do all necessary conversions, shouldn't it?
Any Clue?
OTOH this is only in one Logfile, but i the other logfiles there is no entry.
Maybe this is not the right path after all.
I will try tomorrow without my asondrc and playing around in envy24control.

LG tom


----------



## rawdlite (Dec 23, 2011)

Continuing in my monologue.

I just looked into envy24control.
First i checked the Patch Bay. (see Attachment)
The pcms are directly connected to the Analog Outs.
aplay -D plughw:1,0 some.wav 
plays as expected and i can control the volume in the Analog Volume panel with DAC1 and DAC2. 
This is exactly what i would expect.

To check my understanding of the setup i then patched H/W Out to Digital Mix.
aplay -D plughw:1,0 some.wav 
nothing there(as to be expected)
aplay -D plug:dmix:M2496 some.wav
Now i can adjust the volumes in the Monitor PCMs panel and listen via RCA.
So this works as expected as well.

So i conclude:
My alsa setup is ok.
All applications including java based apps except REW play through my device plughw:1,0 
*This seems to indicate the problem is with REW.*

The log error i mentioned in post 2 has not come up again.
All other logfiles are empty except for the startup message.
So i dismiss that.


Since 50 people already viewed this thread so far and nobody discouraged me from using a 2 soundcard setup, this is what i will try next.
What else is there to do?

to be continued.

LG tom


----------



## EarlK (Jan 1, 2010)

> Since 50 people already viewed this thread so far and nobody discouraged me from using a 2 soundcard setup, this is what i will try next.
> What else is there to do?


> FYI; I've closely monitored this forum for @ 2 years now , & you're about the first ( that I remember ) to seek help
in using REW with Linux . 

> I'm sure most other ( viewers ) are in a similar position of wondering "What is this all about ? " 

> FWIW; by far the largest contingent of successful REW users here are those using the Windows OS .
> ie ; All we ( WinDoze users ) can do is watch ( & offer occasional moral support ) :T .

> In that spirirt, here's an old sticky thread ( from other Ubuntu users ) about  *REW & their solutions . *

:sn:


----------



## rawdlite (Dec 23, 2011)

Just did the 2 soundcard setup.

First i checked the analog output of the internal soundcard.
Took me some time to realize SPDIF Default has to be muted in alsamixer or all sound goes through SPDIF.
I set master to 100 and Front to 50.(see attachment)
After i checked the sound to be channeled correctly, i connected the internal soundcards analog outs to the analogs in of the maudio card.
As i checked the levels i had about 20db less in the input. I played with the capture device of the maudio, but that had no effect. Not sure i understand the capture setup correctly.

So i raised the volume on the internal soundcards out instead to 95 to match the levels in REW.
I did two calibrations.
First with sweep-level -12db resulting in headroom of 9.46db
and second with sweep-level -20db resulting in headroom of 19db.

Alas, the result looks rather strange.
(see 2. attachment)
I know embarassingly little about soundcard calibration, but this looks all wrong, doesn't it?
Also i attached the .mdat file in case someone wants to look into this.

Until i get this fixed, there seems to be little use to continue.

LG tom


----------



## EarlK (Jan 1, 2010)

> Can you post some screen-captures showing the "Monitor PCMs" tab and the "Monitor Inputs" tab ( of the "Envy24 Control Utility" ).

:sn:


----------



## rawdlite (Dec 23, 2011)

Thank you, for looking into this.

Here are the screenshots.
The Input Monitor shows the Levels i am getting.
Changing Settings there have no effect in the Input Levels seen in REW. I can change the Input Levels or even mute the channel, that only influences the Digital Mixer bar.

The Monitor Outs are all muted, since i use the other soundcard to produce the signals.

I also attached a screenshot of REW, showing the matched Levels. (i had to raise Output to 95 in alsa)


LG tom


----------



## EarlK (Jan 1, 2010)

> Really this is a JohnM "Q&A", &/or you need an expert who knows the workings of JAVAX on Ubuntu .

> Thats' not me ( not an expert at all ) but ; what I find really unique ( or strange ) about your situation is that ( in my 2 years of browsing here ) over 95% of people having I/O ( signal "In/Out" ) problems with REW , encounter hurdles in attempting to get REW to see/lock into the *"input"* data streams ( output problems are much more rare at this time ) . 
> FWIW, Macs "apparently" had a common problem in getting REW to output / but this ( OSX legacy ) problem seems to have been resolved with the release of OS 10.6 ( and later releases of 10.5 ) .

> Macs now have huge problems trying to get REW to recognize valid *"inputs" *, when there are more than 2 available ( ie; when forcing JAVA to choose a single pair from "n>1 pair" ). 
> Given a choice of multiple "Input DATA Streams" , JAVA just seems to say "no way, nothing is getting recognized today " . 
> Multiple outputs ( from Macs ) don't seem to ( or rarely ) trigger this *"SEVERE Exception" from JAVA *( such as you received below) .



rawdlite said:


> SEVERE: *Exception trying to open replay device *{0}
> 
> javax.sound.sampled.LineUnavailableException: M2496 [plughw:1,0] has no lines available supporting PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
> at roomeqwizard.dB.E(Unknown Source)
> ...




> Anyways, I'm unsure whether ( or not ) you should be focussed on trying to get those 2 soundcards to work together nicely or if your time is better spent trying to figure out why REW won't output ( any signal ) into your Envy24 Control Panel ( & then by extension, into the M-Audio 24/96 ) .

> If it was me, I'd first focus on figuring out why you can't get REW to output to the "24/96" ( through the Envy24 ) .










> What other choices are you presented with ( in the "Output Device & Output" box ) / the second drop-down box ( that is currently selected to "Default Output" ) ?

> I'd also increase your data "Buffer" sizes up from 32K to double or triple that number ( this action may help your two cards work together better ). 


> I was going to suggest that you look for a Linux substitute for VAC (  *Virtual Audio Cable*  ) but a quick Google Search came up pretty empty ( like this somewhat  *dead-end thread*  ) .

> My thought process of a possible solution is based on presenting to REW just a single stereo data stream to access ( this seems to be REW/JAVAXs biggest hangup with Macs & maybe that's also a problem for your version of Linux ) .

> In practice that would mean, inserting a data stream mixer between REW ( & all the out-going data streams ) & then presenting REWs ( Java ) with only a single pair of outputs to choose from .

> Maybe you already have the onboard software mixer to do this / that's where I would look first ( for a solution to your output "24/96" problem ) .

:sn:

PS : the old solution to Macs "output" problem used to be to download ( from  *Mandolane Software * their free Java based mixer called  * M3DMixer *  . Mandolane indicate this product is no longer useful for those running OS 10.7 ( Lion ) . 
> This java based data mixer helped Mac users connect to their soundcards outputs ( from within REW ) .


----------



## rawdlite (Dec 23, 2011)

EarlK said:


> > Really this is a JohnM "Q&A", &/or you need an expert who knows the workings of JAVAX on Ubuntu .


How should i go about this?
Open a new thread?

I guess it would be a good idea to boot into Live system like knoppix (http://www.knoppix.org/) or ArtistX (http://www.artistx.org/)
to have a reference system setup, to rule out any possible misconfiguration on my server and to prevent me from messing up my playback setup.




EarlK said:


> > Anyways, I'm unsure whether ( or not ) you should be focussed on trying to get those 2 soundcards to work together nicely or if your time is better spent trying to figure out why REW won't output ( any signal ) into your Envy24 Control Panel ( & then by extension, into the M-Audio 24/96 ) .
> 
> > If it was me, I'd first focus on figuring out why you can't get REW to output to the "24/96" ( through the Envy24 ) .


Yes, this is my preferred approach also.






EarlK said:


> > What other choices are you presented with ( in the "Output Device & Output" box ) / the second drop-down box ( that is currently selected to "Default Output" ) ?


There are no other Options.
To be precise it is great out at first. After a check level run i get a dropdown "Default Option only"



EarlK said:


> > I'd also increase your data "Buffer" sizes up from 32K to double or triple that number ( this action may help your two cards work together better ).


Thanks, i will keep that in mind.



EarlK said:


> > My thought process of a possible solution is based on presenting to REW just a single stereo data stream to access ( this seems to be REW/JAVAXs biggest hangup with Macs & maybe that's also a problem for your version of Linux ) .
> 
> > In practice that would mean, inserting a data stream mixer between REW ( & all the out-going data streams ) & then presenting REWs ( Java ) with only a single pair of outputs to choose from .
> 
> > Maybe you already have the onboard software mixer to do this / that's where I would look first ( for a solution to your output "24/96" problem ) .


I am afraid you lost me here.
But since there is no output through plughw:1,0 and no Options in the second Dropdown my guess is REW does not recognise my sounddevice correctly.
The Question remains is it REW or my system.
I hope to come to a more conclusive result, after i have booted in a Live-System.
Thank you for your effort.

LG tom


----------



## rawdlite (Dec 23, 2011)

So now, i bootet into a Knoppix Live System to rule out any misconfiguration in the depth of my system.
This led to no new results at all.

*So i think i can conclude the issue is with REW.*

So i moved my efforts to get the sounddevice on the mainboard to work.
I attached the result of my calibration run.
In the range of 20 to 10kHz the card seems to do a sufficiently good job, i think.

I also attached my first measurement. This was done with the calibrated soundcard, but without a calibration of the recording chain
( ECM-40 and MPA-102 ). I am still waiting for the calibration file.
Anyway i would be very thankful if you could confirm now whether the measurement looks valid.

Thank you 

LG tom


----------



## EarlK (Jan 1, 2010)

> I also attached my first measurement. This was done with the calibrated soundcard, but without a calibration of the recording chain
> ( ECM-40 and MPA-102 ). I am still waiting for the calibration file.
> Anyway i would be very thankful if you could confirm now whether the measurement looks valid.


> Your soundcard calibration looks good & usable ( valid ) .

>









> And your first capture ( below ) is certainly valid ( good solid data :T ) .

:sn:


----------

