如何在同一声卡的两个输出(模拟和数字)上同时获得声音(来自 pulseadio)?

如何在同一声卡的两个输出(模拟和数字)上同时获得声音(来自 pulseadio)?

如何配置 pulseaudio 在单个声卡的数字和模拟输出上同时播放声音?

我的系统是 OpenSuse 11.4(已安装所有更新)。命令“播放-l“返回:

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC887 Analog [ALC887 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC887 Digital [ALC887 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pacmd 列表卡,返回:

~> pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> list-cards
1 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_08.0>
        driver: <module-alsa-card.c>
        owner module: 4
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xf9f78000 irq 20"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:08.0"
                sysfs.path = "/devices/pci0000:00/0000:00:08.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "nVidia Corporation"
                device.product.id = "0ac0"
                device.product.name = "MCP79 High Definition Audio"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "WewnÄtrzny dĹşwiÄk"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:analog-stereo: Analogowe stereo Output (priority 6000)
                output:analog-stereo+input:analog-stereo: Analogowy dupleks stereo (priority 6060)
                output:iec958-stereo: Cyfrowy dupleks stereo (IEC958) (priority 5500)
                output:iec958-stereo+input:analog-stereo: Cyfrowe stereo (IEC958) Output + Analogowe stereo Input (priority 5560)
                output:hdmi-stereo: Cyfrowe stereo (HDMI) Output (priority 5400)
                output:hdmi-stereo+input:analog-stereo: Cyfrowe stereo (HDMI) Output + Analogowe stereo Input (priority 5460)
                input:analog-stereo: Analogowe stereo Input (priority 60)
                off: WyĹÄ
cz (priority 0)
        active profile: <output:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_08.0.analog-stereo/#0: WewnÄtrzny dĹşwiÄk Analogowe stereo
        sources:
                alsa_output.pci-0000_00_08.0.analog-stereo.monitor/#0: Monitor of WewnÄtrzny dĹşwiÄk Analogowe stereo
>>> 

之前(在 OpenSuSE 11.3 中)我根本没有使用过 pulseaudio,并且通过以下方式获得了预期的结果/etc/asound.conf文件:

pcm.!default {
    type plug
    slave {
       pcm multi
       rate 48000
    }
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    hint { 
                 show on
                 description "Default digital and analog output"
         }
}
pcm.dsp0 {
    type plug
    slave.pcm "multi"
}
pcm.dmixer {
    type dmix
    ipc_key 1234
    slave {
        pcm "hw:0,3"
        period_time 0
        period_size 1024
        buffer_size 8192
        #periods 128
        rate 48000
     }
     bindings {
        0 0
        1 1
     }
     hint { 
                 show on
                 description "PCM digital mixer"
          }
}
ctl.dmixer {

答案1

module-combine将允许您将音频散布到多个接收器。

相关内容