声音仅在 USB 上有效

声音仅在 USB 上有效

请帮助我并尝试一下这个帖子,我已经没有解决方案了。

我是 Ubuntu/Linux 的新手,我安装 Ubuntu 的原因是:学习它并将它用作我的主要操作系统,我不想放弃并返回到 Windows。

但是我没有声音,已经浪费了 2 个晚上的时间,并且重新安装了 2 次操作系统,但都没有成功。尝试了在 Google 上找到的所有解决方案... 我终于找到了这里,这是我最后的希望。

我有一台集成音频扬声器的华硕显示器 PB287Q,通过 DisplayPort 连接到 Sapphire Radeon R9 390 NITRO 和主板华硕 Z170。

详细信息: - 3.5 插孔无声音输出(耳机或显示器的独立电缆) - 将用户添加到音频组 - 安装了 pavucontrol 和 alsamixer - 编辑了 /etc/modprobe.d/alsa-base.conf(第一次尝试添加“options snd-hda-intel index=-2”并将现有行更改为“options snd-usb-audio index=0”,但此设置根本不产生声音,即使在 USB 上也是如此。似乎它仅适用于 USB 耳机上的“options snd-usb-audio index=-2”。至少又添加了一行“options snd-hda-intel model=generic”。 - 尝试了“sudo alsa force-reload”,但没有成功。

连接 USB 耳机时的声音设置

仅限连接显示器或插孔 3.5 耳机时使用 MY 声音设置

命令输出:

pacmd 列表接收器

2 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9050
    volume: 0: 100% 1: 100%
            0: 0,00 dB 1: 0,00 dB
            balance 0,00
    base volume: 100%
                 0,00 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 0,50 .. 371,52 ms
    card: 0 <alsa_card.pci-0000_01_00.1>
    module: 5
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 0"
        alsa.id = "HDMI 0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "3"
        alsa.card = "2"
        alsa.card_name = "HDA ATI HDMI"
        alsa.long_card_name = "HDA ATI HDMI at 0xf7e60000 irq 133"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
        device.product.id = "aac8"
        device.string = "hdmi:2"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo"
        device.profile.description = "Digital Stereo (HDMI)"
        device.description = "HDA ATI HDMI Digital Stereo (HDMI)"
        alsa.mixer_name = "ATI R6xx HDMI"
        alsa.components = "HDA:1002aa01,00aa0100,00100500"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
    active port: <hdmi-output-0>
    index: 4
    name: <alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device.iec958-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9048
    volume: 0: 100% 1: 100%
            0: 0,00 dB 1: 0,00 dB
            balance 0,00
    base volume: 100%
                 0,00 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 7
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
    card: 4 <alsa_card.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device>
    module: 27
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "USB Audio"
        alsa.id = "USB Audio"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "1"
        alsa.card_name = "USB PnP Sound Device"
        alsa.long_card_name = "C-Media Electronics Inc. USB PnP Sound Device at usb-0000:00:14.0-1, full speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:1:1.0"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card1"
        udev.id = "usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device"
        device.bus = "usb"
        device.vendor.id = "0d8c"
        device.vendor.name = "C-Media Electronics, Inc."
        device.product.id = "013c"
        device.product.name = "CM108 Audio Controller"
        device.serial = "C-Media_Electronics_Inc._USB_PnP_Sound_Device"
        device.string = "iec958:1"
        device.buffering.buffer_size = "352800"
        device.buffering.fragment_size = "176400"
        device.access_mode = "mmap+timer"
        device.profile.name = "iec958-stereo"
        device.profile.description = "Digital Stereo (IEC958)"
        device.description = "CM108 Audio Controller Digital Stereo (IEC958)"
        alsa.mixer_name = "USB Mixer"
        alsa.components = "USB0d8c:013c"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-usb"
    ports:
        iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
            properties:

    active port: <iec958-stereo-output>

pacmd 列表源

3 source(s) available.
    index: 0
    name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor>
    driver: <module-alsa-card.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 1050
    volume: 0: 100% 1: 100%
            0: 0,00 dB 1: 0,00 dB
            balance 0,00
    base volume: 100%
                 0,00 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max rewind: 0 KiB
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 0,50 .. 371,52 ms
    monitor_of: 0
    card: 0 <alsa_card.pci-0000_01_00.1>
    module: 5
    properties:
        device.description = "Monitor of HDA ATI HDMI Digital Stereo (HDMI)"
        device.class = "monitor"
        alsa.card = "2"
        alsa.card_name = "HDA ATI HDMI"
        alsa.long_card_name = "HDA ATI HDMI at 0xf7e60000 irq 133"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
        device.product.id = "aac8"
        device.string = "2"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    index: 7
    name: <alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device.iec958-stereo.monitor>
    driver: <module-alsa-card.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 1040
    volume: 0: 100% 1: 100%
            0: 0,00 dB 1: 0,00 dB
            balance 0,00
    base volume: 100%
                 0,00 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max rewind: 0 KiB
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
    monitor_of: 4
    card: 4 <alsa_card.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device>
    module: 27
    properties:
        device.description = "Monitor of CM108 Audio Controller Digital Stereo (IEC958)"
        device.class = "monitor"
        alsa.card = "1"
        alsa.card_name = "USB PnP Sound Device"
        alsa.long_card_name = "C-Media Electronics Inc. USB PnP Sound Device at usb-0000:00:14.0-1, full speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:1:1.0"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card1"
        udev.id = "usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device"
        device.bus = "usb"
        device.vendor.id = "0d8c"
        device.vendor.name = "C-Media Electronics, Inc."
        device.product.id = "013c"
        device.product.name = "CM108 Audio Controller"
        device.serial = "C-Media_Electronics_Inc._USB_PnP_Sound_Device"
        device.string = "1"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-usb"
  * index: 8
    name: <alsa_input.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device.analog-mono>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9049
    volume: 0:  40%
            0: -23,81 dB
            balance 0,00
    base volume:  40%
                 -23,81 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max rewind: 0 KiB
    sample spec: s16le 1ch 44100Hz
    channel map: mono
                 Mono
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
    card: 4 <alsa_card.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device>
    module: 27
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "USB Audio"
        alsa.id = "USB Audio"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "1"
        alsa.card_name = "USB PnP Sound Device"
        alsa.long_card_name = "C-Media Electronics Inc. USB PnP Sound Device at usb-0000:00:14.0-1, full speed"
        alsa.driver_name = "snd_usb_audio"
        device.bus_path = "pci-0000:00:14.0-usb-0:1:1.0"
        sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/sound/card1"
        udev.id = "usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device"
        device.bus = "usb"
        device.vendor.id = "0d8c"
        device.vendor.name = "C-Media Electronics, Inc."
        device.product.id = "013c"
        device.product.name = "CM108 Audio Controller"
        device.serial = "C-Media_Electronics_Inc._USB_PnP_Sound_Device"
        device.string = "hw:1"
        device.buffering.buffer_size = "176400"
        device.buffering.fragment_size = "88200"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-mono"
        device.profile.description = "Analog Mono"
        device.description = "CM108 Audio Controller Analog Mono"
        alsa.mixer_name = "USB Mixer"
        alsa.components = "USB0d8c:013c"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-usb"
    ports:
        analog-input-microphone: Microphone (priority 8700, latency offset 0 usec, available: unknown)
            properties:
                device.icon_name = "audio-input-microphone"
    active port: <analog-input-microphone>

sudo aplay-l

[sudo] password for byte: 
**** List of PLAYBACK Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

查找 /lib/modules/3.19.0-58-generic | grep snd 此命令返回了很多行,我将发布一些:

/lib/modules/3.19.0-58-generic/kernel/sound/firewire/snd-scs1x.ko
/lib/modules/3.19.0-58-generic/kernel/sound/firewire/dice/snd-dice.ko
/lib/modules/3.19.0-58-generic/kernel/sound/firewire/oxfw/snd-oxfw.ko
/lib/modules/3.19.0-58-generic/kernel/sound/firewire/snd-firewire-lib.ko
/lib/modules/3.19.0-58-generic/kernel/sound/firewire/snd-isight.ko
/lib/modules/3.19.0-58-generic/kernel/sound/firewire/bebob/snd-bebob.ko
/lib/modules/3.19.0-58-generic/kernel/sound/firewire/fireworks/snd-fireworks.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/hiface/snd-usb-hiface.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/bcd2000/snd-bcd2000.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/6fire/snd-usb-6fire.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/snd-usbmidi-lib.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/usx2y/snd-usb-us122l.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/usx2y/snd-usb-usx2y.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/caiaq/snd-usb-caiaq.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/misc/snd-ua101.ko
/lib/modules/3.19.0-58-generic/kernel/sound/usb/snd-usb-audio.ko
/lib/modules/3.19.0-58-generic/kernel/sound/core/snd-pcm.ko
/lib/modules/3.19.0-58-generic/kernel/sound/core/snd-pcm-dmaengine.ko
....................................................................

请参阅lspci-v | grep -A7 -i“音频”

00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
    Subsystem: ASUSTeK Computer Inc. Device 86ae
    Flags: bus master, fast devsel, latency 32, IRQ 16
    Memory at f7f40000 (64-bit, non-prefetchable) [size=16K]
    Memory at f7f20000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel

--
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii HDMI Audio
    Subsystem: PC Partner Limited / Sapphire Technology Device aac8
    Flags: bus master, fast devsel, latency 0, IRQ 133
    Memory at f7e60000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel

提前致谢!

答案1

这个问题让我很恼火,但我至少找到了问题所在:内核升级。似乎 hdmi 可以工作,但显示端口不行(即使是相同的显卡和显示器)。我将内核从 3.19.0.58 升级到 4.4.0-15,现在一切都很好。显示端口可以工作,插孔 3.5 可以工作,hdmi 可以工作 :D。

相关内容