You are not logged in.

#1 2009-12-17 16:48:07

MadCat_X
Member
Registered: 2009-10-08
Posts: 189

Capture /dev/dsp?

This is more of a curiosity than a problem, but anyway. I have a Qosmio X300 notebook based on ICH9 chipset with Intel HDA odboard audio. It is a pretty crappy chip and I'd like to capture it's output. (the "what U hear" thingy). I've googled a bit and found few ways how to do that just by picking the correct recording source in alsamixer, but my soundcard doesn't seem to support recording of anything else than microphone input.

Then I had the idea of dumping "cat /dev/dsp" to a file and extract the raw data out of it. Problem is that whenever I do that I always get a file that looks like "80 00 80 00 80 00 ..." if I open it in hexa editor. I can send a data stream to /dev/dsp, i.e. something like "cat /dev/urandom > /dev/dsp" makes my card producing noise. Am I missing something, or is the unability of capturing /dev/dsp just another manifestation of the fact that my soundcard cannot caputre it's output?

I run Arch64 and custom 2.6.32 kernel, I use ALSA for sound and I have no sound server like PulseAudio...

Offline

#2 2009-12-19 00:21:58

ypnos
Member
Registered: 2007-12-30
Posts: 59

Re: Capture /dev/dsp?

Your way of reading from /dev/dsp does not work.

Most probably, your card does not support full duplex, i.e. recording it's own playback. I have the same problem with ICH8.

The only solution to this problem is to use software routing & mixing. Jackd is one option. I used it to do internet radio. You can basically feed your playback into virtual jackd playback device, then internally route it both to the soundcard and virtual recording device.

Last edited by ypnos (2009-12-19 00:22:42)

Offline

#3 2009-12-19 07:13:39

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Capture /dev/dsp?

Isn't it possible in alsa to create a virtual output to file? If so, just set that as default in your .asoundrc.

Personally, I'd just use Jack or Pulse and be done with it. Just because its possible with lower-level software doesn't mean you have to do it that way if there's easier ways available.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2009-12-19 11:47:42

ypnos
Member
Registered: 2007-12-30
Posts: 59

Re: Capture /dev/dsp?

I don't know if alsa supports the routing to two outputs at once (real + virtual). Could be an interesting option.

Offline

Board footer

Powered by FluxBB