All of lore.kernel.org
 help / color / mirror / Atom feed
* Some problems with two 1010LTs (pcm_multi & jackd)
@ 2006-01-26 14:04 Petter Sundlöf
  2006-01-26 18:48 ` John Rigg
  2006-01-26 19:10 ` John Rigg
  0 siblings, 2 replies; 6+ messages in thread
From: Petter Sundlöf @ 2006-01-26 14:04 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]

Hello.

I've added a second 1010LT in my studio box. The two LTs are card1 and 
card2.
Following the steps from 
http://www.sound-man.co.uk/linuxaudio/ice1712multi.html I created the 
.asoundrc (and modified it to hw:1 and 2 where appropriate. I have 
attached this file.
I then proceeded to patch jack 0.100.7 (release tarball) with the 
MMAP_COMPLEX patch. This was installed to the /usr/ prefix.

I then downloaded alsa-lib-1.0.10 (release) and applied pcm_multi-patch. 
I installed this over the existing alsa-lib, into prefix /usr/lib.

After this I tried to run jackd -d alsa -r44100 -p512 -C multi_capture 
-P multi_playback

I then get this stdout message:

jackd 0.100.7
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 ... 
multi_playback|multi_capture|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
nperiods = 2 for capture
nperiods = 2 for playback

I then start Ardour and open a session. I place the playhead somewhere 
and try to start playback. Nothing happens. After a few seconds, Ardour 
is disconnected from JACK, and I receive this in jackd's stdout:

ALSA: poll time out, polled for 17416024 usecs
DRIVER NT: could not run driver cycle
jack main caught signal 12
no message buffer overruns

Clues?

Info: Kernel 2.6.14-0.10.rrt.rhfc4.ccrma #1 PREEMPT
Cards are not connected via S/PDIF or World clock -- don't have any such 
cables, and besides, I read it isn't working _yet_ with LT cards.
Hardware: Sempron 2600, 1GB RAM.
Software: Fedora Core 4 + CCRMA.

Any tips appreciated.

Thanks in advance,
Petter Sundlöf

[-- Attachment #2: .asoundrc --]
[-- Type: text/plain, Size: 2897 bytes --]

# .asoundrc for two Delta 1010s
#
# Create virtual devices out of multiple soundcards.
# JACK will need MMAP_COMPLEX support to use this. 
# ICE1712 chip has 12 capture channels and 10 playback channels.
# No. of channels in slaves must equal 12 for capture and 10 for playback
# otherwise "invalid argument" errors result.

pcm.multi_capture {
	type multi
	slaves.a.pcm hw:1 
	slaves.a.channels 12
	slaves.b.pcm hw:2
	slaves.b.channels 12

# First 8 channels of first soundcard (capture)
 	bindings.0.slave a
 	bindings.0.channel 0
 	bindings.1.slave a
 	bindings.1.channel 1
 	bindings.2.slave a
 	bindings.2.channel 2
 	bindings.3.slave a
 	bindings.3.channel 3
 	bindings.4.slave a
 	bindings.4.channel 4
 	bindings.5.slave a
 	bindings.5.channel 5
 	bindings.6.slave a
 	bindings.6.channel 6
 	bindings.7.slave a
 	bindings.7.channel 7
    
# First 8 channels of second soundcard (capture)
 	bindings.8.slave b
 	bindings.8.channel 0
 	bindings.9.slave b
 	bindings.9.channel 1
 	bindings.10.slave b
 	bindings.10.channel 2
 	bindings.11.slave b
 	bindings.11.channel 3
 	bindings.12.slave b
 	bindings.12.channel 4
 	bindings.13.slave b
 	bindings.13.channel 5
 	bindings.14.slave b
 	bindings.14.channel 6
 	bindings.15.slave b
 	bindings.15.channel 7

# S/PDIF section. Comment out if not required.

# S/PDIF first soundcard (capture)
 	bindings.16.slave a
 	bindings.16.channel 8
 	bindings.17.slave a
 	bindings.17.channel 9
    
# S/PDIF second soundcard (capture)
 	bindings.18.slave b
 	bindings.18.channel 8
 	bindings.19.slave b
 	bindings.19.channel 9
}

ctl.multi_capture {
	type hw
	card 1
}

pcm.multi_playback {
	type multi
	slaves.a.pcm hw:1
	slaves.a.channels 10
	slaves.b.pcm hw:2
	slaves.b.channels 10

# First 8 channels of first soundcard (playback)
 	bindings.0.slave a
 	bindings.0.channel 0
 	bindings.1.slave a
 	bindings.1.channel 1
 	bindings.2.slave a
 	bindings.2.channel 2
 	bindings.3.slave a
 	bindings.3.channel 3
 	bindings.4.slave a
 	bindings.4.channel 4
 	bindings.5.slave a
 	bindings.5.channel 5
 	bindings.6.slave a
 	bindings.6.channel 6
 	bindings.7.slave a
 	bindings.7.channel 7

# First 8 channels of second soundcard (playback)
 	bindings.8.slave b
 	bindings.8.channel 0
 	bindings.9.slave b
 	bindings.9.channel 1
 	bindings.10.slave b
 	bindings.10.channel 2
 	bindings.11.slave b
 	bindings.11.channel 3
 	bindings.12.slave b
 	bindings.12.channel 4
 	bindings.13.slave b
 	bindings.13.channel 5
 	bindings.14.slave b
 	bindings.14.channel 6
 	bindings.15.slave b
 	bindings.15.channel 7

# S/PDIF section. Comment out if not required.

# S/PDIF first soundcard (playback)
 	bindings.16.slave a
 	bindings.16.channel 8
 	bindings.17.slave a
 	bindings.17.channel 9
    
# S/PDIF second soundcard (playback)
 	bindings.18.slave b
 	bindings.18.channel 8
 	bindings.19.slave b
 	bindings.19.channel 9
}

ctl.multi_playback {
	type hw
	card 1
}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Some problems with two 1010LTs (pcm_multi & jackd)
  2006-01-26 14:04 Some problems with two 1010LTs (pcm_multi & jackd) Petter Sundlöf
@ 2006-01-26 18:48 ` John Rigg
  2006-01-26 23:14   ` Petter Sundlöf
  2006-01-26 19:10 ` John Rigg
  1 sibling, 1 reply; 6+ messages in thread
From: John Rigg @ 2006-01-26 18:48 UTC (permalink / raw)
  To: Petter Sundlöf; +Cc: alsa-devel

On Thu, Jan 26, 2006 at 03:04:25PM +0100, Petter Sundlöf wrote:
> Hello.
> 
> I've added a second 1010LT in my studio box. The two LTs are card1 and 
> card2.
> Following the steps from 
> http://www.sound-man.co.uk/linuxaudio/ice1712multi.html I created the 
> .asoundrc (and modified it to hw:1 and 2 where appropriate. I have 
> attached this file.
> I then proceeded to patch jack 0.100.7 (release tarball) with the 
> MMAP_COMPLEX patch. This was installed to the /usr/ prefix.
> 
> I then downloaded alsa-lib-1.0.10 (release) and applied pcm_multi-patch. 
> I installed this over the existing alsa-lib, into prefix /usr/lib.
> 
> After this I tried to run jackd -d alsa -r44100 -p512 -C multi_capture 
> -P multi_playback
> 
> I then get this stdout message:
> 
> jackd 0.100.7
> 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 ... 
> multi_playback|multi_capture|1024|2|48000|0|0|nomon|swmeter|-|32bit
> configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
> nperiods = 2 for capture
> nperiods = 2 for playback

It's starting with the wrong sample rate and number of frames, but using
the right devices. That's strange.
You say you installed alsa-lib over an existing one. Are you sure you replaced
it?

> I then start Ardour and open a session. I place the playhead somewhere 
> and try to start playback. Nothing happens. After a few seconds, Ardour 
> is disconnected from JACK, and I receive this in jackd's stdout:
> 
> ALSA: poll time out, polled for 17416024 usecs

This is the error message I kept getting before I patched pcm_multi.c.

It might be worth removing alsa-lib and jack completely and
recompiling/reinstalling.

> DRIVER NT: could not run driver cycle
> jack main caught signal 12
> no message buffer overruns
> 
> Clues?
> 
> Info: Kernel 2.6.14-0.10.rrt.rhfc4.ccrma #1 PREEMPT
> Cards are not connected via S/PDIF or World clock -- don't have any such 
> cables, and besides, I read it isn't working _yet_ with LT cards.

You won't be able to record for long like this. It will run for a while,
as the clocks are pretty accurate, but they will drift and you'll get
xruns and/or jackd will die.

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Some problems with two 1010LTs (pcm_multi & jackd)
  2006-01-26 14:04 Some problems with two 1010LTs (pcm_multi & jackd) Petter Sundlöf
  2006-01-26 18:48 ` John Rigg
@ 2006-01-26 19:10 ` John Rigg
  1 sibling, 0 replies; 6+ messages in thread
From: John Rigg @ 2006-01-26 19:10 UTC (permalink / raw)
  To: Petter Sundlöf; +Cc: alsa-devel

On Thu, Jan 26, 2006 at 03:04:25PM +0100, Petter Sundlöf wrote:
> # S/PDIF section. Comment out if not required.
> 
> # S/PDIF first soundcard (capture)
>  	bindings.16.slave a
>  	bindings.16.channel 8
>  	bindings.17.slave a
>  	bindings.17.channel 9
>     
> # S/PDIF second soundcard (capture)
>  	bindings.18.slave b
>  	bindings.18.channel 8
>  	bindings.19.slave b
>  	bindings.19.channel 9

> # S/PDIF section. Comment out if not required.
> 
> # S/PDIF first soundcard (playback)
>  	bindings.16.slave a
>  	bindings.16.channel 8
>  	bindings.17.slave a
>  	bindings.17.channel 9
>     
> # S/PDIF second soundcard (playback)
>  	bindings.18.slave b
>  	bindings.18.channel 8
>  	bindings.19.slave b
>  	bindings.19.channel 9

One more thing - I'm not sure if the S/PDIFs are working yet on 1010LT.
Try commenting these sections out in .asoundrc.

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Some problems with two 1010LTs (pcm_multi & jackd)
  2006-01-26 18:48 ` John Rigg
@ 2006-01-26 23:14   ` Petter Sundlöf
  2006-01-27 12:53     ` John Rigg
  0 siblings, 1 reply; 6+ messages in thread
From: Petter Sundlöf @ 2006-01-26 23:14 UTC (permalink / raw)
  To: John Rigg; +Cc: alsa-devel


>>After this I tried to run jackd -d alsa -r44100 -p512 -C multi_capture 
>>-P multi_playback
>>
>>I then get this stdout message:
>>
>>jackd 0.100.7
>>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 ... 
>>multi_playback|multi_capture|1024|2|48000|0|0|nomon|swmeter|-|32bit
>>configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
>>nperiods = 2 for capture
>>nperiods = 2 for playback
> 
> 
> It's starting with the wrong sample rate and number of frames, but using
> the right devices. That's strange.
> You say you installed alsa-lib over an existing one. Are you sure you replaced
> it?

I pasted in a "later" jack command line, where I tried with 44k/512 
frames instead. So the stdout output doesn't match the command I 
actually used at that time.

> 
>>I then start Ardour and open a session. I place the playhead somewhere 
>>and try to start playback. Nothing happens. After a few seconds, Ardour 
>>is disconnected from JACK, and I receive this in jackd's stdout:
>>
>>ALSA: poll time out, polled for 17416024 usecs
> 
> 
> This is the error message I kept getting before I patched pcm_multi.c.
> 
> It might be worth removing alsa-lib and jack completely and
> recompiling/reinstalling.

That'd be a dependency nightmare on Fedora Core :/ alsa-lib is patched 
and installed, but I'll double double check it tomorrow (today's been 
too rough; had to evactuate rehearsal room and guitarist breaks his 
little finger).

> You won't be able to record for long like this. It will run for a while,
> as the clocks are pretty accurate, but they will drift and you'll get
> xruns and/or jackd will die.

Yeah. Since I don't have any external S/PDIF sources yet, I guess I'll 
have to wait until/if a solution for 1010LT cards has landed.

[snip...]
 >># S/PDIF second soundcard (playback)
 >>>  	bindings.18.slave b
 >>>  	bindings.18.channel 8
 >>>  	bindings.19.slave b
 >>>  	bindings.19.channel 9
 >
 >
 >One more thing - I'm not sure if the S/PDIFs are working yet on 1010LT.
 >Try commenting these sections out in .asoundrc.

Done, but no change.

I'll try making sure alsa-lib is patched alright.

Thanks for the help.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Some problems with two 1010LTs (pcm_multi & jackd)
  2006-01-26 23:14   ` Petter Sundlöf
@ 2006-01-27 12:53     ` John Rigg
  2006-01-27 14:02       ` John Rigg
  0 siblings, 1 reply; 6+ messages in thread
From: John Rigg @ 2006-01-27 12:53 UTC (permalink / raw)
  To: Petter Sundlöf; +Cc: alsa-devel

On Fri, Jan 27, 2006 at 12:14:41AM +0100, Petter Sundlöf wrote:
> 
> >>After this I tried to run jackd -d alsa -r44100 -p512 -C multi_capture 
> >>-P multi_playback

> >>I then start Ardour and open a session. I place the playhead somewhere 
> >>and try to start playback. Nothing happens. After a few seconds, Ardour 
> >>is disconnected from JACK, and I receive this in jackd's stdout:
> >>
> >>ALSA: poll time out, polled for 17416024 usecs

Just thought of something else. envy24control has `Locked' and `Reset'
buttons. `Locked' keeps the master card's clock set to whatever rate
is set by envy24control's radio buttons, regardless of what you specify
on the command line.
If you have `Locked' set and specify a different rate on the command
line, jackd just hangs and will probably give a poll timeout 
(or if you're running it in realtime the jackd watchdog times out).

Make sure you have the `Locked' button unchecked and the `Reset' button
checked. `Reset' allows the command line to override the envy24control
setting for sample rate. I suspect these buttons should be mutually exclusive,
ie. radio buttons, but they're not (looks like a bug).

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Some problems with two 1010LTs (pcm_multi & jackd)
  2006-01-27 12:53     ` John Rigg
@ 2006-01-27 14:02       ` John Rigg
  0 siblings, 0 replies; 6+ messages in thread
From: John Rigg @ 2006-01-27 14:02 UTC (permalink / raw)
  To: Petter Sundlöf; +Cc: alsa-devel

On Fri, Jan 27, 2006 at 12:53:17PM +0000, John Rigg wrote:
> On Fri, Jan 27, 2006 at 12:14:41AM +0100, Petter Sundlöf wrote:
> > 
> > >>After this I tried to run jackd -d alsa -r44100 -p512 -C multi_capture 
> > >>-P multi_playback
> 
> > >>I then start Ardour and open a session. I place the playhead somewhere 
> > >>and try to start playback. Nothing happens. After a few seconds, Ardour 
> > >>is disconnected from JACK, and I receive this in jackd's stdout:
> > >>
> > >>ALSA: poll time out, polled for 17416024 usecs
> 
> Just thought of something else. envy24control has `Locked' and `Reset'
> buttons. `Locked' keeps the master card's clock set to whatever rate
> is set by envy24control's radio buttons, regardless of what you specify
> on the command line.
> If you have `Locked' set and specify a different rate on the command
> line, jackd just hangs and will probably give a poll timeout 
> (or if you're running it in realtime the jackd watchdog times out).
> 
> Make sure you have the `Locked' button unchecked and the `Reset' button
> checked. `Reset' allows the command line to override the envy24control
> setting for sample rate. I suspect these buttons should be mutually exclusive,
> ie. radio buttons, but they're not (looks like a bug).

This is getting complicated. I start getting all kinds of spurious
behaviour from jackd after I've been setting and resetting things
in envy24control. A reboot is required to make it behave normally again.

On my system the default on startup in envy24control is `Locked' button
unselected, `Reset' selected. All I have to do is tell the second card
to sync to the first with either S/PDIF or wordclock input. Then it
runs fine. The minute I try messing with `Locked' and `Unlocked' buttons
or sample rates jackd starts crashing with a floating point exception
(which I suspect is an indication of the cards losing sync).

It is possible to set this stuff up manually in /etc/asound.state using
the alsactl command to save/restore the settings in this file.
I think I'll start using it to set up my cards' clocks and only use
envy24control for the level meters and routing (at least until I get
hold of an oscilloscope and an external word clock generator to help
diagnose what's going wrong).

(My previous assessment of what the `Locked' and `Reset' buttons are
supposed to do may be incomplete, since they seem to behave differently
at different times).

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-27 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-26 14:04 Some problems with two 1010LTs (pcm_multi & jackd) Petter Sundlöf
2006-01-26 18:48 ` John Rigg
2006-01-26 23:14   ` Petter Sundlöf
2006-01-27 12:53     ` John Rigg
2006-01-27 14:02       ` John Rigg
2006-01-26 19:10 ` John Rigg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.