[LINUX] Passthrough working with mplayer but not xbmc
#16
Sad 
Got the update done, thanks for the link. Super easy. Unfortunately, no luck with that either Sad

Here is the debug log containing two different attempts:

http://pastebin.com/SmWKQGBV

Tried setting both options (default and passthrough) to the standard iec958. Than I tried setting the passthrough to plug:iec958:default like was suggested earlier. Both gave the the unable to initialize audio device.

This still works:

Code:
mplayer -vo null -ac hwdts -ao alsa:device=iec958 hot\ tub\ time\ machine.mkv
Reply
#17
aplay -l
Reply
#18
Code:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audigy2 [SB Audigy 2 [Unknown]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 31/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: Audigy2 [SB Audigy 2 [Unknown]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
  Subdevices: 8/8
  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
card 0: Audigy2 [SB Audigy 2 [Unknown]], device 3: emu10k1 [Multichannel Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 [Unknown]], device 4: p16v [p16v]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Reply
#19
ahhh, very non-standard hw.

you try this ?

http://ubuntuforums.org/showthread.php?p=1269056
Reply
#20
I've tried that one before, but I lost navigation sounds and I still had to fight to get xbmc to use the right alsa device. I can give it another go, but before my hard drive crash, I had the latest live release installed to the hard drive and it was working great Sad without messing with any of that.

Is there any way to specify which alsa device to use like there is in mplayer?
Reply
#21
[POST REMOVED from this thread - new location: http://forum.xbmc.org/showthread.php?p=5...post595134]


XBMC version: 2:10.00~svn33324-lucid1
Ubuntu 10.04 i386
Hardware setup:
The connection made through Coax cable from the blue jack into a coax digital input on Yamaha RX-V367 Receiver
The receiver is set to Dolby Pro 2 and I have 5 big speakers (1 center, fl, fr, rl, rr)
Here's the result of aplay -l:

Code:
bogdan@bogdan-desktop:/usr/share/alsa/cards$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: CA0106 [CA0106], device 0: ca0106 [CA0106]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 1: ca0106 [CA0106]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 2: ca0106 [CA0106]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 3: ca0106 [CA0106]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Command:
Code:
aplay -v -D plughw:CA0106 /usr/share/sounds/alsa/Front_Center.wav

has the below output:
Code:
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Plug PCM: Route conversion PCM (sformat=S16_LE)
  Transformation table:
    0 <- 0
    1 <- 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 85333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 85333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
  appl_ptr     : 0
  hw_ptr       : 0

iecset has the below output:

Code:
bogdan@bogdan-desktop:~$ iecset
Mode: consumer
Data: audio
Rate: 48000 Hz
Copyright: permitted
Emphasis: none
Category: digital signal mixer
Original: original
Clock: 1000 ppm

I've tried with both Data:audio and Data non-audio (iecset audio on and
iecset audio off) and it makes no difference.

iecset -x
for Data:audio
Code:
bogdan@bogdan-desktop:~$ iecset -x
AES0=0x04,AES1=0x92,AES2=0x10,AES3=0x02
for Data:non-audio
Code:
bogdan@bogdan-desktop:~$ iecset -x
AES0=0x06,AES1=0x92,AES2=0x10,AES3=0x02

The problem is the following. When I first installed XBMC I've configured the following for the audio:
Audio Output: Optical/Coax
Speaker Configuration: 5.0
Dolby Digital and DTS capable receiver: on
Output Audio Device: CA0106 Soundblaster Digital Stereo (IEC958)
Passthrough output Device: CA0106 IEC958

I've got perfect digital sound out, the receiver locked on DTS and everything was ok. What I still had to resolve was to make XBMC run in full screen on my TV (which is setup as secondary display using NVIDIA's twinview setting).
So I've started working on that. Before doing anything I've made a backup for xorg.conf and then I've started editing it following different posts and tutorials. I've even ended up having the 2 displays configured to have their own X server but XBMC didn't run in full screen on my TV no matter what. So I've decided to call it a night, I've reverted to the backup xorg.conf file and shutdown the computer and then went to sleep. In the morning when I woke up I've powerd on the computer and guess what? Digital output wasn't working anymore in XBMC. When starting the DTS movie I've got a popup message saying that "failed to initialize sound device..." and the movie stated but without any sounds. Changing from digital to analog worked but this is not what I wanted.

After lots and lots of days of searching through posts and trying all sorts of things I've decided to post here and get some help.

Let me give you some tests examples and their outcome:

Test1
XBMC configured as below:

Audio Output: Optical/Coax
Speaker Configuration: 5.0
Dolby Digital and DTS capable receiver: on
Output Audio Device: CA0106 Soundblaster Digital Stereo (IEC958)
Passthrough output Device: IEC958

Sound Preferences:
CA0106 Soundblaster
ProfileBig Grinigital Stereo (IEC958) output/Analog stereo input

start XBMC
start DTS movie....result: failed to initialize audio device.

The XBMC_crashlog contains:
Code:
15:31:02 T:2776677232 M:2632155136   DEBUG: PulseAudio: Found CA0106 Soundblaster Digital Stereo (IEC958) with devicestring pulse:alsa_output.pci-0000_05_02.0.iec958-stereo@default
15:31:02 T:3057039232 M:2632155136 WARNING: Failed to find previously selected audio sink

....

15:42:52 T:3057039232 M:2605543424   DEBUG: Building didl for object '/media/G_Drive/Download SABnzbd/complete/Movies/-= HD =-/Chloe.2009.BluRay.720p.DTS.x264-CHD/chloe.2009.bluray.720p.dts.x264-chd.mkv'
15:42:52 T:2813561712 M:2610814976   ERROR: Initialize - failed to open custom device iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 (error:Device or resource busy), retry with default iec958
15:42:52 T:2813561712 M:2610814976   ERROR: Initialize - pcm_open_lconf, alsa error: -16 - Device or resource busy
15:42:52 T:2813561712 M:2610814976   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
15:42:52 T:2813561712 M:2610814976   DEBUG: RemoveActiveDevice - Removing device 2
15:42:52 T:2813561712 M:2610814976   DEBUG: CGUIAudioManager::Initialize
15:42:52 T:2813561712 M:2610679808   ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
15:42:52 T:2813561712 M:2610679808   DEBUG: RemoveActiveDevice - Removing device 1
15:42:52 T:2813561712 M:2610679808   DEBUG: CGUIAudioManager::DeInitialize

As you can see the AESx parameters are wrong.

Full crashlog here: http://pastebin.com/g0Hvdq9N

Test 2

XBMC configured as below:

Audio Output: Optical/Coax
Speaker Configuration: 5.0
Dolby Digital and DTS capable receiver: on
Output Audio Device: CA0106 Soundblaster Digital Stereo (IEC958)
Passthrough output Device: IEC958

Sound Preferences:
CA0106 Soundblaster
Profile:Analog Stereo Duplex

Start XBMC. Checking System Settings the Audio Output Device changed to:
pulse:alsa_output.pci-0000_05_02.0.iec958-stereo@default.
Start DTS movie....result..failed to initialize audio device

logs contain:

Code:
5:49:28 T:2778618736 M:2628263936   DEBUG: PulseAudio: Found CA0106 Soundblaster Analog Stereo with devicestring pulse:alsa_output.pci-0000_05_02.0.analog-stereo@default
15:49:28 T:3056809856 M:2628136960 WARNING: Failed to find previously selected audio sink

.....
15:52:47 T:2806905712 M:2609434624   ERROR: Initialize - failed to open custom device iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 (error:Device or resource busy), retry with default iec958
15:52:47 T:2806905712 M:2609434624   ERROR: Initialize - pcm_open_lconf, alsa error: -16 - Device or resource busy
15:52:47 T:2806905712 M:2609434624   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
15:52:47 T:2806905712 M:2609434624   DEBUG: RemoveActiveDevice - Removing device 2
15:52:47 T:2806905712 M:2609434624   DEBUG: CGUIAudioManager::Initialize
15:52:47 T:2806905712 M:2609172480   ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
15:52:47 T:2806905712 M:2609172480   DEBUG: RemoveActiveDevice - Removing device 1
15:52:47 T:2806905712 M:2609172480   DEBUG: CGUIAudioManager::DeInitialize
15:52:47 T:2806905712 M:2609172480   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
15:52:47 T:2806905712 M:2609172480   DEBUG: RemoveActiveDevice - Removing device 0
15:52:47 T:2806905712 M:2609172480   DEBUG: CNullDirectSound::Initialize - Channels: 2 - SampleRate: 48000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough true - audioDevice: iec958
15:52:47 T:2806905712 M:2609172480   DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback

Full crashlog here: http://pastebin.com/wfqTyE2c

Please let me know if you need anything else.
Thanks in advance
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Passthrough working with mplayer but not xbmc0