View previous topic :: View next topic |
Author |
Message |
mimosinnet l33t
Joined: 10 Aug 2006 Posts: 713 Location: Barcelona, Spain
|
Posted: Thu May 28, 2015 10:59 pm Post subject: snd-aloop, alsa, and recordmydesktop |
|
|
I am trying to record internal audio with alsa and recordmydesktop. I have followed this post in arch forums. I have managed to get snd-aloop as my default card:
Code: | cat /proc/asound/cards
0 [Loopback ]: Loopback - Loopback
Loopback 1
1 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfe024000 irq 16
2 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfcffc000 irq 32 |
Nevertheless, after trying the configuration suggested by the post and some ALSA reading, I am unable to "send the sound" or "get the sound" from Loopback. I have sound if I define SB as the default card:
Code: | cat .asoundrc
defaults.pcm.!card SB
defaults.pcm.!device 0 |
If I understand it correctly, it should be possible to "send" the output of the SB card to Loopback (and have the speakers play it). The Loopback card as playback and capture capabilities:
Code: | $ amixer -c 0
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 243 [95%] [-2.40dB]
Front Right: Playback 243 [95%] [-2.40dB]
Simple mixer control 'Digital',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 120
Front Left: Capture 111 [92%] [25.50dB]
Front Right: Capture 111 [92%] [25.50dB] |
, but I do not know how to use it.
Any hints appreciated! Cheers! _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts. |
|
Back to top |
|
|
tclover Guru
Joined: 10 Apr 2011 Posts: 516
|
Posted: Sun May 31, 2015 10:30 am Post subject: |
|
|
Yes you can in fact use ALSA Loop device to make some kind *redirection* of in/output of sound device. However, your `~/.asoundrc' looks tiny for the task at hand...
Follow my signature and then dotfiles repository to have an example of what you could do with the loop device and create in/output interfaces with the loop device for specif usages: e.g. using media-sound/zita-ajbridge to create a mixed ALSA default in/output with JACK, so that, ALSA only apps won't try hold unconditionally any real hardware sound device.
And then, it looks like you need Jack-Audio-Connection-Kit in order to connect certain apps as input to other apps et al. You should follow pro-audio wiki and install at least JACK and ladish suite in order to easily manage dis-/connect between apps and JACK server. My overlay has also a daw package set for that if you need such a set up; or else, get the pro-audio overlay for a more rich sound packages overlay. _________________ home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/ |
|
Back to top |
|
|
mimosinnet l33t
Joined: 10 Aug 2006 Posts: 713 Location: Barcelona, Spain
|
Posted: Thu Jun 04, 2015 1:50 pm Post subject: |
|
|
tclover wrote: | Yes you can in fact use ALSA Loop device to make some kind *redirection* of in/output of sound device. However, your `~/.asoundrc' looks tiny for the task at hand... |
Thanks for your message! I have had a look at your .asoundrc, but I believe I must be missing something very simple. I have defined this .asoundrc from this post:
Code: | pcm.loopout {
type dmix
ipc_key 328211
slave.pcm "hw:Loopback,0,0" }
pcm.loopin {
type dsnoop
ipc_key 686592
slave.pcm "hw:Loopback,1,0"
}
pcm.loop {
type plug
slave {
pcm {
type asym
playback.pcm "loopout"
capture.pcm "loopin"
}
}
} |
Sound can be recorded and played with:
Code: | arecord -f cd -D default test.wav
aplay -f cd -D default test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo |
Nevertheless, there is no sound with:
Code: | aplay -f cd -D loop test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo |
These are my cards (/proc/asound/cards):
Quote: | 0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfe024000 irq 16
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfcffc000 irq 16
2 [Loopback ]: Loopback - Loopback
Loopback 1 |
I am missing how to have sound when using the Loopback device.
Cheers! _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts. |
|
Back to top |
|
|
tclover Guru
Joined: 10 Apr 2011 Posts: 516
|
Posted: Thu Jun 04, 2015 9:10 pm Post subject: |
|
|
mimosinnet wrote: | I am missing how to have sound when using the Loopback device. |
First thing that stand out is that you are mixing dmix and loop back device at the same time... this is risky and even may be tricky to do. A saner approach is to define separately the loop {capture,playback} separately; define dmix and the plugin wrapper; set up dmix to use the playback loop device; and define your duplex device using dmix playback and loop capture.
Let's use your example....
Code: | pcm.loopout {
type plug
slave.pcm "hw:Loopback,0,0"
}
pcm.loopin {
type dsnoop
ipc_key 2048
slave.pcm "hw:Loopback,0,0"
}
# This a simple variant without dmix (should work...)
pcm.duplexloop {
type asym
playback.pcm loopout
capture.pcm loopin
}
# dmix
pcm.dmixer {
type plug
slave.pcm dmixplug
}
pcm.dmixplug {
type dmix
ipc_key 4096
ipc_perm 0660
ipc_gid audio
slave.pcm loopout
}
# duplex dmix/loop (test this... because this is what you want?)
pcm.dmixloop {
type asym
playback.pcm dmixer
capture.pcm loopin
} |
Simple duplex loop should work; the second may... if not define default {capture,playback} instead. _________________ home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|