CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 6799|回复: 2

Cubian下如何支持USB摄像头自带的自带声卡。录音教程

[复制链接]
发表于 2014-9-16 08:49:51 | 显示全部楼层 |阅读模式
本帖最后由 zixi0007 于 2014-9-16 10:05 编辑

Cubian下如何支持USB摄像头自带的自带声卡。

root@Cubian:~# ls /dev/
ace_dev          log_main            ram0       tty23  tty5    ump
autofs           log_radio           ram1       tty24  tty50   urandom
avs_dev          log_system          random     tty25  tty51   usbdev1.1
binder           loop0               rfkill     tty26  tty52   usbdev1.2
block            loop1               root       tty27  tty53   usbdev2.1
btrfs-control    loop2               rtc0       tty28  tty54   usbdev3.1
bus              loop3               shm        tty29  tty55   usbdev4.1
cachefiles       loop4               snd        tty3   tty56   v4l
cedar_dev        loop5               stderr     tty30  tty57   vcs
char             loop6               stdin      tty31  tty58   vcs1
console          loop7               stdout     tty32  tty59   vcs2
cpu_dma_latency  loop-control        sunxi-lcd  tty33  tty6    vcs3
cuse             MAKEDEV             tty        tty34  tty60   vcs4
disk             mali                tty0       tty35  tty61   vcs5
disp             mapper              tty1       tty36  tty62   vcs6
fb0              md0                 tty10      tty37  tty63   vcsa
fb1              media0              tty11      tty38  tty7    vcsa1
fd               mem                 tty12      tty39  tty8    vcsa2
full             nand                tty13      tty4   tty9    vcsa3
fuse             nanda               tty14      tty40  ttyS0   vcsa4
g2d              nandb               tty15      tty41  ttyS1   vcsa5
i2c-0            net                 tty16      tty42  ttyS2   vcsa6
i2c-1            network_latency     tty17      tty43  ttyS3   video0
i2c-2            network_throughput  tty18      tty44  ttyS4   xconsole
i2c-3            null                tty19      tty45  ttyS5   zero
input            pa_dev              tty2       tty46  ttyS6
kmsg             ppp                 tty20      tty47  ttyS7
log              ptmx                tty21      tty48  uhid
log_events       pts                 tty22      tty49  uinput



//查看声卡
root@Cubian:~# ls -l /dev/snd/
total 0
drwxr-xr-x 2 root root       60 Jan  1  2010 by-id
drwxr-xr-x 2 root root       80 Jan  1  2010 by-path
crw-rw---T 1 root audio 116,  0 Jan  1  2010 controlC0
crw-rw---T 1 root audio 116, 32 Jan  1  2010 controlC1
crw-rw---T 1 root audio 116, 24 Jan  1  2010 pcmC0D0c
crw-rw---T 1 root audio 116, 16 Jan  1  2010 pcmC0D0p
crw-rw---T 1 root audio 116, 56 Jan  1  2010 pcmC1D0c
crw-rw---T 1 root audio 116,  1 Jan  1  2010 seq
crw-rw---T 1 root audio 116, 33 Jan  1  2010 timer



//显示录音设备
root@Cubian:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sunxicodec [sunxi-CODEC], device 0: M1 PCM [sunxi PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

//查看声卡
root@Cubian:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sunxicodec [sunxi-CODEC], device 0: M1 PCM [sunxi PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB20Camera [USB2.0_Camera], device 0: USB Audio [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.wav  nand_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声卡录音都是造成也不能调节混音。
  1. lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq AlsaMixer v1.0.25 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  2. x Card: USB2.0_Camera                                              F1:  Help               x
  3. x Chip: USB Mixer                                                  F2:  System information x
  4. x View: F3:[Playback] F4: Capture  F5: All                         F6:  Select sound card  x
  5. x Item:                                                            Esc: Exit               x
  6. x                                                                                          x
  7. x                                                                                          x
  8. x                                                                                          x
  9. x                                                                                          x
  10. x                                                                                          x
  11. x                                                                                          x
  12. x                                                                                          x
  13. x                                                                                          x
  14. x                                                                                          x
  15. x                                                                                          x
  16. x                                                                                          x
  17. x                  This sound device does not have any playback controls.                  x
  18. x                                                                                          x
  19. x                                                                                          x
  20. x                                                                                          x
  21. x                                                                                          x
  22. x                                                                                          x
  23. x                                                                                          x
  24. x                                                                                          x
  25. x                                                                                          x
  26. x                                                                                          x
  27. x                                                                                          x
  28. x                                                                                          x
  29. x                                                                                          x
  30. x                                                                                          x
  31. x                                                                                          x
  32. x                                                                                          x
  33. x                                                                                          x
  34. x                                                                                          x
  35. x                                                                                          x
  36. x                                                                                          x
  37. x                                                                                          x
  38. x                                                                                          x
  39. x                                                                                          x
  40. x                                                                                          x
  41. mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
复制代码
板载的声卡可以调节

评分

参与人数 1威望 +10 金钱 +10 贡献 +10 收起 理由
cubieplayer + 10 + 10 + 10 很给力!

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2014-9-16 10:48:49 | 显示全部楼层
目前就是声卡录音有噪声的问题不能解决
声音文件如下:

命令详解,什么静音模式之类的全用了,还是有噪声。
cubie@Cubian:/download$ arecord --help
Usage: arecord [OPTION]... [FILE]...

-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-resample  disable automatic rate resample
    --disable-channels  disable 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)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

发表于 2014-9-17 11:16:58 | 显示全部楼层
先mark 一下, 扳子的录音功能还真没有用过。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-26 12:57 , Processed in 0.026089 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部