1ZITA-AJBRIDGE(1) General Commands Manual ZITA-AJBRIDGE(1)
2
3
4
6 zita-a2j, zita-j2a - Use ALSA device as a Jack client, with resampling.
7
9 zita-a2j [options]
10 zita-j2a [options]
11
13 These two programs allow to use an ALSA device as a Jack client, to
14 provide additional capture (zita-a2j) or playback (zita-j2a) channels.
15 Functionally they are equivalent to alsa_in and alsa_out that come with
16 Jack, but they will provide much better audio quality.
17
18 The resampling ratio will typically be stable within a few parts per
19 million and change only very smoothly. Delay will be stable as well
20 even under worse case conditions, e.g. the Jack client running near the
21 end of the cycle.
22
23 The ALSA device should be a 'hw:' one, i.e. direct access to a sound‐
24 card and not an ALSA 'plug' device. A well-working Jack system is
25 assumed, running in real-time mode.
26
27 The sample rate can be the same as Jack's one, or different. Minimum
28 delay is obtained by running the alsa device at a lower period size
29 than Jack. This can be done safely as the alsa thread will run at a
30 higher priority, and apart from copying to an internal buffer no work
31 is done there. There are no restrictions on the product of period_size
32 and number_of_periods as there are for alsa_in and alsa_out.
33
34 Resampling is performed using the zita-resampler library. The -Q option
35 sets the resampling quality. The parameter value is half the lenght
36 (i.e. the delay) of the multiphase filter used for resampling,
37 expressed in samples at the lower of the two sample rates. This mainly
38 affects the shape of the frequency response near the Nyquist frequency.
39 It is normally not necessary to use this option as an optimum value
40 depending both the sample rates is chosen automatically. The available
41 range is 16..96.
42
43 The -S option disables resampling. This requires that the device is
44 synced via word-clock to the one used by Jack.
45
46 The -L option forces the ALSA interface to 2 channels and 16-bit sample
47 format. This may be required when a2j or j2a is used with ALSA's 'loop'
48 device, if the other end doesn't accept more than 2 channels or float‐
49 ing point samples. This option must not be used otherwise.
50
51 Both programs will optionally print some information four times per
52 second. The first number is the average loop error over the last quar‐
53 ter second, in samples. It should be reduced to small randowm values
54 close to zero after 15 seconds or so. The second is the dynamic correc‐
55 tion factor of the nominal resampling ratio. This should converge to a
56 value close to one and not move much.
57
58 Small variations in these numbers will be seen when Jack apps are
59 started or stopped. This is normal. Anything else isn't - please
60 report.
61
62 When starting, and in case of major trouble, the 'Starting synchronisa‐
63 tion' message will be printed. A restart can happen if there is a time‐
64 out on the Jack server, e.g. when a client crashed or terminated in a
65 dirty way.
66
67 Jack1 will skip one or more cycles when new apps are started, or when a
68 large number of port connections is done in a short time. This may
69 interrupt the audio signal, but should otherwise not have any ill con‐
70 sequences nor require a restart.
71
72 Both zita-a2j and zita-j2a will suspend operation while Jack is in
73 'freewheeling' mode.
74
76 -h Print command line and options summary.
77
78 -j <name>
79 Jack client name [zita-a2j or zita-j2a].
80
81 -d <device>
82 ALSA device [none].
83
84 -r <rate>
85 Sample rate [48000].
86
87 -p <period>
88 Period size [256].
89
90 -n <nfrags>
91 Number of fragments [2].
92
93 -c <nchannels>
94 Number of channels [2].
95
96 -Q <quality>
97 Resampling quality [auto].
98
99 -S Word clock sync, disable resampling.
100
101 -I <samples> [0]
102 (zita-a2j only) Latency correction. The value is added to the
103 latency property set on the Jack ports.
104
105 -O <samples> [0]
106 (zita-j2a only) Latency correction. The value is added to the
107 latency property set on the Jack ports.
108
109 -L Force 2 channels and 16-bit sample format.
110
111 -v Print tracing information.
112
114 The zita-a2j and zita-j2a programs were written by Fons Adriaensen
115 <fons@linuxaudio.org>. This manual page was written by Robin Gareus
116 <robin@gareus.org> and Fons Adriaensen.
117
118
119
120
121 Sept 2013 ZITA-AJBRIDGE(1)