Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

AC3 passthrough possible with ALSA?

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
rezza
Guru
Guru
User avatar
Posts: 434
Joined: Wed Apr 09, 2003 1:54 pm
Location: Edinburgh, UK
Contact:
Contact rezza
Website

AC3 passthrough possible with ALSA?

  • Quote

Post by rezza » Thu Oct 21, 2004 10:05 pm

I was just wondering if it was possible to set up hardware AC3 passthrough on my SBLive using ALSA. I've done a bit of research on it, and I've seen people refer to the emu10k1 driver and the fact that its possible to set that up to do AC3 passthrough, but nothing about getting it working with ALSA. And anyway, the emu10k1 driver won't install with gcc 3.4 (there's a bug about that already).

...also, I'd prefer to stick to alsa for my sound stuff anyway. Actually, thinking about it, I don't really know the difference between OSS and ALSA, and the only reason I'd prefer to use ALSA is that its generally considered to be newer and therefore better than OSS... that might not be true in the case of certain drivers. Like emu10k1 for example.

Well any info would be much appreciated.
screenshots
blog
Top
rezza
Guru
Guru
User avatar
Posts: 434
Joined: Wed Apr 09, 2003 1:54 pm
Location: Edinburgh, UK
Contact:
Contact rezza
Website

  • Quote

Post by rezza » Thu Oct 21, 2004 11:33 pm

I've just noticed that when I try to force mplayer to use AC3 passthrough (-ac hwac3) my AV amp does get some dolby digital signals through, but its very jumpy and stuttered - the amp keeps switching between digital and normal modes, and very occasionally I get brief snatches of sound.

This is what mplayer dumps at me (sorry for the long quote):

Code: Select all

