Opened 8 years ago

Last modified 3 years ago

#1617 new defect

mplayer crashes upon resume after SW suspend

Reported by: moritzmplayer@… Owned by: reimar
Priority: normal Component: ao
Version: HEAD Severity: normal
Keywords: Cc: artjom.simon@…, z201099@…, rion4ik@…, nikoli@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description (last modified by reimar)

When I resume my PC after software suspend with mplayer running on a local file, I get hanging sound and shortly thereafter mplayer crashes.

Apparently SNDRV_PCM_IOCTL_RESUME failed: Function not implemented seems to cause the crash. Even if this is caused by a buggy HW driver (linux 2.3.32), mplayer should not crash.

/usr/bin/mplayer -noquiet -nofs -nomouseinput -sub-fuzziness 1 -identify -slave -vo xv -ao alsa -nokeepaspect -framedrop -nodr -double -input nodefault-bindings:conf=/dev/null -stop-xscreensaver -wid 77595003 -monitorpixelaspect 1 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles /home/moritz/.config/smplayer/styles.ass -fontconfig -font Arial -subfont-autoscale 0 -subfont-osd-scale 20 -subfont-text-scale 20 -subcp ISO-8859-1 -vid 0 -aid 1 -subpos 100 -volume 74 -cache 2000 -ss 7 -osdlevel -vf-add screenshot -slices -channels 2 -af volnorm=1,scaletempo,equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 /home/moritz/the boondock saints.avi

MPlayer SVN-r30075 (C) 2000-2009 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Terminal type `unknown' is not defined.

Playing /home/moritz/saints.avi.

Cache fill: 0.00% (0 bytes)
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 720x480 12bpp 23.976 fps 666.0 kbps (81.3 kbyte/s)
Clip info:

Software: MEncoder SVN-r28529

ID_FILENAME=/home/moritz/the boondock saints.avi
[VO_XV] Could not grab port 280.
[ass] auto-open
Opening video filter: [screenshot]
[ass] Init
[ass] Updating font cache.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 32.0 kbit/2.08% (ratio: 4000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
[Mixer] No hardware mixing, inserting volume filter.
Starting playback...
Movie-Aspect is 1.50:1 - prescaling to correct movie aspect.
[swscaler @ 0xed46c0]No accelerated colorspace conversion found.
[swscaler @ 0xed46c0]using unscaled yuv420p -> rgb24 special converter
VO: [xv] 720x480 => 720x480 Planar YV12


No bind found for key 'SPACE'.
No bind found for key 'SPACE'.
[AO_ALSA] Pcm in suspend mode, trying to resume.
[AO_ALSA] alsa-lib: pcm_hw.c:729:(snd_pcm_hw_resume) SNDRV_PCM_IOCTL_RESUME failed: Function not implemented

Sound modules:

root@siduxbox:/home/moritz# lsmod |grep snd
snd_usb_audio 73082 1
snd_usb_lib 16119 1 snd_usb_audio
snd_hda_codec_realtek 249828 1
snd_hda_intel 21554 6
snd_hda_codec 63979 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 6180 2 snd_usb_audio,snd_hda_codec
snd_pcm_oss 38755 0
snd_mixer_oss 17043 1 snd_pcm_oss
snd_pcm 69402 5 snd_usb_audio,snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_dummy 1375 0
snd_seq_oss 28063 0
snd_seq_midi 5072 0
snd_rawmidi 18644 2 snd_usb_lib,snd_seq_midi
snd_seq_midi_event 5380 2 snd_seq_oss,snd_seq_midi
snd_seq 48830 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 18799 3 snd_pcm,snd_seq
snd_seq_device 5181 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 57120 25 snd_usb_audio,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 6127 1 snd
snd_page_alloc 7065 2 snd_hda_intel,snd_pcm
usbcore 141481 13 lirc_imon,snd_usb_audio,snd_usb_lib,gspca_stv06xx,gspca_zc3xx,gspca_main,usblp,usbhid,ums_cypress,usb_storage,uhci_hcd,ehci_hcd

Change History (8)

comment:1 Changed 6 years ago by artjom.simon@…

  • Cc artjom.simon@… added

This bug still exists in MPlayer SVN-r32792-4.5.2 using Arch Linux with kernel 2.6.37-ck2 and alsa.

While mplayer is playing a file, when trying to hibernate using s2ram (or echo mem > /sys/power/state), i get (among other mplayer output):

[AO_ALSA] Pcm in suspend mode, trying to resume.
[AO_ALSA] alsa-lib: pcm_hw.c:709:(snd_pcm_hw_resume) SNDRV_PCM_IOCTL_RESUME failed (-38): Function not implemented

Relevant lspci -v output:

00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)

Subsystem: Toshiba America Info Systems Toshiba Satellite A100-796 audio (Realtek ALC861)
Flags: bus master, fast devsel, latency 0, IRQ 40
Memory at dc240000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [130] Root Complex Link
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel

This is a 32bit Pentium M system.

Please tell us whether you need other information to help us solve this ancient bug. VLC has no problems and plays fine through the file when being interrupted by a suspend/hibernate.

comment:2 Changed 5 years ago by z201099@…

  • Cc z201099@… added

This bug still exists with 3.0.22 when I use ao=alsa.
With pulseaudio (ao=pulse), this messages still occurs but after suspend/hibernate mplayer continues seemless to play video/audio.

comment:3 Changed 5 years ago by reimar

You write it crashes, but the quoted MPlayer output does not contain any crash message.
A gdb backtrace or valgrind log would help a lot, I don't have any hardware I want to risk using suspend on so I can't test myself.

comment:4 Changed 4 years ago by rion4ik@…

  • Cc rion4ik@… added

the same for me.


comment:5 Changed 3 years ago by Nikoli

  • Analyzed by developer unset
  • Cc nikoli@… added
  • Reproduced by developer unset

comment:6 Changed 3 years ago by reimar

  • Description modified (diff)

That report also says it only happens with dmix, that IMHO would make it neither an MPlayer, nor hardware, nor driver bug but a alsa library one.

comment:7 Changed 3 years ago by reimar

Also, while the documentation is unclear, that patch you link to seems wrong to me.
It now always calls snd_pcm_prepare instead of snd_pcm_pause to resume.
On hardware that can actually pause/resume this should cause samples to be lost.

comment:8 Changed 3 years ago by Nikoli

Did you see this commit?
"ao_alsa: Unbreak pause/resume"

It was done 3 hours after 4083ae1de37283210d022fb60b6128db276168d4

Note: See TracTickets for help on using tickets.