[MPlayer-users] ao_alsa9 patch -- need testing

Corey Hickey bugfood-ml at fatooh.org
Fri Jun 6 21:11:55 CEST 2003


Vladimir I. Umnov wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> 
> 
> ------------------------------------------------------------------------
> 
> This patch needed testing. Apply it for current cvs.
> 
> - no channels swaping;
> - faster pause/resume; //may be it works not on all hw
> - faster end of playback; //may be it works not on all hw
> - some workaround of non-supported ao formats by hw;
> - some workaround about selecting appropriate device for number of
> channels;
> 
> TODO:
> - implement better handling of unsopported modes - alsa api has many
> functions for determining supported modes by hw;
> 
> p.s. sorry for bad English
> 

I just tried your new patch, and it seems to introduce some errors. The
messages below appear when I pause mplayer:

ALSA lib pcm_hw.c:535:(snd_pcm_hw_pause) SNDRV_PCM_IOCTL_PAUSE failed: 
File descriptor in bad state
alsa-pause: pcm pause error: File descriptor in bad state

and these messages when I resume:

ALSA lib pcm_hw.c:535:(snd_pcm_hw_pause) SNDRV_PCM_IOCTL_PAUSE failed: 
File descriptor in bad state
alsa-pause: pcm resume error: File descriptor in bad state
alsa-space: xrun of at least 636.376 msecs. resetting stream

Other than that, it seems to work fine; the sound continues without any 
problems, despite the warnings. The channels-swapping does not occur,
and I can specify -channels 6 without surround51 - that's pretty nifty.

-Corey

Linux 2.4.21-rc1
ALSA 0.9.4
SBLive

Here's full output of mplayer -ao alsa9 -v, pause, resume, and exit.


Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale


MPlayer dev-CVS-030604-15:44-3.2.3 (C) 2000-2003 Árpád Gereöffy (see DOCS)

CPU: Advanced Micro Devices  (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/bugfood/.mplayer/config
Reading /home/bugfood/.mplayer/codecs.conf: 57 audio & 145 video codecs
CommandLine: 'Heist.avi' '-ao' 'alsa9' '-v'
get_path('font/font.desc') -> '/home/bugfood/.mplayer/font/font.desc'
Font /home/bugfood/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
get_path('input.conf') -> '/home/bugfood/.mplayer/input.conf'
Parsing input config file /home/bugfood/.mplayer/input.conf
Input config file /home/bugfood/.mplayer/input.conf parsed : 67 binds
Opening joystick device /dev/input/js2
get_path('Heist.avi.conf') -> '/home/bugfood/.mplayer/Heist.avi.conf'

Playing Heist.avi
Not an URL!
[file] File size is 972732684 bytes
STREAM: [file] Heist.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x13A
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 156910   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  624 x 352
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 239759/10000 = 23.976
Start: 0   Len: 156910
Suggested BufferSize: 76487
Quality 0
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 624
   biHeight 352
   biPlanes 1
   biBitCount 24
   biCompression 1482049860='DIVX'
   biSizeImage 658944
===========================
Regenerating keyframe table for DIVX 4 video
list_end=0x13A
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 48000/1 = 48000.000
Start: 0   Len: 314136576
Suggested BufferSize: 24000
Quality 0
Sample size: 1
found 'wf', 18 bytes of 18
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 2
Samplerate: 48000
avg byte/sec: 48000
Block align: 1
bits/sample: 16
cbSize: 0
list_end=0x174
hdr=Software  size=24
Software  : MEncoder 0.90rc5-3.2.3
hdr=Name  size=6
Name      : Heist
Broken chunk?  chunksize=1668  (id=JUNK)
list_end=0x39D13804
Found movie at 0x80C - 0x39D13804
Reading INDEX block, 170000 chunks for 156910 frames (fpos=0x39d1380c)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0x5DCC)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=654435238 (156910) audio size=314136576 (314136576)
VIDEO:  [DIVX]  624x352  24bpp  23.98 fps  800.0 kbps (97.7 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:624x352  fps:23.98  ftime:=0.0417
Clip info:
  Software: MEncoder 0.90rc5-3.2.3
  Name: Heist
get_path('sub/') -> '/home/bugfood/.mplayer/sub/'
get_path('default.sub') -> '/home/bugfood/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
dec_audio: Allocating 3840 bytes for input buffer
dec_audio: Allocating 6144 + 65536 = 71680 bytes for output buffer
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe)  48000 Hz  384.0 kbit/s
A52 flags before a52_frame: 0x2A
A52 flags after a52_frame: 0xA
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 48000->192000 (384.0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
X11 opening display: :0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0" => local 
display)
[x11] Detected wm supports layers.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 
and bps = 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
alsa-init: testing and bugreports are welcome.
alsa-init: requested format: 48000 Hz, 2 channels, Signed 16-bit 
(Little-Endian)
alsa-init: compiled for ALSA-0.9.4
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: hw:0,0
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: current val=16, fragcount=16
alsa-init: got buffersize=65536
alsa9: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little 
Endian
AO: [alsa9] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: ALSA-0.9.x audio output
AO: Author: Alex Beregszaszi <alex at naxine.org>, Joy Winter <joy at pingfm.org>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 
and bps = 2
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 
and bps = 2
Starting playback...
alsa-space: free space = 65536, status=141089384, prepared --
XXX initial  v_pts=0.042  a_pos=24000 (0.500)   1   0%  0%  0.0% 0 0 0%
This file was encoded with libavcodec build 4655
[ffmpeg] aspect_ratio: 1.772727
VDec: vo config request - 624 x 352 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
VO Config (624x352->624x352,flags=0,'MPlayer',0x32315659)
VO: [xv] 624x352 => 624x352 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 137 for hw scaling
[xv] dx: 0 dy: 0 dw: 624 dh: 352
*** [vo] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 
329472 bytes
[xv] dx: 0 dy: 0 dw: 624 dh: 352
*** [vo] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 
329472 bytes
*** [vo] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 
329472 bytes
A:   1.3 V:   1.3 A-V: -0.002 ct: -0.038   32/ 32   4%  2%  0.9% 0 0 0%
ALSA lib pcm_hw.c:535:(snd_pcm_hw_pause) SNDRV_PCM_IOCTL_PAUSE failed: 
File descriptor in bad state
alsa-pause: pcm pause error: File descriptor in bad state
ALSA lib pcm_hw.c:535:(snd_pcm_hw_pause) SNDRV_PCM_IOCTL_PAUSE failed: 
File descriptor in bad state
alsa-pause: pcm resume error: File descriptor in bad state
alsa-space: xrun of at least 537.490 msecs. resetting stream
alsa-space: free space = 0, status=141212520, xrun --
alsa-space: free space = 65536, status=141326560, prepared --.9% 1 0 0%
Uninit audio filters...-0.004 ct: -0.037   62/ 62   4%  2%  0.8% 4 0 0%
[libaf] Removing filter dummy
uninit audio: liba52
uninit video: ffmpeg
DEMUXER: freeing demuxer at 0x85e1000
alsa-uninit: pcm closed
vo: uninit ...

Exiting... (Quit)



More information about the MPlayer-users mailing list