MPlayer 1.0pre5-3.4.1 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton 1929 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
3DNowExt supported but disabled
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow SSE

Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /home/rezza/.mplayer/config
Reading /home/rezza/.mplayer/codecs.conf: Can't open '/home/rezza/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 73 audio & 180 video codecs
CommandLine: '-ac' 'hwac3' '-v' 'Ghost in the Shell - Innocence 34min preview.avi'
init_freetype
font: can't open file: Bitstream Vera Sans
Cannot load font: Bitstream Vera Sans
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
Terminal type `rxvt-unicode' is not defined.
get_path('input.conf') -> '/home/rezza/.mplayer/input.conf'
Can't open input config file /home/rezza/.mplayer/input.conf: No such file or directory
Parsing input config file /usr/share/mplayer/input.conf
Input config file /usr/share/mplayer/input.conf parsed: 53 binds
get_path('Ghost in the Shell - Innocence 34min preview.avi.conf') -> '/home/rezza/.mplayer/Ghost in the Shell - Innocence 34min preview.avi.conf'

Playing Ghost in the Shell - Innocence 34min preview.avi.
[file] File size is 721125376 bytes
STREAM: [file] Ghost in the Shell - Innocence 34min preview.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:2359296  
AVI file format detected.
list_end=0x2286
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 49799   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  704 x 384
==========================
list_end=0x10F4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: divx (78766964)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 2997/125 = 23.976
Start: 0   Len: 49799
Suggested BufferSize: 129549
Quality 10000
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 704
  biHeight 384
  biPlanes 1
  biBitCount 24
  biCompression 808802372='DX50'
  biSizeImage 1622016
===========================
Regenerating keyframe table for DIVX 4 video
list_end=0x217A
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 56000/1 = 56000.000
Start: 0   Len: 116313981
Suggested BufferSize: 28000
Quality -1
Sample size: 1
==========================
found 'wf', 18 bytes of 18
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 6
Samplerate: 48000
avg byte/sec: 56000
Block align: 1
bits/sample: 0
cbSize: 0
===========================
list_end=0x2286
AVI: dmlh found (size=248) (total_frames=49799)
list_end=0x2AE327F4
Found movie at 0x280C - 0x2AE327F4
Reading INDEX block, 99588 chunks for 49799 frames (fpos=0x2ae327fc)
AVI index offset: 0x2808 (movi=0x280C 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=602367599 (49799) audio size=116313981 (116313981)
VIDEO:  [DX50]  704x384  24bpp  23.976 fps  2320.1 kbps (283.2 kbyte/s)
[V] filefmt:3  fourcc:0x30355844  size:704x384  fps:23.98  ftime:=0.0417
get_path('sub/') -> '/home/rezza/.mplayer/sub/'
get_path('default.sub') -> '/home/rezza/.mplayer/default.sub'
==========================================================================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through SP/DIF
dec_audio: Allocating 8192 bytes for input buffer.
dec_audio: Allocating 16384 + 65536 = 81920 bytes for output buffer.
No accelerated IMDCT transform found
hwac3: switched to AC3, 448000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, 16 bit (0x400), ratio: 56000->192000 (448.0 kbit)
Selected audio codec: [hwac3] afm:hwac3 (AC3 through SPDIF)
==========================================================================
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
==========================================================================
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/8bit...
[libaf] Adding filter dummy 
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020 and bps = 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big endian AC3 
AF_pre: 48000Hz 2ch AC3
alsa-init: requested format: 48000 Hz, 2 channels, AC3
alsa-init: compiled for ALSA-1.0.6
alsa-init: setup for 1/2 channel(s)
alsa-spdif-init: playing AC3, 2 channels
alsa-init: soundcard set to iec958:AES0=0x2,AES1=0x82,AES2=0x0,AES3=0x2
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch AC3 (1 bps)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@streamminister.de>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020 and bps = 2
[libaf] Adding filter format 
[format] Sample format big endian AC3  not yet supported 
Couldn't find matching filter / ao format!
Starting playback...
alsa-space: free space = 65536, prepared --
[ffmpeg] aspect_ratio: 1.833333
VDec: vo config request - 704 x 384 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.83:1 - prescaling to correct movie aspect.
VO Config (704x384->704x384,flags=0,'MPlayer',0x32315659)
VO: [xv] 704x384 => 704x384 Planar YV12 
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@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 139 for hw scaling
[xv] dx: 0 dy: 0 dw: 704 dh: 410
*** [vo] Allocating (slices) mp_image_t, 704x384x12bpp YUV planar, 405504 bytes
get_path('subfont.ttf') -> '/home/rezza/.mplayer/subfont.ttf'
Unicode font: 679 glyphs.
screenshots
blog
Top
Torangan
Apprentice
Apprentice
Posts: 186
Joined: Fri Mar 21, 2003 10:44 am

  • Quote

Post by Torangan » Sat Oct 23, 2004 12:33 pm

Try adding -ao alsa:device=hw#0.3, that did the trick for me. It worked without this switch for some time but it seems like newer versions of alsa do require it again (as very old versions did).
Top
oggialli
Guru
Guru
User avatar
Posts: 389
Joined: Thu May 27, 2004 3:17 pm
Location: Finland, near Tampere

  • Quote

Post by oggialli » Sat Oct 23, 2004 2:08 pm

Would the option that says something like "Digital Output Raw" or something in the mixer relate to this somehow?
IBM Thinkpad T42P - Gentoo Linux
Top
rezza
Guru
Guru
User avatar
Posts: 434
Joined: Wed Apr 09, 2003 1:54 pm
Location: Edinburgh, UK
Contact:
Contact rezza
Website

  • Quote

Post by rezza » Wed Oct 27, 2004 3:58 pm

Torangan: Thanks, I'll give that a shot... I'm on a windows box at the moment, but I'll try it out tonight.

oggialli: Yeah, I have tried with that option both on and off. If its off, I get PCM output only, with it on, I get the annoying flutter between PCM and dolby digital.
screenshots
blog
Top
rezza
Guru
Guru
User avatar
Posts: 434
Joined: Wed Apr 09, 2003 1:54 pm
Location: Edinburgh, UK
Contact:
Contact rezza
Website

  • Quote

Post by rezza » Fri Oct 29, 2004 10:08 am

Hmm, that didn't work :(

A quick cat /proc/asound/devices shows that mine only go up to [0 - 2], I'm guessing thats because I only have a four-channel card. It has only four analogue ouput channels, but despite that in windows I can use the S/P DIF to pump out a full DD or DD EX signal (six or seven channels).
screenshots
blog
Top
Post Reply

6 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic