在 Gentoo 上使用 ALSA 从 USB 平板电脑麦克风录制声音

在 Gentoo 上使用 ALSA 从 USB 平板电脑麦克风录制声音

我无法使用通过 USB 连接到 Gentoo Linux 的平板电脑麦克风录制声音。

我检查了我的设置,发现已检测到 USB 麦克风。

arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 0/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 1: Device [PrimeSense Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Phone [MT65xx Android Phone], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

所以我假设

arecord -D hw:2,0 -d 5 test.wav

会给我录音,但它会产生:

arecord: main:722: audio open error: Device or resource busy

知道如何找出导致此问题的原因吗?或者我根本就走错了路?我需要在 asound.conf 中添加专门的条目吗?

它目前看起来像这样:

cat /etc/asound.conf
#input device
pcm.AD1989A_inputs {
type multi

slaves.a.pcm "hw:PCH,0,0"
slaves.a.channels 2
slaves.b.pcm "hw:PCH,0,1"
slaves.b.channels 2

bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}

也许 pcm 列表也与解决方案相关。所以我在这里添加它:

arecord --list-pcms
  sysdefault:CARD=PCH
      HDA Intel PCH, AD198x Analog
      Default Audio Device
  front:CARD=PCH,DEV=0
      HDA Intel PCH, AD198x Analog
      Front speakers
  surround40:CARD=PCH,DEV=0
      HDA Intel PCH, AD198x Analog
      4.0 Surround output to Front and Rear speakers
  surround41:CARD=PCH,DEV=0
      HDA Intel PCH, AD198x Analog
      4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=PCH,DEV=0
      HDA Intel PCH, AD198x Analog
      5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=PCH,DEV=0
      HDA Intel PCH, AD198x Analog
      5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=PCH,DEV=0
      HDA Intel PCH, AD198x Analog
      7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  sysdefault:CARD=Device
      PrimeSense Device, USB Audio
      Default Audio Device
  front:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      Front speakers
  surround40:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      4.0 Surround output to Front and Rear speakers
  surround41:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  iec958:CARD=Device,DEV=0
      PrimeSense Device, USB Audio
      IEC958 (S/PDIF) Digital Audio Output
  sysdefault:CARD=Phone
      MT65xx Android Phone, USB Audio
      Default Audio Device
  front:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      Front speakers
  surround40:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      4.0 Surround output to Front and Rear speakers
  surround41:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  iec958:CARD=Phone,DEV=0
      MT65xx Android Phone, USB Audio
      IEC958 (S/PDIF) Digital Audio Output

相关内容