All of lore.kernel.org
 help / color / mirror / Atom feed
* Multiple Delta 1010LT woes: UPDATE
@ 2004-02-20 18:29 Ludwig Schwardt
  2004-02-21  8:26 ` Jaroslav Kysela
  2004-02-21  8:28 ` Doug
  0 siblings, 2 replies; 6+ messages in thread
From: Ludwig Schwardt @ 2004-02-20 18:29 UTC (permalink / raw)
  To: alsa-devel

Hi again,

I've made some progress on the .asoundrc issue. I can now record 8 
analog channels in JACK using a single Delta 1010LT piped through the 
multi plugin. I cannot get playback to work yet. This is luckily not a 
problem for my application, which only records sound. Any ideas on 
getting playback to work?

I do notice a few extra warnings popping up which wasn't there when I 
accessed the soundcard directly, namely "late driver wakeups" followed 
by e.g. "delay of 46411.000 usecs exceeds estimated spare time of 
45230.000; restart ...". These delays are always very close to the 
estimated spare time. Since I cannot playback within JACK, I cannot tell 
whether this has an audible effect. Should I be worried?

I attach my .asoundrc for everyone else who struggles with this issue.
Hopefully I can just uncomment the commented blocks when the other 
Deltas arrive... Any remarks would be very helpful (for example, do I 
understand bindings and ttables correctly in my comments below?).

By the way, I started JACK with "jackd -R -d alsa -d jackmulti -C". It 
becomes unhappy if you leave out the -C flag.

Thanks and sorry for all the nagging questions,

Ludwig Schwardt

P.S. What is the rule regarding slaves.xxx.channels in multi plugins? It 
seems you have to set this equal to the actual number of channels of the 
soundcard (slaves.xxx.pcm) to prevent "invalid argument" and "broken 
configuration" ALSA errors. What do you choose if the number of capture 
and playback channels differ?

----------------------------------------

# START OF .asoundrc

# Alias for first Delta card
pcm.delta1010_1 {
    type hw
    card 0
}
ctl.delta1010_1 {
    type hw
    card 0
}

# Alias for second Delta card
#pcm.delta1010_2 {
#   type hw
#   card 1
#}
#ctl.delta1010_2 {
#   type hw
#   card 1
#}

# Alias for third Delta card
#pcm.delta1010_3 {
#   type hw
#   card 2
#}
#ctl.delta1010_3 {
#   type hw
#   card 2
#}

# Create virtual device out of multiple soundcards.
# This cannot be used by JACK, which will complain that it
# cannot get mmap-based access. See jackmulti below.
pcm.multi {
     type multi
     # First soundcard associated with slave "a"
     slaves.a.pcm delta1010_1
     # This must be specified, and MUST equal 12 for the Delta 1010LT
     # (otherwise "broken configuration" and "invalid argument" errors 
result)
     # I assume it must be equal to the correct number of channels on
     # other soundcards too
     slaves.a.channels 12
#    slaves.b.pcm delta1010_2
#    slaves.b.channels 12
#    slaves.c.pcm delta1010_3
#    slaves.c.channels 12

     # Read the lines below as follows:
     # bindings.x.slave y
     # bindings.x.channel z
     # The above example means:
     # "Bind channel z on slave y to channel x of the new multi device"
     # Check above to see which soundcard is associated with which slave

     # The first 8 channels of the first soundcard
     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

     # The first 8 channels of the second soundcard
#    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

     # The first 8 channels of the third soundcard
#    bindings.16.slave c
#    bindings.16.channel 0
#    bindings.17.slave c
#    bindings.17.channel 1
#    bindings.18.slave c
#    bindings.18.channel 2
#    bindings.19.slave c
#    bindings.19.channel 3
#    bindings.20.slave c
#    bindings.20.channel 4
#    bindings.21.slave c
#    bindings.21.channel 5
#    bindings.22.slave c
#    bindings.22.channel 6
#    bindings.23.slave c
#    bindings.23.channel 7
}
# JACK requires a ctl (mixer) interface for any pcm interface
# it uses. A ctl interface for a multi device is a bit strange,
# but set this to the mixer of the first soundcard to keep JACK happy.
ctl.multi {
     type hw
     card 0
}
				
