Jack, alsa, m-audio 2496 and weird number of channels

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Jack, alsa, m-audio 2496 and weird number of channels

Post by Pablo »

Hi!

I have a m-audio 2496 PCI card using the snd_ice1712 alsa module. Jack sees 12 capture and 10 playback ports but the card has two analog inputs and two analog outputs. This has two problems for me:

1. qjackctl and patchage show non existing ports (minor problem)
2. Jack_capture is working badly (major problem)

When I launch jack_capture, it has 10 input channels. Obviously, I connect my audio sources to system_playbacks 1 and 2, and jack_capture autoconnects these audio sources to its inputs 1 and 2. The final result (wav 16 bit in jack_capture settings) is an audio file with ten channels that no multimedia player is able to play so I have to resort to audacity. ogg and mp3 don't work. Neither will work flac, I guess.

So my question, How can I force jack or alsa to see only two capture and two playback channels?
Or how can I force jack_capture to have two inputs only?

I have tried limiting the input and output channels in the jack setup but this doesn't work:

12:42:59.199 /usr/bin/jackd -R -P70 -dalsa -dhw:0 -r44100 -p512 -n2 -i2 -o2
12:42:59.203 JACK se inició con PID=28841.
no message buffer overruns
jackd 0.116.1
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|512|2|44100|2|2|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 512 frames (11.6 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: cannot set channel count to 2 for capture
ALSA: cannot configure capture channel
cannot load driver module alsa
12:42:59.966 JACK ha sido detenido satisfactoriamente.
12:42:59.966 Script de post - apagado...
12:42:59.967 killall jackd
jackd: proceso no encontrado
12:43:00.379 El script de post - apagado finalizó con estado 256

Is there a hack I can do in the .asoundrc file or something else to tell the snd_ICE1712 that I only want the ports I really have?

Any help is appreciated.

Pablo

User avatar
raboof
Established Member
Posts: 1727
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by raboof »

Pablo wrote:snd_ice1712 alsa module. Jack sees 12 capture and 10 playback ports but the card has two analog inputs and two analog outputs.
That'd be an ALSA problem - perhaps it can be somehow fixed in ALSA - but I don't know how.
2. Jack_capture is working badly (major problem) (...) how can I force jack_capture to have two inputs only?
jack_capture --advanced options yields, among other things, a '--channels' or '-c' option. Perhaps that'd help?

thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by thorgal »

Hola Pablo, the snd_ice1712 kernel module has options and you can specify the model. By default, it would assume the delta1010 (just a guess). Don't know the exact syntax for this module option, though.

TraumFlug
Established Member
Posts: 16
Joined: Sat Dec 26, 2009 2:07 am

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by TraumFlug »

actually, if you use envy24control (or alsa mixer with patience), you can use the extra output channels for (hardware...?) mixing (I don't know why one'd like to, but...yeah). normally, in Patchbay/Router, outputs are set to "PCM Out 1/2". try setting them to "Digital Mix L/R".

now you can use output channels 1-8 for pcm playback (gives 4 stereo chans), you can level/pan/mute them in the "monitor pcms" tab, i.e. level in the volume for left&right output. this is not the real bang, you can also mix the inputs under "monitor inputs" the same way, I believe you hear the inputs without latency then (also you don't have to connect the inputs to output in jack). input channels 11 & 12 give a chance to grab the whole monitor mixer output to record it.. input/output 9&10 are said to be for s/pdif, but I haven't tested that yet due to lack of overexpensive ad/da convertors ;)

what input channels 3-8 are for...no clue, probably someone was thinking all ice1712 cards should have the same number of channels, and left them dummy, and I've read (hearsay) of jack lockups when trying to connect them. best is to use some other prog with virtual ports, and connect just the needed to that prog, not touching the dummy chans at all :(

also, the alsa driver itself doesn't like to be interfaced with less channels than it offers, just as it only accepts 32bit->24bit sound data, no 16bit...that's probably bad programming, I think the driver has other issues (input & output drift on some systems...), should really be fixed some day, really...

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by Pablo »

Thank you very much for all your suggestions and tips!

@Thorgal
I added the line

options snd-ice1712 model=audiophile
to /etc/modprobe.d/alsa-base.conf

I checked the model names in:
zless /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz

Restarted alsa, and... this makes no difference I am aware of.

@raboof
Actually, I use jack_capture_gui2 and it is just a matter of selecting "two channels" instead of "auto". Right in front of my eyes and I didn't see it! (Sigh) Thank you!

@TraumFlug
I don't use hardware monitoring because my little home studio is 90% made of software. I don't have much external gear. Software latency is low enough for me. But I have to twinker with the hardware mixer and see these possibilities. Thank you!

Cheers! Pablo

User avatar
raboof
Established Member
Posts: 1727
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by raboof »

Pablo wrote:options snd-ice1712 model=audiophile
to /etc/modprobe.d/alsa-base.conf

Restarted alsa, and... this makes no difference I am aware of.
Did you actually rmmod and modprobe the module? That'd be needed for the changes to take effect.

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by Pablo »

Yes, well, I did

sudo alsa force-reload

Now, following your suggestion, I have done sudo rmmod snd-ice1712 and sudo modprobe snd-ice1712 model=audiophile

Still 12 system:captures and 10 system:playbacks.

Anyone with an Audiophile 2496 can confirm this behaviour or is there something else that I can try?

Anyhow, I am fine again with jack_capture, I had forgot this trick.

Thanks a lot raboof,

Cheers, Pablo

stratojaune
Established Member
Posts: 4
Joined: Sat Apr 11, 2009 3:11 pm
Location: Marseille

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by stratojaune »

Hi Pablo,

I've got the same problem with M2496, 12 ins and 10 outs seen in Jack... PLUS impossible to set the input level in envy24control. And Envy24control just see 2 inputs, but 10 outs as Jack !

Do you find a solution on your side ?

Cheers,
Fred

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by Pablo »

Hi Fred,

Those extra ports are there because you can do internal mixing, as Traumflug explains above. So my original "problem" is not really a problem.

If you don't use the internal mixer (not very pro, but cheaper for a home studio with mostly software audio processing when latency is low enough), you have to choose PCM Out1 and PCM Out2 for H/W Out 1 and H/W Out 2 in the Patchbay/Router tab and forget the monitor inputs and monitor PCM's tabs as they don't make sense in this case.

You set the levels of the converters in the analog volume tab. I see 2 outs + 2 ins there, (well DAC and ADC). I read in the LAU that it is OK if these levels are 100% up. Until now, I had them at 75% more or less.

For internal mixing, follow Traumflug ideas and http://alsa.opensrc.org/index.php/Envy24control

I hope this helps, Pablo

stratojaune
Established Member
Posts: 4
Joined: Sat Apr 11, 2009 3:11 pm
Location: Marseille

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by stratojaune »

Yep Pablo, it helps !

(Sorry for late reply, busy week end.)

But when have a look in the analog volume tab, there's only 2 DACs ?

Where are my ADCs ???

Oh boy, sometimes it makes me mad... Let me say Freedom has a really price, ain'it ? :(

User avatar
Capoeira
Established Member
Posts: 1283
Joined: Tue May 12, 2009 1:01 pm
Location: Brazil

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by Capoeira »

stratojaune wrote: Oh boy, sometimes it makes me mad...
me too

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by Pablo »

But when have a look in the analog volume tab, there's only 2 DACs ?

Where are my ADCs ???
No idea, sorry. I suggest you ask to the alsa developers or in the alsa users mailing list.

Good luck.

Pablo

stratojaune
Established Member
Posts: 4
Joined: Sat Apr 11, 2009 3:11 pm
Location: Marseille

Re: Jack, alsa, m-audio 2496 and weird number of channels

Post by stratojaune »

Thanks for the idea Pablo :D

It's not a thing I have done before, but surely people there will have the knowledge !

Thanks again, I'll post result here, maybe it could help some "googler"

Greets from Marseille,
Fred

Post Reply