When I record a jack stream at 192kHz rate the recording speed is doubled. That is when I play it back it plays at double speed. In addition, I have a clock display on the system and it shows that the recording time calculated by the -V switch is 1/2 the rate it should be. (e.g. 10 seconds wall clock is 5 seconds jack_capture -V clock)
If I use the jack_connect and connect the ports to other services the signal is correctly interpreted.
Experimentation reveals that the system is actually producing 96kHz.
- OS: Raspian
- Uname -a: Linux cuimhne-bd4bc2f8 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux
- Platform: Pi 3 A+
- Soundcard: pisound
- Jack start command: /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:pisound -r 192000 -p 1024 -n 2 -X seq -s (NOT using the systemctl mechanism)
- Jack_capture command: jack_capture -V
I executed a timing of the capture and a snd-file info dump of the result. The wall clock agrees with the timing in that the 5 second recording took 10 seconds.
$ time jack_capture --disable-console -d 5 /recordings/5sec.wav >>> Warning. Could not set higher priority for a SCHED_OTHER process using setpriority(). >>> >>> Recording to "/recordings/5sec.wav". The recording is going >>> to last 5.000000 seconds Press <Ctrl-C> to stop before that. >>> Please wait while writing all data to disk. (shouldn't take long) Finished. real 0m10.332s user 0m0.269s sys 0m0.185s $ sndfile-info /tmp/5sec.wav
The results are:
sndfile-info /recordings/5sec.wav ======================================== File : /recordings/5sec.wav Length : 7680088 RIFF : 7680080 WAVE fmt : 16 Format : 0x3 => WAVE_FORMAT_IEEE_FLOAT Channels : 2 Sample Rate : 192000 Block Align : 8 Bit Width : 32 Bytes/sec : 1536000 fact : 4 frames : 960000 PEAK : 24 version : 1 time stamp : 1610274863 Ch Position Value 0 0 0 1 0 0 data : 7680000 End ---------------------------------------- Sample Rate : 192000 Frames : 960000 Channels : 2 Format : 0x00010006 Sections : 1 Seekable : TRUE Duration : 00:00:05.000 Signal Max : 0 (-inf dB)
Jack component versions
jack_capture --version 0.9.73 jackd --version jackdmp version 1.9.12 tmpdir /dev/shm protocol 8
This information was originally provided in a jack_capture ticket: https://github.com/kmatheussen/jack_capture/issues/43
The result there was that Jack was reporting 192Khz but jack_capture was only receiving 96Khz from ALAS driver, so that ticket was closed an another opened with Jack (https://github.com/jackaudio/jack2/issues/702). However there is a belief that the issue is in the ALSA driver.
The output from PiSound sounds proper.
The path through the system is
guitar ----> pisound in ---> Jack ---> pisound out ---> amplifier | v jack_capture ---> disk