PULSEAUDIO 未将我的 ALSA 捕获设备列为捕获源

PULSEAUDIO 未将我的 ALSA 捕获设备列为捕获源

首先,大家好!

我的名字是 Przemek Gajos,这是我在这里发表的第一篇文章。

我最近为我的音频采集卡编写了 ALSA 驱动程序,但 PULSEAUDIO 将其识别为采集源时遇到问题。

以下是一些事实,希望你们中的一个人过去经历过这种情况并且能够提供帮助:

(1) 采集卡有 2 个音频输入(立体声):1 个 HDMI 和 1 个模拟。直接使用 ALSA 时我可以捕获两者的声音。

(2)当我使用PULSEAUDIO命令列出音频捕获源时:

  $ pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2 

输出显示以下内容,这些是板载设备,不使用我的 ALSA 驱动程序:

  alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
  alsa_input.pci-0000_00_1b.0.analog-stereo

因此,从上面可以看出,我的设备没有被列为捕获源。

(3)当我使用:

  $ pactl list

输出显示“我的”ALSA 卡。请参阅下面的 2 个示例输出:(a) 对于板载卡(不使用我的驱动程序)和 (b) 对于使用我的驱动程序的卡:

(a) 机上卡:

Card #0
    Name: alsa_card.pci-0000_00_1b.0
    Driver: module-alsa-card.c
    Owner Module: 4
    Properties:
        alsa.card = "10"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xfbf20000 irq 67"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card10"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "10"
        device.description = "Built-in Audio"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Profiles:
        output:analog-stereo: Analogue Stereo Output (sinks: 1, sources: 0, priority. 6000)
        output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (sinks: 1, sources: 1, priority. 6060)
        output:analog-surround-40: Analogue Surround 4.0 Output (sinks: 1, sources: 0, priority. 700)
        output:analog-surround-40+input:analog-stereo: Analogue Surround 4.0 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
        output:analog-surround-41: Analogue Surround 4.1 Output (sinks: 1, sources: 0, priority. 800)
        output:analog-surround-41+input:analog-stereo: Analogue Surround 4.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 860)
        output:analog-surround-50: Analogue Surround 5.0 Output (sinks: 1, sources: 0, priority. 700)
        output:analog-surround-50+input:analog-stereo: Analogue Surround 5.0 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
        output:analog-surround-51: Analogue Surround 5.1 Output (sinks: 1, sources: 0, priority. 800)
        output:analog-surround-51+input:analog-stereo: Analogue Surround 5.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 860)
        input:analog-stereo: Analogue Stereo Input (sinks: 0, sources: 1, priority. 60)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: output:analog-stereo+input:analog-stereo
    Ports:
        analog-output: Analogue Output (priority 9900)
            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo, output:analog-surround-41, output:analog-surround-41+input:analog-stereo, output:analog-surround-50, output:analog-surround-50+input:analog-stereo, output:analog-surround-51, output:analog-surround-51+input:analog-stereo
        analog-input-microphone: Microphone (priority 8700)
            Part of profile(s): output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, input:analog-stereo
        analog-input-linein: Line In (priority 8100)
            Part of profile(s): output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, input:analog-stereo

(b) 我的一张卡(我有超过 1 张卡):

Card #11
    Name: alsa_card.1
    Driver: module-alsa-card.c
    Owner Module: 31
    Properties:
        alsa.card = "1"
        alsa.card_name = "OEM_VISIONRGB_AV"
        alsa.long_card_name = "OEM_VISIONRGB_AV Analog DGC dada"
        device.bus_path = "/devices/virtual/sound/card1"
        sysfs.path = "/devices/virtual/sound/card1"
        device.string = "1"
        device.description = "OEM_VISIONRGB_AV"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Profiles:
        input:analog-stereo: Analogue Stereo Input (sinks: 0, sources: 1, priority. 60)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: input:analog-stereo
    Ports:
        analog-input: Analogue Input (priority 10000)
            Part of profile(s): input:analog-stereo

请注意,我的卡和机上卡的“名称”字段的形式有很大不同。我测试过:

  • 从 alsa_card.pci-0000_00_1b.0(板载卡)捕获可以正常工作。

  • 它无法从 alsa_card.1(我的卡)捕获。

请注意,我的 ALSA 驱动程序仍然缺少一些元素,例如,未包含混音器元素,我认为这可能是 ALSA 和 PULSEAUDIO 之间缺乏合作的原因。根据您的经验,您是否知道 PULSEAUDIO 是否需要混合器元素才能将 ALSA 设备限定为捕获源。

对于这条冗长的消息,我深表歉意。尽管如此,以上内容是否引起了人们的注意?

非常感谢您的帮助和建议,

普热梅克


相关内容