[MPlayer-dev-eng] [PATCH] ao_alsa9 patch: multichannel playback -- need testing

Zoltan Hidvegi mplayer at hzoli.2y.net
Sat Jun 7 03:29:15 CEST 2003


Vladimir I. Umnov wrote:
> This patch needed testing. Apply it for current cvs.
> 
> - no channels swaping in multichannel mode (may be for stereo too);
> - faster pause/resume; //should works with spdif too
> - faster end of playback; //should works with spdif too
> - 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 do the first patch in my life, be
> indulgent.

I've tried that, I get: ALSA lib pcm.c:1785:(snd_pcm_open_conf)
Invalid type for PCM surround51 definition (id: surround51, value:
cards.pcm.surround51), see the full log below.  I use the intel8x0
driver of alsa-0.9.3c on linux-2.4.21-rc6-ac2.  I used to be able to
play 6-channel audio with alsa before this patch, and I can still play
it with oss emulation, but as I wrote in an earlier email to
mplayer-advusers, when I play 5.1 ac3 audio (without your patch or
with oss), the audio channels are mixed up.  Initially, the Center/LFE
is swapped with the rear surround, however seeking during playback can
rotate the outputs.  I've uploaded a sample to
ftp://mplayerhq.hu/MPlayer/incoming/6.1_test.avi.  Play it, and seek
back a few times at the beginning to see the soud output moving
between speekers.

My motherboard is the Asus A7N8X deluxe, and I'm using the integrated
nForce2 audio.  The mplayer -v output is included below.

Zoli

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


MPlayer dev-CVS-030606-11:37-3.3 (C) 2000-2003 ?rp?d Gere?ffy (see DOCS)

CPU: Advanced Micro Devices  (Family: 6, Stepping: 1)
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/hzoli/.mplayer/config
Reading /home/hzoli/.mplayer/codecs.conf: can't open '/home/hzoli/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 57 audio & 145 video codecs
CommandLine: '-v' '6.1_test.avi' '-channels' '6' '-ao' 'alsa9'
get_path('font/font.desc') -> '/home/hzoli/.mplayer/font/font.desc'
font: can't open file: /home/hzoli/.mplayer/font/font.desc
Font /usr/share/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/hzoli/.mplayer/input.conf'
Can't open input config file /home/hzoli/.mplayer/input.conf : No such file or directory
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed : 52 binds
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: Connection refused
Failed to open LIRC support.
You will not be able to use your remote control.
get_path('6.1_test.avi.conf') -> '/home/hzoli/.mplayer/6.1_test.avi.conf'

Playing 6.1_test.avi
Not an URL!
 [file] File size is 5691242 bytes
STREAM: [file] 6.1_test.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: 33366  (fps=29.971)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 2094   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 480
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 299699/10000 = 29.970
Start: 0   Len: 2094
Suggested BufferSize: 83829
Quality 0
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 720
  biHeight 480
  biPlanes 1
  biBitCount 24
  biCompression 1482049860='DIVX'
  biSizeImage 1036800
===========================
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: 56000/1 = 56000.000
Start: 0   Len: 3913728
Suggested BufferSize: 28000
Quality 0
Sample size: 1
found 'wf', 18 bytes of 18
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 2
Samplerate: 48000
avg byte/sec: 56000
Block align: 1
bits/sample: 16
cbSize: 0
list_end=0x166
hdr=Software  size=24
Software  : MEncoder 0.90rc5-3.2.3 
Broken chunk?  chunksize=1682  (id=JUNK)
list_end=0x564BC2
Found movie at 0x80C - 0x564BC2
Reading INDEX block, 2234 chunks for 2094 frames (fpos=0x564bca)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0x6D6C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=1720725 (2094) audio size=3913728 (3913728)
VIDEO:  [DIVX]  720x480  24bpp  29.97 fps  197.0 kbps (24.0 kbyte/s)
 [V] filefmt:3  fourcc:0x58564944  size:720x480  fps:29.97  ftime:=0.0334
Clip info:
 Software: MEncoder 0.90rc5-3.2.3 
get_path('sub/') -> '/home/hzoli/.mplayer/sub/'
get_path('default.sub') -> '/home/hzoli/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
dec_audio: Allocating 3840 bytes for input buffer
dec_audio: Allocating 18432 + 65536 = 83968 bytes for output buffer
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe)  48000 Hz  448.0 kbit/s
A52 flags before a52_frame: 0x37
A52 flags after a52_frame: 0x17
Using MMX optimized resampler
AUDIO: 48000 Hz, 6 ch, 16 bit (0x10), ratio: 56000->576000 (448.0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1600x1200 with depth 24 and 32 bpp (":0.0" => local display)
 [x11] Unknown wm type...
Disabling DPMS
DPMSDisable stat: 1
==========================================================================
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/6ch/16bit -> 48000Hz/6ch/16bit...
 [libaf] Adding filter dummy 
 [dummy] Was reinitialized, rate=48000Hz, nch = 6, format = 0x00000001 and bps = 2
AF_pre: af format: 2 bps, 6 ch, 48000 hz, little endian signed int 
AF_pre: 48000Hz 6ch Signed 16-bit (Little-Endian)
ALSA lib pcm.c:1785:(snd_pcm_open_conf) Invalid type for PCM surround51 definition (id: surround51, value: cards.pcm.surround51)
Could not open/initialize audio device -> no sound.
alsa-init: testing and bugreports are welcome.
alsa-init: requested format: 48000 Hz, 6 channels, Signed 16-bit (Little-Endian)
alsa-init: compiled for ALSA-0.9.2
alsa-init: soundcard set to surround51
alsa-init: playback open error: Invalid argument
Uninit audio filters...
 [libaf] Removing filter dummy 
uninit audio: liba52
Audio: no sound
Freeing 0 unused audio chunks
Starting playback...
This file was encoded with libavcodec build 4655
 [ffmpeg] aspect_ratio: 1.333333
VDec: vo config request - 720 x 480 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (720x480->720x540,flags=0,'MPlayer',0x32315659)
VO: [xv] 720x480 => 720x540 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 138 for hw scaling
 [xv] dx: 0 dy: 0 dw: 720 dh: 540
*** [vo] Allocating (slices) mp_image_t, 720x480x12bpp YUV planar, 518400 bytes
V:   0.0    1   0%  0%  0.0% 0 0 0%
*** [vo] Allocating (slices) mp_image_t, 720x480x12bpp YUV planar, 518400 bytes
 [xv] dx: 0 dy: 0 dw: 720 dh: 540
V:   0.0    2   0%  0%  0.0% 0 0 0%
V:   0.1    3   0%  0%  0.0% 0 0 0%
V:   0.1    4   0%  0%  0.0% 0 0 0%
V:   0.1    5   0%  0%  0.0% 0 0 0%
V:   0.2    6   0%  0%  0.0% 0 0 0%
V:   0.2    7   0%  0%  0.0% 0 0 0%
V:   0.2    8   0%  0%  0.0% 0 0 0%
uninit video: ffmpeg
DEMUXER: freeing demuxer at 0x85dac78  
Successfully enabled DPMS
vo: uninit ...

Exiting... (Quit)



More information about the MPlayer-dev-eng mailing list