View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Jan 07, 2010 11:17 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
I used to have this working really nicely in R5F27 with ALSA by adding "-ac hwac3,hwdts, " to my mplayer cmd line options. On the same h/w I installed R6 from scratch (not an upg). Choosing ALSA only gave a deafening silence while choosing OSS seemed to work first time so (for now at least) that's what I'm using. However when I add the above lines to mplayer, it crashes as below!


Quote:
[mythtv@fe-1 Firefly Season 1 Complete Dvd Ac3]$ mplayer -ao oss:/dev/dsp_spdifout -ac hwac3,hwdts, firefly.s01e01.serenity.pilot.dvd.xvid.avi
MPlayer SVN-r29134-snapshot-4.3.3 (C) 2000-2009 MPlayer Team
137 audio & 296 video codecs

Playing firefly.s01e01.serenity.pilot.dvd.xvid.avi.
Cache fill: 15.68% (6545408 bytes)
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 704x384 24bpp 23.976 fps 901.8 kbps (110.1 kbyte/s)
Clip info:
Software: VirtualDubMod 1.5.10.1 (build 2366/release)
Xlib: extension "Generic Event Extension" missing on display ":0.0".
Xlib: extension "Generic Event Extension" missing on display ":0.0".
Xlib: extension "Generic Event Extension" missing on display ":0.0".
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
No accelerated IMDCT transform found
hwac3: switched to AC3, 192000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
==========================================================================
[AO OSS] Can't set audio device /dev/dsp_spdifout to ac3 output, trying s16le...
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
[format] Sample format big-endian AC3 not yet supported
[libaf] Reinitialization did not work, audio filter 'format' returned error code -2
Couldn't find matching filter/ao format!
Starting playback...


MPlayer interrupted by signal 11 in module: decode_audio
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.


Did a lot of googling and someone had the same problem & got it working by adding "af=volnorm=2" to the ~/.mplayer/config file, so I did that, and it no longer crashes but I am essentially getting the same error.
Quote:
[mythtv@fe-1 Firefly Season 1 Complete Dvd Ac3]$ mplayer -ao oss:/dev/dsp_spdifout -ac hwac3,hwdts, firefly.s01e01.serenity.pilot.dvd.xvid.avi
MPlayer SVN-r29134-snapshot-4.3.3 (C) 2000-2009 MPlayer Team
137 audio & 296 video codecs

Playing firefly.s01e01.serenity.pilot.dvd.xvid.avi.
Cache fill: 16.52% (6897664 bytes)
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 704x384 24bpp 23.976 fps 901.8 kbps (110.1 kbyte/s)
Clip info:
Software: VirtualDubMod 1.5.10.1 (build 2366/release)
Xlib: extension "Generic Event Extension" missing on display ":0.0".
Xlib: extension "Generic Event Extension" missing on display ":0.0".
Xlib: extension "Generic Event Extension" missing on display ":0.0".
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
No accelerated IMDCT transform found
hwac3: switched to AC3, 192000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
==========================================================================
[format] Sample format big-endian AC3 not yet supported
Error at audio filter chain pre-init!

Exiting... (Fatal error)


In the examples above I am using "-ao oss:/dev/dsp_spdifout" on the cmd line but with no -ao directive the result is the same. It works fine for AVIs with mpeg audio.

If I leave out the -ac directive I get 2 channel PCM audio via the spdif output even if the source was AC3 or even DTS.

I have actually forgotten the model sound card I have in there, it was chosen as it was totally out of the box supported, lspci gives me "05:0a.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)"

Any thoughts?

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 18, 2010 10:56 pm 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
Not sure what version of alsa you are on but I think the stock one in LinHES should handle that c-media card.

I'm guessing you are trying to enable spdif based on the excerpts but you aren't saying what you are trying to do.

If you are using your /etc/asound.conf from R5F27 then it will work on R6. Check in your myth config to see what sound device is working for the internal player. In my case I set up asound.conf to use "default" as a direct pass through to spdif.

I then set up /home/mythtv/.mplayer/config to have the following in it:
Code:
ao=alsa:device=default


Out of curiosity what are you using mplayer anyway? I find the internal player is very reliable and I only use mplayer for the movie trailers.

based on the 2-channel PCM comment, have you enabled spdif pass through in the myth settings?

If you need to get asound.conf working then I recommend the suggestions in Allen's digital how-to: http://www.mythtv.org/wiki/AllensDigitalAudioHowto

Hope that gets you started...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 22, 2010 7:09 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
christ wrote:
Not sure what version of alsa you are on but I think the stock one in LinHES should handle that c-media card.


I'm currently using OSS, but was wondering if I'd be better off with alsa as I'm guessing the crash is caused by the OSS drivers & not mplayer itself.


christ wrote:
I'm guessing you are trying to enable spdif based on the excerpts but you aren't saying what you are trying to do.


I'm trying to enable spdif passthru for all audio everywhere.

christ wrote:
If you are using your /etc/asound.conf from R5F27 then it will work on R6. Check in your myth config to see what sound device is

