【问题标题】:No sound in Linux-based virtual machines under Qemu (Linux Mint 16 host)Qemu(Linux Mint 16主机)下基于Linux的虚拟机没有声音
【发布时间】:2015-08-28 19:53:18
【问题描述】:

注意:我要求关闭此问题,因为它原来是 Linux/Qemu 特定问题。

我正在 Linux Mint 16 笔记本电脑上的 Qemu 虚拟机中尝试 Android x86 4.4-r2。安装成功。到目前为止,我最大的问题是声音。我尝试过 Qemu 的 SB16、ES1370、AC97 虚拟声卡型号,但我的虚拟机没有声音。这是我在 Android 4.4-r2 中的内容:

# alsa_actl init
Found hardware: "SB16" "CTL1745" "CTL1745" "" ""
Hardware is initialized using a generic method  #exit code is 22

我也尝试过 EEEPC 版本 (4.0),带有 ES1370,as suggested。同样的事情:没有声音。

虽然使用 SB16 驱动程序,alsa_aplay /system/media/audio/ringtones/Sceptrum.ogg 似乎在播放一些东西,但我什么也没听到。

我有一个可以听到系统声音的 Windows 虚拟机。所以它绝对排除了我对 Qemu 的问题(**)

我还查找了来自 question #11037254 的建议,但都没有奏效。

谁能解释一下?


(**)嗯,其实也不能完全排除!我刚刚注意到,到目前为止,我的 GNU/Linux 虚拟机都没有输出声音。只有我的 Windows 虚拟机可以,我不知道为什么会这样。


EDIT:检测到硬件,来自 Linux 虚拟机。

~# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 RAM memory: Red Hat, Inc Virtio memory balloon
00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:05.0 Ethernet controller: Red Hat, Inc Virtio network device
00:06.0 Multimedia audio controller: Ensoniq ES1370 [AudioPCI]
00:07.0 Ethernet controller: Red Hat, Inc Virtio network device

编辑:这里是混音器和加载模块的额外信息。

加载(声音)模块:

~# lsmod | grep snd
snd_sb16 8701 0 - Live 0x00000000
snd_sb16_csp 7275 1 snd_sb16, Live 0x00000000
snd_sb16_dsp 6623 1 snd_sb16, Live 0x00000000
snd_pcm 67937 2 snd_sb16,snd_sb16_dsp, Live 0x00000000
snd_mpu401_uart 4517 1 snd_sb16, Live 0x00000000
snd_rawmidi 16434 1 snd_mpu401_uart, Live 0x00000000
snd_opl3_lib 7187 1 snd_sb16, Live 0x00000000
snd_seq_device 4877 2 snd_rawmidi,snd_opl3_lib, Live 0x00000000
snd_hwdep 4409 2 snd_sb16_csp,snd_opl3_lib, Live 0x00000000
snd_timer 14529 2 snd_pcm,snd_opl3_lib, Live 0x00000000
snd_sb_common 10548 3 snd_sb16,snd_sb16_csp,snd_sb16_dsp, Live 0x00000000
snd 47842 11 snd_sb16,snd_sb16_csp,snd_sb16_dsp,snd_pcm,snd_mpu401_uart,snd_rawmidi,snd_opl3_lib,snd_seq_device,snd_hwdep,snd_timer,snd_sb_common, Live 0x00000000
soundcore 4971 1 snd, Live 0x00000000

混音器设置:

~# alsa_amixer
Simple mixer control 'Master',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%]
  Front Right: Playback 31 [100%]
Simple mixer control 'Bass',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 15
  Front Left: 2 [13%]
  Front Right: 2 [13%]
Simple mixer control 'Treble',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 15
  Front Left: 2 [13%]
  Front Right: 2 [13%]
Simple mixer control 'PCM',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%]
  Front Right: Playback 31 [100%]
Simple mixer control 'Synth',0
  Capabilities: pvolume cswitch penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 0 [0%] Capture [off]
  Front Right: Playback 0 [0%] Capture [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch cswitch penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 4 [13%] [off] Capture [off]
  Front Right: Playback 4 [13%] [off] Capture [off]
Simple mixer control 'CD',0
  Capabilities: pvolume pswitch cswitch penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 4 [13%] [off] Capture [off]
  Front Right: Playback 4 [13%] [off] Capture [off]
Simple mixer control 'Mic',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch penum
  Playback channels: Mono
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono: Playback 4 [13%] [off]
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Mic Auto Gain',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Beep',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%]
Simple mixer control 'Playback',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%]
  Front Right: 3 [100%]
Simple mixer control 'Capture',0
  Capabilities: cvolume penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 3
  Front Left: Capture 3 [100%]
  Front Right: Capture 3 [100%]
Simple mixer control '3D Enhancement',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]

【问题讨论】:

  • 我投票决定将此问题作为离题结束,因为事实证明我的问题与 android 无关,而是更广泛。它看起来像一个仅限 GNU/Linux 的问题。发布到 unix.stackexchange.com 。

标签: linux audio virtual-machine


【解决方案1】:

在 Archlinux 中经常出现同样的问题。 有几种声音引擎:gstreamervlc 等。 最常见的是gstreamer,但如果我想要声音,我必须更改为vlc

【讨论】:

  • 我明白了。然而,我面临的问题是在较低的层次上:ALSA。我使用alsa_aplay 进行测试,而 IIIRC 它未绑定到 gstreamer
  • 您检查过 alsa -mixer 通道没有静音吗?
  • 我用混音器级别和加载的模块更新了我的问题,以防万一。你有什么奇怪的地方吗?
  • 声卡es1370似乎是唯一可以在android和虚拟机上工作的。一些网页说“模拟声卡需要是es1370”。如果可以,请尝试向我显示 lsusb 的输出,以查看系统检测到的声卡
  • 嗯,发之前我也试过那个声卡,没声音。事实上,确实检测到了所有支持的虚拟声音硬件并加载了相应的模块。只是没有声音输出,即使所有控件都未静音。
猜你喜欢
  • 1970-01-01
  • 2012-11-25
  • 2015-12-26
  • 1970-01-01
  • 1970-01-01
  • 2014-10-06
  • 1970-01-01
  • 2012-08-04
  • 2021-11-14
相关资源
最近更新 更多