# This creates a multi-channel interleaved PCM stream based on
# the multi device. JACK will work with this one, as it can get
# mmap access to the channels.
pcm.jackmulti {
     type route
     slave.pcm multi

     # As I understand it, you read "ttable.x.y z" as "route channel y of
     # slave device specified above to channel x of the new (client) 
device,
     # and multiply signal along this route with factor z", where z is
     # between 0.0 and 1.0. A value of 1.0 therefore indicates no change to
     # the signal (a straight routing between channels).
     ttable.0.0 1.0
     ttable.1.1 1.0
     ttable.2.2 1.0
     ttable.3.3 1.0
     ttable.4.4 1.0
     ttable.5.5 1.0
     ttable.6.6 1.0
     ttable.7.7 1.0

#    ttable.8.8 1.0
#    ttable.9.9 1.0
#    ttable.10.10 1.0
#    ttable.11.11 1.0
#    ttable.12.12 1.0
#    ttable.13.13 1.0
#    ttable.14.14 1.0
#    ttable.15.15 1.0

#    ttable.16.16 1.0
#    ttable.17.17 1.0
#    ttable.18.18 1.0
#    ttable.19.19 1.0
#    ttable.20.20 1.0
#    ttable.21.21 1.0
#    ttable.22.22 1.0
#    ttable.23.23 1.0
}
# JACK requires a ctl (mixer) interface for any pcm interface
# it uses. This is set to the first soundcard to keep JACK happy.
ctl.jackmulti {
     type hw
     card 0
}

# END OF .asoundrc



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

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

* Re: Multiple Delta 1010LT woes: UPDATE
  2004-02-20 18:29 Multiple Delta 1010LT woes: UPDATE Ludwig Schwardt
@ 2004-02-21  8:26 ` Jaroslav Kysela
  2004-02-21  8:28 ` Doug
  1 sibling, 0 replies; 6+ messages in thread
From: Jaroslav Kysela @ 2004-02-21  8:26 UTC (permalink / raw)
  To: Ludwig Schwardt; +Cc: alsa-devel

On Fri, 20 Feb 2004, Ludwig Schwardt wrote:

> Hi again,
> 
> I've made some progress on the .asoundrc issue. I can now record 8 
> analog channels in JACK using a single Delta 1010LT piped through the 
> multi plugin. I cannot get playback to work yet. This is luckily not a 
> problem for my application, which only records sound. Any ideas on 
> getting playback to work?