Good to know. I have a mondo backup of my old system (um, somewhere), I could try and restore it to a VM to get the files off of it..

christ wrote:
Out of curiosity what are you using mplayer anyway? I find the internal player is very reliable and I only use mplayer for the movie trailers.

I never occurred to me to use the internal player for MythVideo etc, I guess I just put "internal" in the settings page for the cmd line? I'll try that, thx.


christ wrote:
based on the 2-channel PCM comment, have you enabled spdif pass through in the myth settings?


Yes.

christ wrote:
If you need to get asound.conf working then I recommend the suggestions in Allen's digital how-to: http://www.mythtv.org/wiki/AllensDigitalAudioHowto

Hope that gets you started...


Thx, will work on it later when I get a chance...

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject: Progress....
PostPosted: Wed Feb 10, 2010 11:25 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
I am officially giving up on OSS & am now just focusing on getting ALSA to work. To that end....

Much progress thx to the following cmds from this URL http://www.alsa-project.org/main/index. ... ule-cmipci (thx christ for the lead)
Code:
modprobe snd-cmipci ; modprobe snd-pcm-oss ; modprobe snd-mixer-oss ; modprobe snd-seq-oss


Once I ran these, the linhes audio setup screen suddenly realized that I did indeed have a soundcard installed. Here are some other relevant o/ps:

Code:
[root@fe-1 ~]# cat /proc/asound/cards
 0 [CMI8738        ]: CMI8738-MC6 - C-Media CMI8738
                      C-Media CMI8738 (model 55) at 0x2000, irq 21

[root@fe-1 ~]# cat /proc/asound/pcm
00-00: CMI8738-MC6 : C-Media PCI DAC/ADC : playback 1 : capture 1
00-01: CMI8738-MC6 : C-Media PCI 2nd DAC : playback 1
00-02: CMI8738-MC6 : C-Media PCI IEC958 : playback 1 : capture 1

[root@fe-1 ~]# cat /etc/asound.conf
   pcm.!default {
       type hw
       card 0
       device 2
   }
#  pcm.!default {
#     type plug
#     slave.pcm "spdif"
#  }

[root@fe-1 ~]# cat /etc/asound.state
state.CMI8738 {
   control.1 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 2
      comment.range '0 - 31'
      iface MIXER
      name 'Master Playback Volume'
      value.0 28
      value.1 28
   }
   control.2 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name '3D Control - Switch'
      value false
   }
   control.3 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 2
      comment.range '0 - 31'
      iface MIXER
      name 'PCM Playback Volume'
      value.0 24
      value.1 24
   }
   control.4 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'PCM Playback Switch'
      value true
   }
   control.5 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 2
      iface MIXER
      name 'PCM Capture Switch'
      value.0 false
      value.1 false
   }
   control.6 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 2
      comment.range '0 - 31'
      iface MIXER
      name 'Synth Playback Volume'
      value.0 24
      value.1 24
   }
   control.7 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Synth Playback Switch'
      value true
   }
   control.8 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 4
      iface MIXER
      name 'Synth Capture Route'
      value.0 false
      value.1 false
      value.2 false
      value.3 false
   }
   control.9 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 2
      comment.range '0 - 31'
      iface MIXER
      name 'CD Playback Volume'
      value.0 0
      value.1 0
   }
   control.10 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 2
      iface MIXER
      name 'CD Playback Switch'
      value.0 true
      value.1 true
   }
   control.11 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 4
      iface MIXER
      name 'CD Capture Route'
      value.0 false
      value.1 false
      value.2 false
      value.3 false
   }
   control.12 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 2
      comment.range '0 - 31'
      iface MIXER
      name 'Line Playback Volume'
      value.0 0
      value.1 0
   }
   control.13 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 2
      iface MIXER
      name 'Line Playback Switch'
      value.0 false
      value.1 false
   }
   control.14 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 4
      iface MIXER
      name 'Line Capture Route'
      value.0 false
      value.1 false
      value.2 false
      value.3 false
   }
   control.15 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 1
      comment.range '0 - 31'
      iface MIXER
      name 'Mic Playback Volume'
      value 0
   }
   control.16 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Mic Playback Switch'
      value false
   }
   control.17 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Mic Capture Switch'
      value false
   }
   control.18 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 1
      comment.range '0 - 3'
      iface MIXER
      name 'PC Speaker Playback Volume'
      value 2
   }
   control.19 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 2
      comment.range '0 - 15'
      iface MIXER
      name 'Aux Playback Volume'
      value.0 0
      value.1 0
   }
   control.20 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 2
      iface MIXER
      name 'Aux Playback Switch'
      value.0 false
      value.1 false
   }
   control.21 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 2
      iface MIXER
      name 'Aux Capture Switch'
      value.0 false
      value.1 false
   }
   control.22 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Mic Boost Playback Switch'
      value true
   }
   control.23 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 1
      comment.range '0 - 7'
      iface MIXER
      name 'Mic Capture Volume'
      value 0
   }
   control.24 {
      comment.access 'read write'
      comment.type INTEGER
      comment.count 1
      comment.range '0 - 7'
      iface MIXER
      name 'Phone Playback Volume'
      value 0
   }
   control.25 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Phone Playback Switch'
      value false
   }
   control.26 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'PC Speaker Playback Switch'
      value true
   }
   control.27 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Mic Boost Capture Switch'
      value false
   }
   control.28 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'Four Channel Mode'
      value true
   }
   control.29 {
      comment.access 'read write'
      comment.type ENUMERATED
      comment.count 1
      comment.item.0 Line-In
      comment.item.1 'Rear Output'
      comment.item.2 'Bass Output'
      iface MIXER
      name 'Line-In Mode'
      value Line-In
   }
   control.30 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 Output Switch'
      value true
   }
   control.31 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 In Valid'
      value true
   }
   control.32 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 Copyright'
      value true
   }
   control.33 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 5V'
      value true
   }
   control.34 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 Loop'
      value true
   }
   control.35 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 In Monitor'
      value true
   }
   control.36 {
      comment.access 'read write'
      comment.type IEC958
      comment.count 1
      iface PCM
      device 2
      name 'IEC958 Playback Default'
      value '0082000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
   }
   control.37 {
      comment.access read
      comment.type IEC958
      comment.count 1
      iface PCM
      device 2
      name 'IEC958 Playback Con Mask'
      value ffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
   }
   control.39 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 In Select'
      value true
   }
   control.40 {
      comment.access 'read write'
      comment.type BOOLEAN
      comment.count 1
      iface MIXER
      name 'IEC958 In Phase Inverse'
      value true
   }
   control.41 {
      comment.access 'read write'
      comment.type ENUMERATED
      comment.count 1
      comment.item.0 Mic-In
      comment.item.1 'Center/LFE Output'
      iface MIXER
      name 'Mic-In Mode'
      value 'Center/LFE Output'
   }
}


