Bluetarget
Posts: 13
Joined: Wed Aug 10, 2016 5:16 pm

Recording from alsa audio loopback

Fri May 26, 2017 11:07 am

Hello

I'm trying to simply record output audio (to ffmpeg).
I tried with pulse but it crash when I play audio while recording (...).

So I wanted to try alsa loopback :

sudo modprobe snd-aloop
Added snd-aloop to sudo nano /etc/modules

and here is my asound.conf :

Code: Select all

pcm.!default {
    type plug
    slave.pcm "loop"
}

# output device
pcm.loopout {
    type dmix
    ipc_key 328211
    slave.pcm "hw:1,0,0"
}

# input device
pcm.loopin {
    type dsnoop
    ipc_key 686592
    slave.pcm "hw:1,1,0"
}

# duplex plug device
pcm.loop {
    type plug
    slave {
      pcm {
         type asym
         playback.pcm "loopout"
         capture.pcm "loopin"
      }
    }
}
The problem is that... Nothing happens.
When I try to record from Loopback, there is just *no sound*,
and if I try this command while recording from hw:Loopback:1,0

Code: Select all

aplay sm64_here_we_go.wav -D hw:Loopback,0,0 -c 2
I got this error :

Code: Select all

aplay: set_params:1239: Channels count non available
:((((


Can you help me please ?

Return to “Raspberry Pi OS”