I run Slackware Linux 14.1 using KDE version 4.10.5 as my desktop manager, an it all runs on an Intel D5410M0 "Atom" Mini ITX board.
All I want to do is make a copy of whatever sounds are going to my speakers. I've been looking around for how to do this and I seen and tried commands like
ffmpeg -f oss -i /dev/dsp -ac 2 out.wav
or
arecord -f cd -d 10 -D default out.wav
I have tried many such commands with every "input" I can find which does not produce an error on the command line. (The "arecord -L" output is at the end of this post.) The commands which run yields either a silent .WAV file or a .WAV file which is just white noise. Obviously I am connecting to no input or to the wrong input.
I may have multiple problems here.
First off there is no /dev/dsp. If there is an equivalent I don't know what it is. The closest I get is /dev/snd/ which I presume has something to do with sound. The files under it are below, and they are the only "audio" group files under /dev.
root $?=0> ls -laF -R /dev/snd
/dev/snd:
total 0
drwxr-xr-x 3 root root 220 Mar 25 06:28 ./
drwxr-xr-x 16 root root 5540 Apr 9 19:42 ../
drwxr-xr-x 2 root root 60 Mar 25 06:28 by-path/
crw-rw---- 1 root audio 116, 7 Mar 25 10:28 controlC0
crw-rw---- 1 root audio 116, 6 Mar 25 10:28 hwC0D2
crw-rw---- 1 root audio 116, 5 Apr 9 19:45 pcmC0D0c
crw-rw---- 1 root audio 116, 4 Apr 9 19:46 pcmC0D0p
crw-rw---- 1 root audio 116, 3 Mar 25 10:28 pcmC0D1p
crw-rw---- 1 root audio 116, 2 Mar 25 10:28 pcmC0D2c
crw-rw---- 1 root audio 116, 1 Mar 25 06:28 seq
crw-rw---- 1 root audio 116, 33 Mar 25 10:28 timer
/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 60 Mar 25 06:28 ./
drwxr-xr-x 3 root root 220 Mar 25 06:28 ../
lrwxrwxrwx 1 root root 12 Mar 25 10:28 pci-0000:00:1b.0 -> ../controlC0
When I try the above under ffmpeg I get different errors for different devices:
[oss @ 0x9e55fc0] SNDCTL_DSP_SETFMT: Inappropriate ioctl for device
/dev/snd/pcmC0D0c: Input/output error
for most devices or, for hwC0D2, I get
[oss @ 0x9d22fc0] /dev/snd/hwC0D2: Permission denied
/dev/snd/hwC0D2: Input/output error
Note that I have checked file permissions and they are OK. Both my user account and root can do an LS of /dev/snd/hwC0D2 but not even root can read that file. I am a member of the "audio" group. There is no /lib/udev/rules.d/40-alsa.rules file.
The second problem is that when I log in a message box pops up with an error message. If I click on it or wait a while it goes away. It says:
Multimedia System
The audio playback device HDA Intel (ALC662 rev1 Analog) does
not work. Falling back to HDA Intel (ALC662 rev1 Analog).
Aside from not being able to record sound the rest of my sound system seems to work, ie I get sound from videos on Firefox, music or videos played through mplayer, the occasional system beep, etc. Nothing fancy, but the sound system works for me.
I seem to recall that this error message only showed up when I went to Slackware 14.0 or 14.1, I forget which. Since my sound system continued to work and the error message "falls back" to the same device which failed, I have ignored it. This is also why I am posting this here in Slackware first.
I tried running alsaconf but it just says, "No supported PnP or PCI card found. Would you like to probe legacy ISA sound cards/chips?" I looked at the legacy list and proceded no further. No help there.
And of course the third problem here is that this is well outside my area of expertise or, to be more accurate, when it comes to sound (and video) I have no idea what I am doing.
All I want to do is record the same sound that goes to my speakers. That should not be this hard. Suggestions or solutions would be much appreciated.
Thanks In Advance. :-)
-------------------------------
root $?=0> arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
HDA Intel, ALC662 rev1 Analog
Default Audio Device
sysdefault:CARD=Intel
HDA Intel, ALC662 rev1 Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
root $?=0> arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 2: ALC662 rev1 Alt Analog [ALC662 rev1 Alt Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0