**** List of CAPTURE Hardware Devices ****Ĭard 0: PCH, device 0: ALC298 Analog Server Name: PulseAudio (on PipeWire 0.3.23)ĭefault Sample Specification: float32le 2ch 48000Hzĭefault Channel Map: front-left,front-rightĭefault Sink: alsa_output.pci-0000_00_1f.3.analog-stereoĭefault Source: alsa_input.pci-0000_00_1f.3.analog-stereo Server String: /run/user/1000/pulse/native I was using pulseaudio but now I'm using pipewire with pulse audio and the problem is the same as it was before.Įdit1: btw, I'm using kde/plasma up to date and there was no options on the system settings that would indicate that this was an intentional behavior. I can say that if I connect a separated mic, like a webcam and use it's mic, the output audio does not get redirect to the input, but that is a pain in the ass, and most of the time, I can only connect my headphones(whatever they are, the problems persist as long as they go through the same connector). It is impossible to use Linux on my computer like this. EVERY sound on my computer gets back as input into calls and conferences.
Even if I put the audio at minimum volume and the mic isolated by something, I still get the audio at the same volume in the mic device, no matter what I do.ĭoes anyone know how to disable this behavior? It is so irritating. It's only when I go to arch that every output gets redirected to the mic device.
I thought it could be the headphone, but on windows it works fine. I tried with aplay -D hw:2,0,x myaudio.I have a razer blade advanced 2018 and somehow, any audio output comes back to input(mic) if I have headphone and mic connected to the audio jack(that connector that has both together). Unfortunately I can’t manage it.Ĭard 0: Headphones, device 0: bcm2835 Headphones Ĭard 1: Loopback, device 0: Loopback PCM Ĭard 1: Loopback, device 1: Loopback PCM It works with a physical soundcard and a loopback cable, but I’d like to set up without physical soundcard. Now I have to loop the output to the “microphone” input, because this is what pjsua send’s via SIP. Therfore I wrote a script which use aplay for producing the anncoument. I tried to make an automataic phone answering with pjsua.
I am thinking of creating loopback device then forward or clone hdmi sound to this loopback device and capture from counter part of loopback device. **** List of PLAYBACK Hardware Devices ****Ĭard 0: ALSA, device 0: bcm2835 ALSA Ĭard 0: ALSA, device 1: bcm2835 IEC958/HDMI Ĭard 0: ALSA, device 2: bcm2835 IEC958/HDMI1 **** List of CAPTURE Hardware Devices $ aplay -l Here is my situation in raspberry $ arecord -l This time you should be able to hear the audio.wav directly through system’s default speaker – again a loopback in action – rather two loopbacks in action: audio.wav -> hw:2,0,4 -> (loopback through snd-aloop driver) -> hw:2,1,4 -> (loopback through alsaloop app) -> hw:1,0 -> heard on speaker.ġ2 thoughts on “ Playing with ALSA loopback devices” On another shell, do the earlier playing: $ aplay -D hw:2,0,4 audio.wav And, now let’s loopback the virtual audio capture device hw:2,1,4 to this: alsaloop -C hw:2,1,4 -P hw:1,0 From the output of aplay -l, hw:1,0 is the analog out (speaker). Interestingly, audio loopback could also be achieved in user space using alsaloop from alsa-utils package. This would record from your system’s default mic. For that, just record a new wave file with your speech using the following command: $ arecord -f S16_LE -c 2 -r 48000 audio.wav This would play on your system’s default speaker.Īlso, note that there may be problem in just playing any audio.wav file because of the mismatched audio format etc support. You may play the recorded audio as follows: $ aplay recorded.wav Note that providing the sample format, channel count, frame rate in recording ensures that playback picks up the same settings – this is because there is no real hardware underneath it is just a virtual loopback connection.Īnd in parallel (from another shell) play an audio from audio.wav into hw:2,0,4: $ aplay -D hw:2,0,4 audio.wavĪnd you’d find that recorded audio contains the played one – a loopback in action. Start recording audio from hw:2,1,4: $ arecord -D hw:2,1,4 -f S16_LE -c 2 -r 48000 recorded.wav A simple experiment could demonstrate the same. For example, audio played back into hw:2,0,4 could be captured from hw:2,1,4 audio played back into hw:2,1,7 could be captured from hw:2,0,7 – these are what are the loopbacks. Now in this, whatever audio is played back into hw:2,0,s could be captured from hw:2,1,s and viceversa, s ranging from 0 to 7. Moreover, each of the two devices under it, has 8 subdevices, which would be accessed using the format hw:c,d,s, where c stands for card number, d for device number, and s for subdevice number, e.g.
It may vary depending on which is the next free available card number. In the above images, the card 2 is the loopback card.