xref: /linux/Documentation/sound/cards/emu10k1-jack.rst (revision 9095bf25ea08135a5b74875dd0e3eeaddc4218a0)
1*e7030c96STakashi Iwai=================================================================
2*e7030c96STakashi IwaiLow latency, multichannel audio with JACK and the emu10k1/emu10k2
3*e7030c96STakashi Iwai=================================================================
4*e7030c96STakashi Iwai
5*e7030c96STakashi IwaiThis document is a guide to using the emu10k1 based devices with JACK for low
6*e7030c96STakashi Iwailatency, multichannel recording functionality.  All of my recent work to allow
7*e7030c96STakashi IwaiLinux users to use the full capabilities of their hardware has been inspired
8*e7030c96STakashi Iwaiby the kX Project.  Without their work I never would have discovered the true
9*e7030c96STakashi Iwaipower of this hardware.
10*e7030c96STakashi Iwai
11*e7030c96STakashi Iwai	http://www.kxproject.com
12*e7030c96STakashi Iwai						- Lee Revell, 2005.03.30
13*e7030c96STakashi Iwai
14*e7030c96STakashi Iwai
15*e7030c96STakashi IwaiUntil recently, emu10k1 users on Linux did not have access to the same low
16*e7030c96STakashi Iwailatency, multichannel features offered by the "kX ASIO" feature of their
17*e7030c96STakashi IwaiWindows driver.  As of ALSA 1.0.9 this is no more!
18*e7030c96STakashi Iwai
19*e7030c96STakashi IwaiFor those unfamiliar with kX ASIO, this consists of 16 capture and 16 playback
20*e7030c96STakashi Iwaichannels.  With a post 2.6.9 Linux kernel, latencies down to 64 (1.33 ms) or
21*e7030c96STakashi Iwaieven 32 (0.66ms) frames should work well.
22*e7030c96STakashi Iwai
23*e7030c96STakashi IwaiThe configuration is slightly more involved than on Windows, as you have to
24*e7030c96STakashi Iwaiselect the correct device for JACK to use.  Actually, for qjackctl users it's
25*e7030c96STakashi Iwaifairly self explanatory - select Duplex, then for capture and playback select
26*e7030c96STakashi Iwaithe multichannel devices, set the in and out channels to 16, and the sample
27*e7030c96STakashi Iwairate to 48000Hz.  The command line looks like this:
28*e7030c96STakashi Iwai::
29*e7030c96STakashi Iwai
30*e7030c96STakashi Iwai  /usr/local/bin/jackd -R -dalsa -r48000 -p64 -n2 -D -Chw:0,2 -Phw:0,3 -S
31*e7030c96STakashi Iwai
32*e7030c96STakashi IwaiThis will give you 16 input ports and 16 output ports.
33*e7030c96STakashi Iwai
34*e7030c96STakashi IwaiThe 16 output ports map onto the 16 FX buses (or the first 16 of 64, for the
35*e7030c96STakashi IwaiAudigy).  The mapping from FX bus to physical output is described in
36*e7030c96STakashi Iwaisb-live-mixer.rst (or audigy-mixer.rst).
37*e7030c96STakashi Iwai
38*e7030c96STakashi IwaiThe 16 input ports are connected to the 16 physical inputs.  Contrary to
39*e7030c96STakashi Iwaipopular belief, all emu10k1 cards are multichannel cards.  Which of these
40*e7030c96STakashi Iwaiinput channels have physical inputs connected to them depends on the card
41*e7030c96STakashi Iwaimodel.  Trial and error is highly recommended; the pinout diagrams
42*e7030c96STakashi Iwaifor the card have been reverse engineered by some enterprising kX users and are
43*e7030c96STakashi Iwaiavailable on the internet.  Meterbridge is helpful here, and the kX forums are
44*e7030c96STakashi Iwaipacked with useful information.
45*e7030c96STakashi Iwai
46*e7030c96STakashi IwaiEach input port will either correspond to a digital (SPDIF) input, an analog
47*e7030c96STakashi Iwaiinput, or nothing.  The one exception is the SBLive! 5.1.  On these devices,
48*e7030c96STakashi Iwaithe second and third input ports are wired to the center/LFE output.  You will
49*e7030c96STakashi Iwaistill see 16 capture channels, but only 14 are available for recording inputs.
50*e7030c96STakashi Iwai
51*e7030c96STakashi IwaiThis chart, borrowed from kxfxlib/da_asio51.cpp, describes the mapping of JACK
52*e7030c96STakashi Iwaiports to FXBUS2 (multitrack recording input) and EXTOUT (physical output)
53*e7030c96STakashi Iwaichannels.
54*e7030c96STakashi Iwai
55*e7030c96STakashi IwaiJACK (& ASIO) mappings on 10k1 5.1 SBLive cards:
56*e7030c96STakashi Iwai
57*e7030c96STakashi Iwai==============  ========        ============
58*e7030c96STakashi IwaiJACK		Epilog		FXBUS2(nr)
59*e7030c96STakashi Iwai==============  ========        ============
60*e7030c96STakashi Iwaicapture_1	asio14		FXBUS2(0xe)
61*e7030c96STakashi Iwaicapture_2	asio15		FXBUS2(0xf)
62*e7030c96STakashi Iwaicapture_3	asio0		FXBUS2(0x0)
63*e7030c96STakashi Iwai~capture_4	Center		EXTOUT(0x11)	// mapped to by Center
64*e7030c96STakashi Iwai~capture_5	LFE		EXTOUT(0x12)	// mapped to by LFE
65*e7030c96STakashi Iwaicapture_6	asio3		FXBUS2(0x3)
66*e7030c96STakashi Iwaicapture_7	asio4		FXBUS2(0x4)
67*e7030c96STakashi Iwaicapture_8	asio5		FXBUS2(0x5)
68*e7030c96STakashi Iwaicapture_9	asio6		FXBUS2(0x6)
69*e7030c96STakashi Iwaicapture_10	asio7		FXBUS2(0x7)
70*e7030c96STakashi Iwaicapture_11	asio8		FXBUS2(0x8)
71*e7030c96STakashi Iwaicapture_12	asio9		FXBUS2(0x9)
72*e7030c96STakashi Iwaicapture_13	asio10		FXBUS2(0xa)
73*e7030c96STakashi Iwaicapture_14	asio11		FXBUS2(0xb)
74*e7030c96STakashi Iwaicapture_15	asio12		FXBUS2(0xc)
75*e7030c96STakashi Iwaicapture_16	asio13		FXBUS2(0xd)
76*e7030c96STakashi Iwai==============  ========        ============
77*e7030c96STakashi Iwai
78*e7030c96STakashi IwaiTODO: describe use of ld10k1/qlo10k1 in conjunction with JACK
79