Ubuntu 12.04 中没有声音并且 /dev/dsp 不存在

Ubuntu 12.04 中没有声音并且 /dev/dsp 不存在

计算机没有播放音频。我检查了硬件音量按钮、pavucontrolalsamixer。没有任何东西被静音。我添加了 ppa sudo add-apt-repository ppa:ubuntu-audio-dev。我还做了killall pulseaudio

然而当我尝试时mplayer我得到:

[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory

(确实没有显示ls)并且没有声音。Youtube viachromium也没有声音;Vimeo 也是如此; 也是如此vlc

$ lspci -v

00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
    Subsystem: Lenovo ThinkPad T60/R60 series
    Flags: bus master, fast devsel, latency 0, IRQ 48
    Memory at ee400000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd-hda-intel



$ lsmod | grep snd

snd_hda_codec_analog    97987  1 
snd_hda_intel          33773  2 
snd_hda_codec         127706  2 snd_hda_codec_analog,snd_hda_intel
snd_hwdep              13668  1 snd_hda_codec
snd_pcm                97188  2 snd_hda_intel,snd_hda_codec
snd_seq_midi           13324  0 
snd_rawmidi            30748  1 snd_seq_midi
snd_seq_midi_event     14899  1 snd_seq_midi
snd_seq                61896  2 snd_seq_midi,snd_seq_midi_event
snd_timer              29990  2 snd_pcm,snd_seq
snd_seq_device         14540  3 snd_seq_midi,snd_rawmidi,snd_seq
snd                    78855  14 snd_hda_codec_analog,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,thinkpad_acpi,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore              15091  1 snd
snd_page_alloc         18529  2 snd_hda_intel,snd_pcm



$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



$ cat /proc/asound/cards

 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xee400000 irq 48
29 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control
                      ThinkPad Console Audio Control at EC reg 0x30, fw 79HT50WW-1.07



$ pacmd

Welcome to PulseAudio! Use "help" for usage information.
>>> list-sinks
1 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9959
    volume: 0:  63% 1:  63%
            0: -12.00 dB 1: -12.00 dB
            balance 0.00
    base volume:  56%
                 -15.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 48000Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 1
    configured latency: 0.00 ms; range is 0.50 .. 341.33 ms
    card: 0 <alsa_card.pci-0000_00_1b.0>
    module: 4
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "AD198x Analog"
        alsa.id = "AD198x Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel"
        alsa.long_card_name = "HDA Intel at 0xee400000 irq 48"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.name = "N10/ICH 7 Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "Built-in Audio Analog Stereo"
        alsa.mixer_name = "Analog Devices AD1981"
        alsa.components = "HDA:11d41981,17aa2025,00100200"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output: Analog Output (priority 9900, available: unknown)
            properties:

    active port: <analog-output>

我应该怎么办?

答案1

https://wiki.ubuntu.com/PulseAudio从 gnome-terminal 尝试

$padsp mplayer /path/to/your/file

如果不起作用,请从 svn 快照构建自己的 mplayer

  1. 删除你的 mplayer
  2. 安装 C 工具链
  3. 安装 yasm $sudo apt-get install yasm
  4. 安装 dev pulse $sudo apt-get install libpulse-dev
  5. 安装 git $sudo apt-get install git
  6. 从以下位置下载 mplayer 快照http://www.mplayerhq.hu/MPlayer/releases/mplayer-checkout-snapshot.tar.bz2
  7. 解压快照
  8. 从 mplayer 源文件夹执行 $./configure --enable-pulse
  9. 然后 $make
  10. 最后做 $sudo make install

请注意,在执行步骤 8 之前,您可以通过执行 $./configure --help来查看可用的配置。

哦,最后 ./configure 和 make 可能需要一些时间,所以吃点东西然后享受吧!!

快乐黑客!

相关内容