This hardware has assymetric channel count - playback 10 and capture 12 
(you've already figured this value). The extra two channels for capture 
are for the digital stereo mixer output.

> I do notice a few extra warnings popping up which wasn't there when I 
> accessed the soundcard directly, namely "late driver wakeups" followed 
> by e.g. "delay of 46411.000 usecs exceeds estimated spare time of 
> 45230.000; restart ...". These delays are always very close to the 
> estimated spare time. Since I cannot playback within JACK, I cannot tell 
> whether this has an audible effect. Should I be worried?

It looks like that system for some reason has long scheduler gaps or 
something takes a lot of CPU time.

Personally, I don't think that you can use all three Delta's in one box at
maximum rate, because they have only limited DMA PCI buffers (max 256kB)
which is too small. If I compare this buffer with RME cards, then
one channel has space for 5461 samples (capture) with ICE1712 and
one channel with RME hardware has space for 16384 samples.

Anyway, it's true that route plugin - and basically all sample conversion 
and copy routines - in alsa-lib are not so much optimized for particular
streams, so there is still space to improve code.

> P.S. What is the rule regarding slaves.xxx.channels in multi plugins? It 
> seems you have to set this equal to the actual number of channels of the 
> soundcard (slaves.xxx.pcm) to prevent "invalid argument" and "broken 

Yes, this parameter must match with hardware.

> configuration" ALSA errors. What do you choose if the number of capture 
> and playback channels differ?

Use asym plugin which let's you specify two different stream configuration 
for playback and capture:

pcm.name {
        type asym               # Asym PCM
        playback STR            # Playback slave name
        # or
        playback {              # Playback slave definition
                pcm STR         # Slave PCM name
                # or
                pcm { }         # Slave PCM definition
        }
        capture STR             # Capture slave name
        # or
        capture {               # Capture slave definition
                pcm STR         # Slave PCM name
                # or
                pcm { }         # Slave PCM definition
        }
}

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

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

* Re: Multiple Delta 1010LT woes: UPDATE
  2004-02-20 18:29 Multiple Delta 1010LT woes: UPDATE Ludwig Schwardt
  2004-02-21  8:26 ` Jaroslav Kysela
@ 2004-02-21  8:28 ` Doug
  2004-02-21  9:34   ` Tommi Sakari Uimonen
  2004-02-29 12:42   ` Multiple Delta 1010LT woes: verdict Ludwig Schwardt
  1 sibling, 2 replies; 6+ messages in thread
From: Doug @ 2004-02-21  8:28 UTC (permalink / raw)
  To: Ludwig Schwardt, alsa-devel

Hi Ludwig,

Are you in possesion of multiple cards at the moment?  If so, have you 
tested any multitrack recording of analog inputs from both cards 
simultaneously yet?  I have 1 1010LT now, and am planning on a second 
one within the month, to create a 16 track live recording studio.  This 
guy that wrote the article (link below) didn't have good luck with 
multiple cards (actually he ran a 1010 and 1010LT), but he didn't use 
word clock sync for one, so I'm still optimisitc. Keep me informed...

Thanks,
Doug

http://www.sonicstate.com/articles/article.cfm?page=1&id=41

Ludwig Schwardt wrote:
> Hi again,
> 
> I've made some progress on the .asoundrc issue. I can now record 8 
> analog channels in JACK using a single Delta 1010LT piped through the 
> multi plugin. I cannot get playback to work yet. This is luckily not a 
> problem for my application, which only records sound. Any ideas on 
> getting playback to work?
> 
> I do notice a few extra warnings popping up which wasn't there when I 
> accessed the soundcard directly, namely "late driver wakeups" followed 
> by e.g. "delay of 46411.000 usecs exceeds estimated spare time of 
> 45230.000; restart ...". These delays are always very close to the 
> estimated spare time. Since I cannot playback within JACK, I cannot tell 
> whether this has an audible effect. Should I be worried?
> 
> I attach my .asoundrc for everyone else who struggles with this issue.
> Hopefully I can just uncomment the commented blocks when the other 
> Deltas arrive... Any remarks would be very helpful (for example, do I 
> understand bindings and ttables correctly in my comments below?).
> 
> By the way, I started JACK with "jackd -R -d alsa -d jackmulti -C". It 
> becomes unhappy if you leave out the -C flag.
> 
> Thanks and sorry for all the nagging questions,
> 
> Ludwig Schwardt
> 
> P.S. What is the rule regarding slaves.xxx.channels in multi plugins? It 
> seems you have to set this equal to the actual number of channels of the 
> soundcard (slaves.xxx.pcm) to prevent "invalid argument" and "broken 
> configuration" ALSA errors. What do you choose if the number of capture 
> and playback channels differ?
> 
> ----------------------------------------
> 
> # START OF .asoundrc
> 
> # Alias for first Delta card
> pcm.delta1010_1 {
>    type hw
>    card 0
> }
> ctl.delta1010_1 {
>    type hw
>    card 0
> }
> 
> # Alias for second Delta card
> #pcm.delta1010_2 {
> #   type hw
> #   card 1
> #}
> #ctl.delta1010_2 {
> #   type hw
> #   card 1
> #}
> 
> # Alias for third Delta card
> #pcm.delta1010_3 {
> #   type hw
> #   card 2
> #}
> #ctl.delta1010_3 {
> #   type hw
> #   card 2
> #}
> 
> # Create virtual device out of multiple soundcards.
> # This cannot be used by JACK, which will complain that it
> # cannot get mmap-based access. See jackmulti below.
> pcm.multi {
>     type multi
>     # First soundcard associated with slave "a"
>     slaves.a.pcm delta1010_1
>     # This must be specified, and MUST equal 12 for the Delta 1010LT
>     # (otherwise "broken configuration" and "invalid argument" errors 
> result)
>     # I assume it must be equal to the correct number of channels on
>     # other soundcards too
>     slaves.a.channels 12
> #    slaves.b.pcm delta1010_2
> #    slaves.b.channels 12
> #    slaves.c.pcm delta1010_3
> #    slaves.c.channels 12
> 
>     # Read the lines below as follows:
>     # bindings.x.slave y
>     # bindings.x.channel z
>     # The above example means:
>     # "Bind channel z on slave y to channel x of the new multi device"
>     # Check above to see which soundcard is associated with which slave
> 
>     # The first 8 channels of the first soundcard
>     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
> 
>     # The first 8 channels of the second soundcard
> #    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
> 
>     # The first 8 channels of the third soundcard
> #    bindings.16.slave c
> #    bindings.16.channel 0
> #    bindings.17.slave c
> #    bindings.17.channel 1
> #    bindings.18.slave c
> #    bindings.18.channel 2
> #    bindings.19.slave c
> #    bindings.19.channel 3
> #    bindings.20.slave c
> #    bindings.20.channel 4
> #    bindings.21.slave c
> #    bindings.21.channel 5
> #    bindings.22.slave c
> #    bindings.22.channel 6
> #    bindings.23.slave c
> #    bindings.23.channel 7
> }
> # JACK requires a ctl (mixer) interface for any pcm interface
> # it uses. A ctl interface for a multi device is a bit strange,
> # but set this to the mixer of the first soundcard to keep JACK happy.
> ctl.multi {
>     type hw
>     card 0
> }
>                
> # This creates a multi-channel interleaved PCM stream based on
> # the multi device. JACK will work with this one, as it can get
> # mmap access to the channels.
> pcm.jackmulti {
>     type route
>     slave.pcm multi
> 
>     # As I understand it, you read "ttable.x.y z" as "route channel y of
>     # slave device specified above to channel x of the new (client) device,
>     # and multiply signal along this route with factor z", where z is
>     # between 0.0 and 1.0. A value of 1.0 therefore indicates no change to
>     # the signal (a straight routing between channels).
>     ttable.0.0 1.0
>     ttable.1.1 1.0
>     ttable.2.2 1.0
>     ttable.3.3 1.0
>     ttable.4.4 1.0
>     ttable.5.5 1.0
>     ttable.6.6 1.0
>     ttable.7.7 1.0
> 
> #    ttable.8.8 1.0
> #    ttable.9.9 1.0
> #    ttable.10.10 1.0
> #    ttable.11.11 1.0
> #    ttable.12.12 1.0
> #    ttable.13.13 1.0
> #    ttable.14.14 1.0
> #    ttable.15.15 1.0
> 
> #    ttable.16.16 1.0
> #    ttable.17.17 1.0
> #    ttable.18.18 1.0
> #    ttable.19.19 1.0
> #    ttable.20.20 1.0
> #    ttable.21.21 1.0
> #    ttable.22.22 1.0
> #    ttable.23.23 1.0
> }
> # JACK requires a ctl (mixer) interface for any pcm interface
> # it uses. This is set to the first soundcard to keep JACK happy.
> ctl.jackmulti {
>     type hw
>     card 0
> }
> 
> # END OF .asoundrc
> 
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 

