Linux has two major audio systems: ALSA^ and JACK. Although there is a lot of overlap, ALSA is kind of the lower level system, providing extensive drivers and controls for hardware, and JACK provides a higher level ability to route sound from sources to destinations. Eg. from a mic to a speaker.
To configure JACK, the utility qjackctl is very nice. Be aware, you may need to fully quit and re-launch it to see any changes in setup. The Connections panel allows you to make (and break) connections quickly and temporarily. For more perminant connections use the Patchbay.
First, install the Pulse Audio control GUI (which isn't installed by default, PulseAudio is but not the GUI for it)
sudo apt install pavucontrol
Next create a fake channel, a "null sink", where the inputs can be collected as a "Recording" source.
pactl load-module module-null-sink sink_name=inputs
Now, for as many inputs (mics) as you like, add loopback modules, setting them all to sink to your null sink:
pactl load-module module-loopback sink=inputs latency_msec=1
Just repeat that line as many times as you have mics. If you get "stuttering" try increasing the latency setting.
Now, in PulseAudio volume control open the "Recording" tab, select "Virtual Streams" (or "All Streams") from the bottom selector and then make sure you connect a different input to each different loopback. You can chose the outputs for your loopbacks under the "Playback" tab by selecting "All Streams"
While this did work, I found the latency was pretty bad until I added the latency_msec=1 flag.
It is also possible to directly specify the source so you don't need to do that in the GUI. To get a list of possible sources, use the command:
pacmd list-sources | egrep '(^\s+name: .*)|(^\s+device.description = .*)'
and then copy out the device you want using the string after name: <. It will start with alsa_input and end before the >. Add this as the source= tag in the module-loopback command. For example:
pactl load-module module-loopback source=alsa_input.usb-Samson_Technologies_Samson_C01U-00.iec958-stereo sink=micmix latency_msec=1
See also:
To setup the UA-4FX under ALSA:
https://alsa.opensrc.org/Edirol_UA-4FX
The major problem is that the UA-4FX doesn't support computer control of
volumn. But ALSA supports a software volumn control:
pcm.!default { type plug slave.pcm "softvol" } pcm.softvol { type softvol slave { pcm "plughw:UA4FX" } control { name "SoftMaster" card 1 } }
note that the web page is wrong, the pcm line in the softvol section should
NOT be "pasymed".
Recording from a mono mic leaves one stereo channel with noise on it, so
you can put the mono audio on each stereo channel with:
pcm.record_left { type dsnoop ipc_key 234884 slave { pcm "plughw:UA4FX" channels 2 } bindings.0 0 } pcm.record_right { type dsnoop ipc_key 2241234 slave { pcm "plughw:UA4FX" channels 2 } bindings.0 1 }
To start the JACK server with the UA4FX:
jackd --realtime -d alsa -C hw:UA4FX -P hw:UA4FX &
See also:
As per:
https://www.youtube.com/watch?v=WE8oIRIZdgg
You can use alsamixer to correctly set the mic volume levels which seems
to resolve a lot of weird audio problems with the mic.
file: /Techref/os/linux/audio.htm, 5KB, , updated: 2024/7/3 10:28, local time: 2024/10/13 00:13,
35.171.164.77:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/os/linux/audio.htm"> Linux Audio</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.