[linux-audio-dev] Re: trouble binding multiple ice1712 devices [part2]

From: Frank van de Pol <fvdpol@email-addr-hidden>
Date: Tue Aug 09 2005 - 00:11:11 EEST

While still trying to get my multichannel gear up & running I made some
(small) progress: I can successfully capture & playback 24 channels using my
Terratec boards.

arecord -M -v -D ews_24fd -t raw -c 24 -f S32_LE -r 48000 |
        aplay -v -M -D ews_24fd -t raw -c 24 -f S32_LE -r 48000

Unfortunate I still can't get it to run using Jack because the capture
stream can only be opened using MMAP_COMPLEX access. Does anyone know how to
transform this stream into MMAP_NONINTERLEAVED (which is what jack prefers) or
in MMAP_INTERLEAVED format?

I tried an ALSA route pluging but that failed terribly: continious bursts of
xruns

arecord -M -v -D ews_24jack -t raw -c 24 -f S32_LE -r 48000 |
        aplay -v -M -D ews_24jack -t raw -c 24 -f S32_LE -r 48000
 
and jack also hates this config:

23:05:45.278 /usr/bin/jackd -R -p256 -t10000 -dalsa -dews_24jack -r48000 -p64 -n2 -s -H -M
23:05:45.300 JACK was started with PID=27006 (0x697e).
jackd 0.99.0
Copyright 2001-2003 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
loading driver ..
apparent rate = 48000
creating alsa driver ...
ews_24jack|ews_24jack|64|2|48000|0|0|hwmon|hwmeter|soft-mode|32bit
configuring for 48000Hz, period = 64 frames, buffer = 2 periods
23:05:47.429 Server configuration saved to "/root/.jackdrc".
23:05:47.431 Statistics reset.
23:05:47.449 Client activated.
23:05:47.451 Audio connection change.
23:05:47.501 Audio connection graph change.
ALSA: poll time out, polled for 18446744073709465807 usecs
23:05:47.648 XRUN callback (1).
ALSA: poll time out, polled for 18446744073709466189 usecs
23:05:49.647 XRUN callback (2).
ALSA: poll time out, polled for 18446744073709466198 usecs
23:05:51.647 XRUN callback (3).
ALSA: poll time out, polled for 18446744073709466212 usecs
23:05:53.647 XRUN callback (4).
jackd watchdog: timeout - killing jackd
zombified - calling shutdown handler
23:05:57.344 Shutdown notification.
23:05:57.345 Client deactivated.
23:05:57.345 JACK is stopping...
cannot read result for request type 7 from server (Connection reset by peer)
cannot send request type 7 to server
cannot read result for request type 7 from server (Broken pipe)
23:05:57.566 JACK was stopped successfully.

I used this asound.conf:

=============================================================================
# card0 is the onboard via82xx / ac97 sound
#
# card1 is a EWS88/D (ADAT 1-8)
# card2 is a EWS88/D (ADAT 9-16)
# card3 is a Phase88 (analog 17-24)
#
# card4 is a Midiman Midisport 4x4 USB Midi interface

# Terratec EWS88/D hardware
#
pcm.ews_0 {
        type hw
        card 1
}
ctl.ews_0 {
        type hw
        card 1
}

pcm.ews_1 {
        type hw
        card 2
}
ctl.ews_1 {
        type hw
        card 2
}

pcm.ews_2 {
        type hw
        card 3
}
ctl.ews_2 {
        type hw
        card 3
}

#=========================================================================================

#
# Config: 24x24: 16 in/16 out via ADAT + 8 in/8 out Analog
#

# Aggregate of the 2 EWS88/D cards + Phase88
# Because of different in/out channels setup as 3 different multi devices.
#
#capture device:
ctl.ews_24c {
        type hw
        card 1
}
pcm.ews_24c {
        type multi
        slaves.a {
                pcm "ews_0"
                channels 12
        }
        slaves.b {
                pcm "ews_1"
                channels 12
        }
        slaves.c {
                pcm "ews_2"
                channels 12
        }

        bindings [
                # adat 1-8
                {slave a channel 0}
                {slave a channel 1}
                {slave a channel 2}
                {slave a channel 3}
                {slave a channel 4}
                {slave a channel 5}
                {slave a channel 6}
                {slave a channel 7}

                # spdif card 1
                #{slave a channel 8}
                #{slave a channel 9}
                #{slave a channel 10}
                #{slave a channel 11}

                # adat 9-16
                {slave b channel 0}
                {slave b channel 1}
                {slave b channel 2}
                {slave b channel 3}
                {slave b channel 4}
                {slave b channel 5}
                {slave b channel 6}
                {slave b channel 7}

                # spdif card 2
                #{slave b channel 8}
                #{slave b channel 9}
                #{slave b channel 10}
                #{slave b channel 11}

                # analog 17-24
                {slave c channel 0}
                {slave c channel 1}
                {slave c channel 2}
                {slave c channel 3}
                {slave c channel 4}
                {slave c channel 5}
                {slave c channel 6}
                {slave c channel 7}

                # spdif card 3
                #{slave c channel 8}
                #{slave c channel 9}
                #{slave c channel 10}
                #{slave c channel 11}
        ]
}

