[mythtv-users] ac3 passthrough problems

Brian J. Murrell brian at interlinx.bc.ca
Thu Sep 28 15:07:00 UTC 2006


On Tue, 2006-26-09 at 09:59 -0400, Scott wrote:

On to the basic sanity test.

> 1) In MythTV locate a 5.1 source that fails to play correctly

Well, how about just using a DVD with an AC sound track?

> 3) Using mplayer, run "mplayer -v -ao alsa -afm hwac3  
> source_file_from_mythtv.mpg" and verify the sound works as expected

I did this:

# mplayer -v -aid 128 -channels 6 -vo null -ao alsa -afm hwac3 -dvd-device /dev/cdrom dvd://1

and still did not get the receiver kicking into DD/DTS decoding mode.
Here is what mplayer had to say:

DVD successfully opened.
[open] audio stream: 0 audio format: ac3 (5.1) language: en aid: 128
[open] audio stream: 1 audio format: ac3 (stereo) language: fr aid: 129
[open] number of audio channels on disk: 2.
[open] subtitle ( sid ): 0 language: en
[open] subtitle ( sid ): 1 language: fr
[open] subtitle ( sid ): 2 language: fr
[open] number of subtitles on disk: 3
DVD start cell: 0  pack: 0x0-0x141EB  
DVD start=0 end=3781050  
STREAM: [null] dvd://1
STREAM: Description: DVD stream
STREAM: Author: 
STREAM: Comment: 
DVD Seek! lba=0x0  cell=0  packs: 0x0-0x141EB  
Angle-seek synced by cell/vob IDN search!  
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename dvd://1 ext: (null)
DVD Seek! lba=0x0  cell=0  packs: 0x0-0x141EB  
Angle-seek synced by cell/vob IDN search!  
Checking for Nullsoft Streaming Video
DVD Seek! lba=0x0  cell=0  packs: 0x0-0x141EB  
Angle-seek synced by cell/vob IDN search!  
Checking for MOV
Checking for VIVO
header block 1 size: 0
AVS: avs_check_file - attempting to open file dvd://1
AVS: File is too big, aborting...
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 71323, FOUND 47, packet_size= 0, SEEMS A TS? 0
DVD Seek! lba=0x22  cell=0  packs: 0x0-0x141EB  
Angle-seek synced by cell/vob IDN search!  
DVD Seek! lba=0x0  cell=0  packs: 0x0-0x141EB  
Angle-seek synced by cell/vob IDN search!  
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=1140851708
LMLM4 Stream Format not found
system stream synced at 0xD (13)!
==> Found video stream: 0
DVD Seek! lba=0x1CD862  cell=26  packs: 0x1B5BB2-0x1D3D69  
Angle-seek synced by cell/vob IDN search!  
==> Found audio stream: 128
==> Found audio stream: 129
DVD Seek! lba=0x39B0C5  cell=54  packs: 0x377F57-0x39B1B6  
Angle-seek synced by cell/vob IDN search!  
--- END OF CELL !!! ---
DVD next cell: 55  pack: 0x39B1B7-0x39B1BA  
--- END OF CELL !!! ---
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)  
DVD Seek! lba=0x0  cell=0  packs: 0x0-0x141EB  
Angle-seek synced by cell/vob IDN search!  
MPEG-PS file format detected.
Searching for sequence header... OK!
VIDEO:  MPEG2  720x480  (aspect 3)  29.970 fps  9801.6 kbps (1225.2 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x480  fps:29.97  ftime:=0.0334
get_path('sub/') -> '/root/.mplayer/sub/'
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 480 (preferred colorspace: Mpeg PES)
Trying filter chain: vo
VDec: using Mpeg PES as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x480->720x480,flags=4,'MPlayer',0x4D504553)
VO: [null] 720x480 => 720x480 Mpeg PES  [zoom]
VO: Description: Null video output
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
Selected video codec: [mpegpes] vfm: mpegpes (MPEG-PES output (.mpg or DXR3/IVTV/DVB card))
==========================================================================
==========================================================================
Trying to force audio codec driver family hwac3...
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
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, ac3, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
==========================================================================
Building audio filter chain for 48000Hz/2ch/ac3 -> 0Hz/0ch/??...
[libaf] Adding filter dummy 
[dummy] Was reinitialized: 48000Hz/2ch/ac3
[dummy] Was reinitialized: 48000Hz/2ch/ac3
alsa-init: requested format: 48000 Hz, 2 channels, 100
alsa-init: using ALSA 1.0.11
alsa-spdif-init: playing AC3, 2 channels
alsa-init: using device iec958:{CARD 0 AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}
alsa-init: pcm opend in blocking mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa-init: got period size 1024
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch ac3 (1 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy at streamminister.de>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/ac3 -> 48000Hz/2ch/ac3...
[dummy] Was reinitialized: 48000Hz/2ch/ac3
[dummy] Was reinitialized: 48000Hz/2ch/ac3
Starting playback...

Nice that it detected and chose to use iec958 which is a valid device
for my alsa card:

# aplay -L
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
modem 'cards.pcm.modem'
phoneline 'cards.pcm.phoneline'
default 'cards.pcm.default'
dmix 'cards.pcm.dmix'
dsnoop 'cards.pcm.dsnoop'

> At step 3, if the sound doesn't work as expected then most likely the  
> problem is ALSA is not configured correctly yet.

But alsa is definitely passing digital PCM to my receiver.  Would that
not mean that everything is ready to go to pass AC3 as well?

> An asoundrc file  
> might help out.

I've tried with and without.  Here is my /root/asoundrc file:

pcm.!default {
  type plug
  slave.pcm "digital-hw"
}
ctl.!default {
  type hw
  card 0
}
pcm.analog {
  type plug
  slave.pcm "analog-hw"
}
ctl.analog {
  type hw
  card 0
}
pcm.mixed-analog {
  type plug
  slave.pcm "dmix-analog"
}
ctl.mixed-analog {
  type hw
  card 0
}
pcm.digital {
  type plug
  slave.pcm "digital-hw"
}
ctl.digital {
  type hw
  card 0
}
pcm.mixed-digital {
  type plug
  slave.pcm "dmix-digital"
}
ctl.mixed-digital {
  type hw
  card 0
}
pcm.analog-hw {
  type hw
  card 0
  
}
ctl.analog-hw {
  type hw
  card 0
}
pcm.digital-hw {
  type hw
  card 0
  device 1
}
ctl.digital-hw {
  type hw
  card 0
}
pcm.dmix-analog {
  type dmix
  ipc_key 1234
  slave {
    pcm "analog-hw"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}
ctl.dmix-analog {
  type hw
  card 0
}
pcm.dmix-digital {
  type dmix
  ipc_key 1235
  slave {
    pcm "digital-hw"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}
ctl.dmix-digital {
  type hw
  card 0
}

for this card:

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: YMF754 [Yamaha DS-XG (YMF754)], device 0: YMFPCI [YMFPCI]
  Subdevices: 32/32
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
  Subdevice #8: subdevice #8
  Subdevice #9: subdevice #9
  Subdevice #10: subdevice #10
  Subdevice #11: subdevice #11
  Subdevice #12: subdevice #12
  Subdevice #13: subdevice #13
  Subdevice #14: subdevice #14
  Subdevice #15: subdevice #15
  Subdevice #16: subdevice #16
  Subdevice #17: subdevice #17
  Subdevice #18: subdevice #18
  Subdevice #19: subdevice #19
  Subdevice #20: subdevice #20
  Subdevice #21: subdevice #21
  Subdevice #22: subdevice #22
  Subdevice #23: subdevice #23
  Subdevice #24: subdevice #24
  Subdevice #25: subdevice #25
  Subdevice #26: subdevice #26
  Subdevice #27: subdevice #27
  Subdevice #28: subdevice #28
  Subdevice #29: subdevice #29
  Subdevice #30: subdevice #30
  Subdevice #31: subdevice #31
card 0: YMF754 [Yamaha DS-XG (YMF754)], device 1: YMFPCI - IEC958 [YMFPCI - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: YMF754 [Yamaha DS-XG (YMF754)], device 2: YMFPCI - Rear [YMFPCI - Rear PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

> Of course, all this assumes you're doing the following hookup: sound  
> card -> spdif -> A/V receiver. :)

Since I do get PCM over digital, it must be.  :-)

b.

-- 
My other computer is your Microsoft Windows server.

Brian J. Murrell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20060928/f98603bc/attachment.pgp 


More information about the mythtv-users mailing list