播放视频时 ALSA 音频错误

播放视频时 ALSA 音频错误

我在 x86_64 桌面上使用 Arch Linux。我最近进行了完整的系统更新,现在我似乎没有从视频中听到声音。例如,我在 YouTube 视频中听不到音频,如果我尝试以 mpv 格式播放视频,则会收到以下错误:

$ mpv CORE.RPL 
 (+) Video --vid=1 (escape124 320x208 15.000fps)
 (+) Audio --aid=1 (pcm_u8 2ch 44100Hz)
File tags:
 Title: RPLFAKE movie                                                                    
[autoconvert] Converting rgb555 -> rgb565
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: No such file or directory
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[ao/jack] cannot open server
[ao] Failed to initialize audio driver 'jack'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [gpu] 320x208 rgb565
V: 00:00:02 / 00:00:11 (24%)

我使用 ALSA direct(无脉冲音频)和 OpenRC,而不是 systemd。更新之前音频工作正常。我确实在某些应用程序中听到了声音(例如,声音在我拥有的几款游戏中运行良好) - 据我所知,问题似乎出在视频上。

有人对可能造成这种情况的原因有任何建议吗?

(注意,我想直接使用ALSA,而不是Jack)

更新:(回答评论中的问题)

输出aplay -L

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
    Default Audio Device
sysdefault
    Default Audio Device
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
usbstream:CARD=U0x46d0x81b
    USB Device 0x46d:0x81b
    USB Stream Output
default:CARD=PCH
    HDA Intel PCH, CX20641 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, CX20641 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, CX20641 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, DELL S2240L
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=4
    HDA NVidia, HDMI 4
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=5
    HDA NVidia, HDMI 5
    HDMI Audio Output
usbstream:CARD=NVidia
    HDA NVidia
    USB Stream Output

输出aplay -l

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: CX20641 Analog [CX20641 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 1 [DELL S2240L]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

我没有/etc/asound.conf文件(也没有每个用户的~/.asoundrc文件)。我过去从来没有/需要过它,而且通过 ALSA 发出的声音一直工作得很好。

我正在使用 Iceweasel(基于 Firefox)来观看 YouTube。aplay使用随机 .wav 文件也不起作用,我收到非常相似的错误消息:

$ aplay 0x0d.wav
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
aplay: main:867: audio open error: No such file or directory

相关内容