#playback device:
ctl.ews_24p {
        type hw
        card 1
}
pcm.ews_24p {
        type multi
        slaves.a {
                pcm "ews_0"
                channels 10
        }
        slaves.b {
                pcm "ews_1"
                channels 10
        }
        slaves.c {
                pcm "ews_2"
                channels 10
        }

        bindings [
                # adat 1-8
                {slave a channel 0}
                {slave a channel 1}
                {slave a channel 2}
                {slave a channel 3}
                {slave a channel 4}
                {slave a channel 5}
                {slave a channel 6}
                {slave a channel 7}

                # spdif card 1
                #{slave a channel 8}
                #{slave a channel 9}

                # adat 9-16
                {slave b channel 0}
                {slave b channel 1}
                {slave b channel 2}
                {slave b channel 3}
                {slave b channel 4}
                {slave b channel 5}
                {slave b channel 6}
                {slave b channel 7}

                # spdif card 2
                #{slave b channel 8}
                #{slave b channel 9}

                # analog 17-24
                {slave c channel 0}
                {slave c channel 1}
                {slave c channel 2}
                {slave c channel 3}
                {slave c channel 4}
                {slave c channel 5}
                {slave c channel 6}
                {slave c channel 7}

                # spdif card 3
                #{slave c channel 8}
                #{slave c channel 9}
        ]
}

# attempt to transform the capture stream from MMAP_COMPLEX to
# MMAP_INTERLEAVED prior combining capture and playback using the
# asym plug
#
# does not work for me....
pcm.ews_24ci {
        type route
        slave.pcm ews_24c

        ttable.0.0 1
        ttable.1.1 1
        ttable.2.2 1
        ttable.3.3 1
        ttable.4.4 1
        ttable.5.5 1
        ttable.6.6 1
        ttable.7.7 1
        ttable.8.8 1
        ttable.9.9 1
        ttable.10.10 1
        ttable.11.11 1
        ttable.12.12 1
        ttable.13.13 1
        ttable.14.14 1
        ttable.15.15 1
        ttable.16.16 1
        ttable.17.17 1
        ttable.18.18 1
        ttable.19.19 1
        ttable.20.20 1
        ttable.21.21 1
        ttable.22.22 1
        ttable.23.23 1
}

# full duplex device 24x24
ctl.ews_24fd {
        type hw
        card 1
}
pcm.ews_24fd {
        type asym
        playback.pcm ews_24p # works
        #capture.pcm ews_24ci # fails, immediate xruns
        capture.pcm ews_24c # works, but MMAP_COMPLEX
}

# unsuccesfull attempt to make jack happy...
# also fails on arecord/aplay
ctl.ews_24jack{
        type hw
        card 1
}
pcm.ews_24jack {
        type route
        slave.pcm ews_24fd

        ttable.0.0 1
        ttable.1.1 1
        ttable.2.2 1
        ttable.3.3 1
        ttable.4.4 1
        ttable.5.5 1
        ttable.6.6 1
        ttable.7.7 1
        ttable.8.8 1
        ttable.9.9 1
        ttable.10.10 1
        ttable.11.11 1
        ttable.12.12 1
        ttable.13.13 1
        ttable.14.14 1
        ttable.15.15 1
        ttable.16.16 1
        ttable.17.17 1
        ttable.18.18 1
        ttable.19.19 1
        ttable.20.20 1
        ttable.21.21 1
        ttable.22.22 1
        ttable.23.23 1
}

=============================================================================
 
 
Thanks,
Frank

-- 
+---- --- -- -  -   -    -
| Frank van de Pol                  -o)    A-L-S-A
| FvdPol@email-addr-hidden              /\\  Sounds good!
| http://www.alsa-project.org      _\_v
| Linux - Why use Windows if we have doors available?
Received on Tue Aug 9 04:15:04 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 09 2005 - 04:15:05 EEST