Cubian下如何支持USB摄像头自带的自带声卡。录音教程
本帖最后由 zixi0007 于 2014-9-16 10:05 编辑Cubian下如何支持USB摄像头自带的自带声卡。
root@Cubian:~# ls /dev/
ace_dev log_main ram0 tty23tty5 ump
autofs log_radio ram1 tty24tty50 urandom
avs_dev log_system random tty25tty51 usbdev1.1
binder loop0 rfkill tty26tty52 usbdev1.2
block loop1 root tty27tty53 usbdev2.1
btrfs-control loop2 rtc0 tty28tty54 usbdev3.1
bus loop3 shm tty29tty55 usbdev4.1
cachefiles loop4 snd tty3 tty56 v4l
cedar_dev loop5 stderr tty30tty57 vcs
char loop6 stdin tty31tty58 vcs1
console loop7 stdout tty32tty59 vcs2
cpu_dma_latencyloop-control sunxi-lcdtty33tty6 vcs3
cuse MAKEDEV tty tty34tty60 vcs4
disk mali tty0 tty35tty61 vcs5
disp mapper tty1 tty36tty62 vcs6
fb0 md0 tty10 tty37tty63 vcsa
fb1 media0 tty11 tty38tty7 vcsa1
fd mem tty12 tty39tty8 vcsa2
full nand tty13 tty4 tty9 vcsa3
fuse nanda tty14 tty40ttyS0 vcsa4
g2d nandb tty15 tty41ttyS1 vcsa5
i2c-0 net tty16 tty42ttyS2 vcsa6
i2c-1 network_latency tty17 tty43ttyS3 video0
i2c-2 network_throughputtty18 tty44ttyS4 xconsole
i2c-3 null tty19 tty45ttyS5 zero
input pa_dev tty2 tty46ttyS6
kmsg ppp tty20 tty47ttyS7
log ptmx tty21 tty48uhid
log_events pts tty22 tty49uinput
//查看声卡
root@Cubian:~# ls -l /dev/snd/
total 0
drwxr-xr-x 2 root root 60 Jan12010 by-id
drwxr-xr-x 2 root root 80 Jan12010 by-path
crw-rw---T 1 root audio 116,0 Jan12010 controlC0
crw-rw---T 1 root audio 116, 32 Jan12010 controlC1
crw-rw---T 1 root audio 116, 24 Jan12010 pcmC0D0c
crw-rw---T 1 root audio 116, 16 Jan12010 pcmC0D0p
crw-rw---T 1 root audio 116, 56 Jan12010 pcmC1D0c
crw-rw---T 1 root audio 116,1 Jan12010 seq
crw-rw---T 1 root audio 116, 33 Jan12010 timer
//显示录音设备
root@Cubian:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sunxicodec , device 0: M1 PCM
Subdevices: 1/1
Subdevice #0: subdevice #0
//查看声卡
root@Cubian:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sunxicodec , device 0: M1 PCM
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: USB20Camera , device 0: USB Audio
Subdevices: 1/1
Subdevice #0: subdevice #0
//录音命令 使用板载声卡
root@Cubian:~# arecord -d 10 -D plughw:0 0.wav
Recording WAVE '0.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
root@Cubian:~# ls
0.wavnand_mbr.backup
root@Cubian:~# pwd
/root
//录音命令 使用USB声卡
root@Cubian:~# arecord -d 10 -D plughw:1 0.wav
Recording WAVE '0.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
//调音
root@Cubian:~# alsamixer
问题是USB声卡录音都是造成也不能调节混音。lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq AlsaMixer v1.0.25 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Card: USB2.0_Camera F1:Help x
x Chip: USB Mixer F2:System information x
x View: F3: F4: CaptureF5: All F6:Select sound cardx
x Item: Esc: Exit x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x This sound device does not have any playback controls. x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
x x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq板载的声卡可以调节
目前就是声卡录音有噪声的问题不能解决
声音文件如下:
命令详解,什么静音模式之类的全用了,还是有噪声。
cubie@Cubian:/download$ arecord --help
Usage: arecord ... ...
-h, --help help
--version print current version
-l, --list-devices list all soundcards and digital audio devices
-L, --list-pcms list device names
-D, --device=NAME select PCM by name
-q, --quiet quiet mode
-t, --file-type TYPE file type (voc, wav, raw or au)
-c, --channels=# channels
-f, --format=FORMAT sample format (case insensitive)
-r, --rate=# sample rate
-d, --duration=# interrupt after # seconds
-M, --mmap mmap stream
-N, --nonblock nonblocking mode
-F, --period-time=# distance between interrupts is # microseconds
-B, --buffer-time=# buffer duration is # microseconds
--period-size=# distance between interrupts is # frames
--buffer-size=# buffer duration is # frames
-A, --avail-min=# min available space for wakeup is # microseconds
-R, --start-delay=# delay for automatic PCM start is # microseconds
(relative to buffer size if <= 0)
-T, --stop-delay=# delay for automatic PCM stop is # microseconds from xrun
-v, --verbose show PCM structure and setup (accumulative)
-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo)
-I, --separate-channels one file for each channel
-i, --interactive allow interactive operation from stdin
--disable-resampledisable automatic rate resample
--disable-channelsdisable automatic channel conversions
--disable-format disable automatic format conversions
--disable-softvol disable software volume control (softvol)
--test-position test ring buffer position
--test-coef=# test coefficient for ring buffer position (default 8)
expression for validation is: coef * (buffer_size / 2)
--test-nowait do not wait for ring buffer - eats whole CPU
--max-file-time=# start another output file when the old file has recorded
for this many seconds
--process-id-file write the process ID here
--use-strftime apply the strftime facility to the output file name
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE
U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE
FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM
MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE
U20_3BE S18_3LE S18_3BE U18_3LE
Some of these may not be available on selected hardware
The available format shortcuts are:
-f cd (16 bit little endian, 44100, stereo)
-f cdr (16 bit big endian, 44100, stereo)
-f dat (16 bit little endian, 48000, stereo) 先mark 一下, 扳子的录音功能还真没有用过。
页:
[1]