The easiest way to get this done is a simple pipe onto STDOUT:
Code: Select all
root@DietPi:~# arecord -D hw:2,0 -f S16_LE -r48000 --buffer-size=4096 --period-size=1024 | aplay -D hw:0,0 -
Code: Select all
root@DietPi:~# jackd -RSd alsa -D hw:0 -n 3
jackdmp 1.9.19
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2021 Filipe Coelho.
jackdmp 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
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... hw:0|hw:0|1024|3|48000|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 3 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 3 periods for playback
Code: Select all
root@DietPi:~# jack_load -i "-C hw:2,0 -r48000 -p1024 -n3 -i2 -o2 -g8192" hairpin audioadapter
audioadapter is running.
client name = hairpin
Code: Select all
Fixed ringbuffer size = 8192 frames
Audio Interface Description :
Sampling Frequency : 48000, Sample Format : S16_LE, buffering : 1024, nperiod : 3
Software inputs : 2, Software outputs : 2
Hardware inputs : 2, Hardware outputs : 2
Card info (address : 0x7f87b77c00)
ID = b1
Driver = bcm2835_hdmi
Name = bcm2835 HDMI 1
LongName = bcm2835 HDMI 1
MixerName = Broadcom Mixer
Components =
--------------
HW Params info (address : 0x7f800143f0)
--------------
HW Params info (address : 0x7f80014660)
--------------