Can't record sound going to speakers. Slackware error? Where is /dev/dsp? What?
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.wavor arecord -f cd -d 10 -D default out.wavI 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. When I try the above under ffmpeg I get different errors for different devices: for most devices or, for hwC0D2, I get 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 SystemAside 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 |
Let me tell you what I learned when trying to do this...
1) It's hard (because like most opensource things, documentation absolutely sucks). 2) You need to enable/setup a loopback in your mixer. 3) It has nothing to do with /dev/dsp That's as far as I got before giving up and putting an audio device on my outputs. |
/dev/dsp is specific to OSS. Almost no one uses OSS for audio output anymore, this is all done by ALSA. Some even use another layer on top of that with Pulseaudio, Jack etc.
You can record the sound of your speakers in ALSA. But by default, any recording application is blocking the sound card, so you can either hear the sounds or record them. I made a blog post about that a while ago - basically, it's setting up a loopback device and record the audio of the loopback device while still getting it out to the speakers: http://schmatzler.de/en/2014/11/29/s...ulseaudiojack/ It's overly complicated to just record some things. I chose this approach since Pulseaudio doesn't run here (like the usual Poettering software), but it should work out-of-the-box with Pulseaudio. |
At almost the same time as schmatzler (well, one month later) I wrote a similar article: http://alien.slackbook.org/blog/a-jo...-in-slackware/ followed by an article how to setup Jack Audio: http://alien.slackbook.org/blog/sett...-in-slackware/
The first link will be helpful, the second link may be helpful. |
a while back i played around with netcat-ing sound from one machine to another. something like
Code:
##### pc1 ##### |
Your INTEL HDA soundcard is probably crippled and won't support recording what's played up. :(
hope it's not. Mine is on my laptop. But on a older Laptop (X60 instead of X61) it works |
OSS is done by emulation through ALSA.
In Slackware, OSS is disabled by default. To enable it, run: Code:
chmod +x /etc/rc.d/rc.aoss Code:
/etc/rc.d/rc.alsa restart |
You can also create a virtual Alsa device that is bound to your actual (as in regular) soundcard.
|
You need /dev/dsp, set /etc.rc.d/rc.aoss executable and run it.
EDIT: ReaperX already posted. |
I needed to use OSS in the past when ALSA couldn't reliably run my Envy24 onboard sound (Chaintech motherboard). But that was a decade ago, and unfortunately recent attempts to use it just seemed to cause more problems than they solved.
Not that I'm impressed with ALSA. Having to craft configuration files by hand strikes me as little better than having to calculate one's own modelines for X (I've done that in the past, but I can't imagine anyone suggesting that would be acceptable nowadays unless you're trying to run some seriously ancient hardware). |
Although it's not recommended, especially when many apps look specifically for ALSA in Linux, you can use the OSSv4 driver.
You may have to rebuild MANY packages to use this driver, and honestly, I don't recommend it. There is an ALSA toolkit specially for Envy24, last I knew, so you might want to look into it. |
Quote:
Thanks. |
Did you perform a complete install?
Alsa's OSS package has the required file. Can you run: Code:
ls /etc/rc.d/ |
Quote:
|
Correction, the file name is /etc/rc.d/rc.alsa-oss and it's part of alsa-utils.
Sorry, but I'm not on Linux ATM to get everything completely correct. Often, you should double check the directories yourself rather than just follow what is posted so you can make sure you know what is needed in case a file name isn't exactly correct. This way you also learn your system also and get familiar with it better. |
All times are GMT -5. The time now is 02:33 PM. |