Setting up M-Audio Delta 1010 config permanently in JACK and making the regular soundcard work

I was having trouble setting up my M-Audio Delta 1010 with JACK for awhile. It seemed that I could get audio in and out through envy24control, but I couldn’t get JACK to work so that I could then run Ardour; it wouldn’t connect. Then I did a web search and found this:
dan@blackdiamond:~$ jackd -R -P80 -d alsa -d hw:0
jackd 0.102.20
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 …
creating alsa driver … hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback

Now, it works, but only after I type this code into a terminal. How can I get this to work permanently, so that JACK will always be able to automatically connect to the Delta using this setup? I tried messing with the JACK setup configuration but I couldn’t get that going.

Secondly, now that I have installed the Delta 1010, it seems that my regular soundcard won’t put out any audio, no matter what I do; changing default soundcards for music playback, etc. The soundcard appears as VIA 8235 under the System>Preferences>Sound menu and other menus. It isn’t an actual PCI slot soundcard; it’s part of the computer case itself it seems; it’s in there with the hookup for the monitor and things like that. I’m not sure, but the problem might be that somehow the Delta became the primary soundcard (it comes up as hw:0 if you notice above). All I want to happen is to make the regular soundcard the output device for music playback (mp3s, etc.) and system sounds, but I can’t seem to make this work.

Anyone know how I can fix any of this? Any suggestions would be appreciated.

Thanks,
Dan

PS: Also, as a side note, how can I get this working at 24-bit/96khz? That’s what the Delta offers so I’d prefer to take advantage if possible…

Ok, well I got the regular soundcard working using the asoundconf set-default-card command. So now my system sounds and mp3s and such are routed to the regular card like I wanted. Actually ideally I’d like to route them to either at the press of a button, but I’ll take what I can get. I still can’t get JACK to work without the command, though. Anyone?

-Dan

Are you sure the Delta is the first card? jack could be running on the integrated audio chip without knowing the difference (or telling you). That would explain the loss of normal audio. Try typing this in a terminal:
cat /proc/asound/cards

When I do, I get this:
0 [Live ]: EMU10K1 - SBLive! Value [CT4780]
SBLive! Value [CT4780] (rev.7, serial:0x80221102) at 0x9000, irq 20
1 [M1010LT ]: ICE1712 - M Audio Delta 1010LT
M Audio Delta 1010LT at 0x8000, irq 21
2 [CK804 ]: NFORCE - NVidia CK804
NVidia CK804 with ALC850 at irq 17
4 [UART ]: MPU-401 UART - MPU-401 UART
MPU-401 UART at 0x330, irq 10
5 [VirMIDI ]: VirMIDI - VirMIDI
Virtual MIDI Card 1

I’ve forced my cards/devices to take these numbers using modules.conf, so hw:0 is always the good old SB Live and hw:1 is always the 1010LT, etc. You’ll probably see only a 0 and a 1, and you want to start jackd with whichever number is followed by [M1010] (probably 1).

My .jackdrc saved by qjackctl for the 1010LT looks like this:
/usr/bin/jackd -R -p1024 -t2000 -u -dalsa -r96000 -p512 -n3 -D -Chw:1 -Phw:1 -s -m -Xseq -H -M

You probably want/need much less but at least this:
jackd -R -d alsa -D -Chw:1 -Phw:1 -r96000

That’s for realtime, full duplex, capture and playback on the second device (hw:1), at 96kHz. It should work with 24 bits automatically unless you force it down to 16 with -S. Of course the easiest way to get that set up normally is with qjackctl. You can save multiple presets for jackd and launch one immediately upon running, etc… it’s nearly indispensable. In the configuration, there’s a selector for all the cards with both numbers and labels… makes all that /proc/asound/cards research unnecessary.

Here’s what happens when I put in the cat /proc/asound/cards command:
dan@blackdiamond:~$ cat /proc/asound/cards
0 [M1010 ]: ICE1712 - M Audio Delta 1010
M Audio Delta 1010 at 0xec00, irq 18
1 [UART ]: MPU-401 UART - MPU-401 UART
MPU-401 UART at 0x300, irq 5
2 [V8235 ]: VIA8233 - VIA 8235
VIA 8235 with ALC101 at 0xd000, irq 19

Additionally, when I start qjackctl in the terminal, this is what the terminal shows:
dan@blackdiamond:~$ qjackctl
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
Warning: no locale found: /usr/share/locale/qjackctl_en_US.UTF-8.qm
QSettings: failed to open file ‘/etc/qt3/qt_plugins_3.3rc’

I’m not exactly sure how you edited that /usr/bin/jackd file to make it work that way…any suggestions?

Thanks,
Dan

I think I figured it out. I tried messing with the JACK control panel, and under the setup settings menu, I noticed that the Frames/Period was set at 1024, and one of the error messages said that this was a problem. I also remembered in one of the configuration lines that ilostmyfiles posted, something I couldn’t identify was set at 1024. So I tried it, and voila, it works. Now I have 1024 F/P, 96khz sample rate, 2 Periods/Buffer (What is this?), etc. The only other oddity is that in order for JACK to work, I have to say that there are 0 input and output channels. But, it works nonetheless, so I’m not complaining; Ardour sees all the available channels correctly.

Thanks!

-Dan

if I may suggest, you can expect more from the Delta1010. I used to run a Delta-1010-LT myself and the setting I used made the latency undetectable. Actually it is not completely true, when I played both h/w monitored sound and sound routed through jack at the same time, I could hear not a audible delay but some sort of micro time shift, a bit like a simple chorus effect. I was impressed, it was a sign that the latency was extremely small.

Anyway, the setting was :

jackd -R -dalsa -dhw:0 -p64 -r48000

the key, as far as I understand, is the -p option. The smaller it is, the smaller the latency. I tried -p32 but I started getting a few xruns once in a while. Same with 96000 sample rate so I sticked to -p64 -r48000, which sounded good enough to me.

Concerning the sound card order, I added the alsa module option “index=n” in the module conf area (distro dependent), n being 0, 1, etc.

I have this setting in the, cat /proc/asound/cards

0 [CK8S ]: NFORCE - NVidia CK8S
NVidia CK8S with ALC850 at irq 21
1 [M1010LT ]: ICE1712 - M Audio Delta 1010LT
M Audio Delta 1010LT at 0x9000, irq 16
2 [Audigy2 ]: Audigy2 - Audigy 2 Value [SB0400]
Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) at 0xa0

the only thing I can get running is hydrogen, first I get qjackctl running and then hydrogen runs and rosegarden opens and runs with no sound.

Take a look at the Rosegarden manual or tutorials.
Maybe the reason why Rosegarden doesn’t produce any sound has nothing to do with your jack configuration but with your trying to get sounds with no synths. Have you qsynth + a soundfont or fluidsynth dssi plugin? Rosegarden is fairly easy to use but requieres some reading for the first step. In the 64studio forums there is something in the subject.
By the way, you don’t mention ardour at all. Does it work for you?
Good luck!