LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-14-2020, 05:44 PM   #1
MALDATA
Member
 
Registered: Mar 2005
Posts: 142

Rep: Reputation: 19
No output from PulseAudio loopback


Hi all,

There seems to be a lot of content on various forums about this exact problem, but I still can't get it sorted out. All I need is to plug a sound source into the computer's line-in, and then get the audio to come out on the line-out. PulseAudio is installed and working.

Here's one of many resources that says that the right tool for the job here is the loopback module:
https://www.pclinuxos.com/forum/inde...topic=147977.0

So, presumably all I need to do is
Code:
$ pactl load-module module-loopback source=alsa_input.platform-sound.stereo-fallback sink=alsa_output.platform-sound.stereo-fallback
And then audio should get sent from the line-in to the line-out. After issuing this command, I can do
Code:
$ pacmd list-source-outputs
and
Code:
$ pacmd list-sink-inputs
and it shows that both have a volume of 100%, are not muted, etc. Meanwhile, I can use paplay and hear a sound file get played over the speakers, so at least I know that part is working. I have also gone into alsamixer and unmuted all playback channels, then turned on all capture channels.

I'm a little restricted on this machine, in that there is no UI, so I can't use pavucontrol. But still, my pactl command looks ok to me, and I can't see any other reason for this to fail.

Anyone else have any thoughts on what might be the problem/how to get more diagnostic info?

Thanks!
 
Old 02-14-2020, 06:27 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,003
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
various ways to configure that. Loopback might be assuming snd-aloop. Who's output is it's input. There's an alsaloop program to "route" that sound to other things like pulseaudio and an actual sound device with a DAC (digital to analog converter). I've used snd-aloop method to run jackd on snd-aloop and route that to pulse over the network. Versus the usual way of running pulse over a running jackd locally. Of course each layer adds a bit of latency. So not so good for live use, or audio/video sync depending on the speed of your computers and network. There's also aconnect, jack_lsp/jack_connect, and various other ways to "route" your audio signals. Simpler ways in things like qjackctl and whatnot.
 
Old 02-18-2020, 09:28 PM   #3
MALDATA
Member
 
Registered: Mar 2005
Posts: 142

Original Poster
Rep: Reputation: 19
I'm stuck with only a few options here, specifically, only pulseaudio and alsa. I don't have the option to use jackd, and I'm relatively sure this should be doable with only PA. Latency isn't much of a concern for our use case.

Has anyone had success doing this?
 
Old 02-19-2020, 01:09 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,003
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
FYI, alsa is the audio driver. There's no "NOT" using ALSA. Except in the case of legacy OSS drivers for some ancient cards. So you want your mic to output to your speakers? AKA feedback (if mic is close to speaker and gain is high enough to not be muted).

Audio has routing, like networks have routing. Even if implied in some cases with a network mask. In audacity you could use software playthrough. With a good sound card you have full duplex abilities. AKA the ability to play sound and record it without either of the two affecting each other. They are not linked / routed by default to avoid feedback. And not the normal use case.

Does something relatively simple work for you. With latency of course.

$ arecord -c 2 -r 48000 -t wav -f FLOAT_LE -D pule - | aplay -c 2 -r 48000 -t wav -f FLOAT_LE -D pulse -

The above uses a pipe to take input (MIC) and routes it via STDOUT to output (Speakers). By using a recording program (arecord) and a playback program (aplay). In audacity you can enable software playthrough and while you're recording it'll route to the output. The above had about a 1 second latency, while running on an RPi 4b with a pulse over jack setup with a 30 band EQ via calf-plugins. It's a networked setup that was actively playing another stream via youtube. But it still outputted my mic (delayed). Latency might be roughly the same on a client machine, given that I have it on a 10/100 network at the moment. With at least 5 other computers that can output to that ONE audio option with roughly the same command (if not exactly the same). But I already put my mic up, so not tested. Not the only routing option out there, but a starting point / proof of concept.
 
  


Reply

Tags
audio, loopback, pulseaudio


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Get Sound from Pulseaudio -- PulseAudio Will Not Start JasonC10203 Linux - Software 4 11-29-2016 12:18 AM
Bypass pulseaudio problems and crashes when you don't have pulseaudio. Rinndalir Linux - Software 1 08-31-2016 02:00 PM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 04:57 AM
[SOLVED] problem with ethernet loopback test using loopback plug/stub: receiving socket not se mcha Linux - Kernel 3 08-26-2010 12:28 PM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration