This is especially true for laptops/netbooks with snd_hda_intel driver.
___________
1. First, we need to load snd-aloop kernel module. Open terminal window and type:
Code: Select all
modprobe snd-aloop
In such a case you could either try to compile the missing module by yourself or consult developer(s) of your distro for additional info/help.
To make this module load at system boot:
Menu -> System -> Boot Manager -> Modules -> Add new module
NOTE: if the module is already loaded it won't be listed in BootManager!
To remove it:
Code: Select all
rmmod snd-aloop
2. Create (if doesn't exist) /etc/asound.conf and append the following content to it:
Code: Select all
pcm.!default {
type asym
playback.pcm "LoopAndReal"
#capture.pcm "looprec"
capture.pcm "hw:0,0"
}
pcm.looprec {
type hw
card "Loopback"
device 1
subdevice 0
}
pcm.LoopAndReal {
type plug
slave.pcm mdev
route_policy "duplicate"
}
pcm.mdev {
type multi
slaves.a.pcm pcm.MixReale
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
pcm.MixReale {
type dmix
ipc_key 1024
ipc_perm 0666
slave {
pcm "hw:0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
pcm.MixLoopback {
type dmix
ipc_key 1025
ipc_perm 0666
slave {
pcm "hw:Loopback,0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
NOTE 1: In some cases sound card's index may be different from 0, e.g. in Acer AO 722 I had to replace all occurences of 'hw:0,0' with 'hw:1,0'.
NOTE 2: Multiple-Sound-Card-Wizard creates its own /etc/asound.conf file, so if you need to use it, do it before setting up looprec. Then you can append the stuff from above to it.
3. Perform a quick test. Turn on some music and type:
Code: Select all
arecord -f dat -D looprec > /root/test.wav
Code: Select all
aplay /root/test.wav
In order to enable recording in mhWaveEdit:
In 'Edit -> Preferences -> Sound -> (Driver: ALSA) Settings -> Recording device' enter looprec.
Also, sample format ('Play -> Record -> Sample format -> Other format') has to be:
- Channels: Stereo
- Sample type: 16 bit PCM
- Signedness: Signed
- Endianness: Little endian
- Sample rate: 48000
In order to enable recording in Audacity:
In 'Edit -> Preferences -> Devices -> Recording -> Device' choose looprec
In 'Edit -> Preferences -> Quality -> Sampling -> Default Sample Rate' choose 48000
KNOWN ISSUES:
- PCM slider in Alsamixer/Retrovol no longer works
- you can't record from microphone using looprec device
- nor from pMusic (may be not true for older versions though, haven't checked), because it uses its own, custom ~/.asoundrc config file (probably needed by equalizer), but if you delete this file after starting PMusic and restart a track, it becomes recordable
- nor from apps that use OSS, unless they have an option to set output to ALSA (or unless you have alsa-oss installed and you'll use aoss script to launch such an application)
___________
DISCLAIMER: I only tranplanted the info provided by kokoko3k on Archlinux forum into Puppy's ground, taking into account some specific quirks of the latter.
I do not understand why and how the stuff in asound.conf works.
Thanks to all in this thread for the feedback.
Greetings!