-- 
http://nostar.isa-geek.com/



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

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

* Re: Multiple Delta 1010LT woes: UPDATE
  2004-02-21  8:28 ` Doug
@ 2004-02-21  9:34   ` Tommi Sakari Uimonen
  2004-02-29 12:42   ` Multiple Delta 1010LT woes: verdict Ludwig Schwardt
  1 sibling, 0 replies; 6+ messages in thread
From: Tommi Sakari Uimonen @ 2004-02-21  9:34 UTC (permalink / raw)
  To: Doug; +Cc: Ludwig Schwardt, alsa-devel

> Are you in possesion of multiple cards at the moment?  If so, have you
> tested any multitrack recording of analog inputs from both cards
> simultaneously yet?  I have 1 1010LT now, and am planning on a second
> one within the month, to create a 16 track live recording studio.  This

I have successfully used Delta 1010LT and Delta Audiophile 2496 (2
ana + 2 digi channels) together to have 10 analog channels (1010LT has 8
analog, right?). I synced the cards through the S/PDIF since 2496 doesn't
have word clock i/o. But I had to reset alsa drivers after every capture,
since I experienced sometimes some driver lockups. I think the spdif code
had some bug and it was pathced later, but I didn't have the recording
setup anymore to test if that patch helped.

For recording I used ecasound. Also tried to hack around with .asoundrc
and JACK, but no luck. This was about 6 months ago, things might be
different now.

Tommi Uimonen


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

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

* Multiple Delta 1010LT woes: verdict
  2004-02-21  8:28 ` Doug
  2004-02-21  9:34   ` Tommi Sakari Uimonen
@ 2004-02-29 12:42   ` Ludwig Schwardt
  2004-02-29 21:04     ` Doug
  1 sibling, 1 reply; 6+ messages in thread
From: Ludwig Schwardt @ 2004-02-29 12:42 UTC (permalink / raw)
  To: alsa-devel; +Cc: Doug

Hi,

My quest for syncing two Delta 1010LTs under ALSA has gone on hold for 
the time being... No success so far. Both cards work fine separately. 
The main problem is that I cannot get either a word clock output or 
SPDIF output going. Both these digital outputs remained dead no matter 
what I did. I'm especially curious whether the word clock output has to 
be enabled in some way by the driver. It seems that you have to enable 
it under Windows, at least.

Luckily for me, my application didn't really depend on synchronization - 
I only needed it to get JACK to record from all my soundcards at once. 
After a switch to PortAudio I was able to simultaneously record 
(unsynced) sound from all the soundcards. Both great APIs, by the way.

I would still be interested in any suggestions to get syncing to work, 
as I have a few Delta 1010LTs left on which to experiment and I am a 
willing guinea pig :->

Ludwig



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

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

* Re: Multiple Delta 1010LT woes: verdict
  2004-02-29 12:42   ` Multiple Delta 1010LT woes: verdict Ludwig Schwardt