[root@fe-1 ~]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: CMI8738 [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 1: CMI8738-MC6 [C-Media PCI 2nd DAC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 2: CMI8738-MC6 [C-Media PCI IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[root@fe-1 ~]# aplay -L
front:CARD=CMI8738,DEV=0
    C-Media CMI8738, C-Media PCI DAC/ADC
    Front speakers
iec958:CARD=CMI8738,DEV=0
    C-Media CMI8738, C-Media PCI DAC/ADC
    IEC958 (S/PDIF) Digital Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)


I ran alsamixer, unmuted all 8 IEC958 devices. First thing I noticed - I look at the end of my toslink cable and it is all dark which, in my limited experience, means the spdif o/p is muted, right? Hmm... alsmixer says it definitely isn't.

Unfortunately, nothing gives me any sound including this line:
Code:
mplayer -ao alsa:device=hw=0.2  /usr/share/sounds/restored.wav


(I'm pretty sure my spdif is 0,2, right?).

The linhes service Audio menu is set to a type of 'digital' & then there's only one device selectable, namely 0,2. But the test audio button there, and all video & TV playback is silent :-(

Now I have to undo everything & set it back to OSS so my wife can watch Jon & Kate plus 8. But when I have full access again, what should I try next? I feel I am >< this close to having it work (frustrating!)

Thx.

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 11, 2010 3:02 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
It has been a while since I did this, so some of this information may be a bit out of date....

First off, DTS/AC3 passthrough doesn't work with OSS. You can't select it in the mythtv setup windows with an OSS device, so you are on the right track to use alsa (at least, that was true last time I tried around R5.5).

Second, to get DTS/AC3 passthrough, you need a DTS/AC3 source. Otherwise, you get good old stereo out the spdif.

Third, I always had problems using alsa:hw0,2. I instead had to create an alias to make it work (not sure why). Also, in you example, it should be "hw0,2". Not "hw0.2".

Finally, i set up two digital devices in my asound.conf. One that rate converts and one that doesn't (not sure if this is still needed).

To create these two devices (assuming hw0,2), I have the following:

Code:
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
}

# hw0,2
pcm.digital-hw {
 type hw
 card 0
 device 2
}

ctl.digital-hw {
 type hw
 card 0
}

# Rate convert any input to what is needed for S/PDIF
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
}


I then use either "aplay -d digital" or "aplay -d mixed-digital"

This gets me stereo out the spdif (I don't have any DTS video files).

To get DTS or AC3 passthrough, I select the passthrough options in the mythtv setup, use the internal player and play a DVD that has DTS or AC3.

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 21, 2010 9:15 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
I eventually got it to work using ALSA by muting all of the IEC958 outputs except the playback one and suddenly it worked - for a few days. Then it stopped for no apparent reason and I went back in muting & unmuting somewhat randomly and now it works again (a couple of the IEC958 o/ps are unmuted but the rest are still muted.

Very weird, makes no sense, I have no idea why I had to do this but it is working and has been for some time now.

Modified the default values in /nfsroot/fe-1/usr/LH/bin/vdpau-detector to this:

Code:
BASIC_OPTS="-fs -zoom -quiet -ao alsa:device=spdif -ac hwac3,hwdts, "


Thx to those who replied with info.

_________________
Paul O'Flynn


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu