许多同名的音频设备:如何在 asound.conf 中使用它们?

许多同名的音频设备:如何在 asound.conf 中使用它们?

我想在 ALSA 中创建一个新的 PCM 设备,感谢这些ALSA PCM 插件/etc/asound.conf

pcm.blah {
  type rate
  slave {
    pcm <device1>
    rate 48000
  }
}

但是用什么名字呢<device1>

这样做aplay -L显示许多设备具有相同的名称(见下文)。

如何选择恰恰中的一台设备asound.conf,而许多设备似乎具有相同的名称?default(例如,下面的列表中至少有 3 个设备)

root@samplerbox:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
blah
default:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
default:CARD=DAC
    USB Audio DAC, USB Audio
    Default Audio Device
sysdefault:CARD=DAC
    USB Audio DAC, USB Audio
    Default Audio Device
front:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    Front speakers
surround21:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    Direct sample mixing device
dsnoop:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    Direct sample snooping device
hw:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    Direct hardware device without any conversions
plughw:CARD=DAC,DEV=0
    USB Audio DAC, USB Audio
    Hardware device with all software conversions
default:CARD=LPD8
    Default Audio Device
sysdefault:CARD=LPD8
    Default Audio Device

答案1

您没有三个名为 的设备default
三个设备名称是default:CARD=ALSAdefault:CARD=DACdefault:CARD=LPD8

但如果您不需要另一个重采样插件,您可能应该使用hwdmix设备之一。

相关内容