@ 2004-02-29 21:04     ` Doug
  0 siblings, 0 replies; 6+ messages in thread
From: Doug @ 2004-02-29 21:04 UTC (permalink / raw)
  To: Ludwig Schwardt, alsa-devel

Did you ever try it in windows, too see if it was possible at all?  I 
just snagged a second card off ebay, so I will be experimenting with 
this soon, too.

Ludwig Schwardt wrote:
> Hi,
> 
> My quest for syncing two Delta 1010LTs under ALSA has gone on hold for 
> the time being... No success so far. Both cards work fine separately. 
> The main problem is that I cannot get either a word clock output or 
> SPDIF output going. Both these digital outputs remained dead no matter 
> what I did. I'm especially curious whether the word clock output has to 
> be enabled in some way by the driver. It seems that you have to enable 
> it under Windows, at least.
> 
> Luckily for me, my application didn't really depend on synchronization - 
> I only needed it to get JACK to record from all my soundcards at once. 
> After a switch to PortAudio I was able to simultaneously record 
> (unsynced) sound from all the soundcards. Both great APIs, by the way.
> 
> I would still be interested in any suggestions to get syncing to work, 
> as I have a few Delta 1010LTs left on which to experiment and I am a 
> willing guinea pig :->
> 
> Ludwig
> 
> 

-- 
http://nostar.isa-geek.com/



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

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

end of thread, other threads:[~2004-02-29 21:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-20 18:29 Multiple Delta 1010LT woes: UPDATE Ludwig Schwardt
2004-02-21  8:26 ` Jaroslav Kysela
2004-02-21  8:28 ` Doug
2004-02-21  9:34   ` Tommi Sakari Uimonen
2004-02-29 12:42   ` Multiple Delta 1010LT woes: verdict Ludwig Schwardt
2004-02-29 21:04     ` Doug

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.