Recording from sound card

Robert Ames robertames at
Fri Feb 11 03:29:58 UTC 2011

I'm having problems trying to record from a sound card under
8.1-RELEASE.  The last time I tried this was many releases ago,
possibly 4.x-RELEASE.  Back then I would do something like "cat
/dev/dsp > file" but now when I try it I just end up with a 0 byte
file.  I'm using a different sound card than before so maybe that
has something to do with it.  Or possibly I just don't know which
device to use.  Playing sounds using "cat file.wav > /dev/dsp0.0"
works fine, but I can't get recording to work.  Does anyone have
any suggestions?  Thanks.

$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <Creative CT5880-C> (play/rec) default

$ sysctl -a | egrep '(snd|pcm|sound)'
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2009061500/i386
hw.snd.default_auto: 0
dev.pcm.0.%desc: Creative CT5880-C
dev.pcm.0.%driver: pcm
dev.pcm.0.%location: slot=9 function=0
dev.pcm.0.%pnpinfo: vendor=0x1274 device=0x5880 subvendor=0x1274 subdevice=0x2003 class=0x040100
dev.pcm.0.%parent: pci0
dev.pcm.0.eapd: 1 1 fixed 48000 s16le:2.0
dev.pcm.0.rec.vchans: 1
dev.pcm.0.rec.vchanmode: fixed
dev.pcm.0.rec.vchanrate: 48000
dev.pcm.0.rec.vchanformat: s16le:2.0
dev.pcm.0.buffersize: 4096
dev.pcm.0.bitperfect: 0
dev.pcm.0.spdif_enabled: 0
dev.pcm.0.latency_timer: 32
dev.pcm.0.polling: 0

$ mixer
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer mic      is currently set to  73:73
Mixer cd       is currently set to  75:75
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to  50:50
Mixer line1    is currently set to  75:75
Mixer phin     is currently set to   0:0
Mixer phout    is currently set to   0:0
Mixer video    is currently set to  75:75
Recording source: mic


More information about the freebsd-questions mailing list