2010-10-12, 16:33
Temar Wrote:Just out of curiosity: Why do you need to use the SoundBlaster? When using digital output in passthrough mode the sound device should not matter - you should get the same output quality with the onboard soundchip.
The onboard sound chip is a coaxial connection. I've been using the toslink connections merely out of personal preference. I suppose I can juggle around some wires and make room for another coaxial if that ends up being the answer.
Temar Wrote:And what does "aplay -l" list? If you use "aplay -L" it lists virtual devices as well. Virtual devices might downmix the audio. To get the real hardware devices, use "aplay -l". Maybe XBMC sends its output to a virtual ALSA device, which would explain why you only get stereo output. If we know the correct hardware device we can create a virtual device manually which will pass its data directly to the hardware.
Code:
xbmc@(none):~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: XFi [Creative X-Fi], device 0: ctxfi [Front/WaveIn]
Subdevices: 7/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: XFi [Creative X-Fi], device 1: ctxfi [Surround]
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: XFi [Creative X-Fi], device 2: ctxfi [Center/LFE]
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: XFi [Creative X-Fi], device 3: ctxfi [Side]
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: XFi [Creative X-Fi], device 4: ctxfi [IEC958 Non-audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Temar Wrote:And what happens if you press F6 in this screen? Can you actually select other sound devices?
- (default)
0 Creative X-Fi
1 MPU-401 UART
enter device name...
Temar Wrote:That's odd. If XBMC is in passthrough mode it should not downmix. Otherwise it would not be the passthrough mode. What happens if you try to use the volume controls, does XBMC still confirm the passthrough mode or is it downmixing?
This is only the multichannel .wav file that I played in the music player. If I pop in a vob or avi with dts/dd it doesn't downmix, it just goes null.
Temar Wrote:Now that you have at least one working configuration you should enable XBMC's debug mode (System->System->Debugging) and check the logfile. Maybe there is an error message which explains the stereo mode.
Whoa, this debug thing, very clever.
Code:
DEBUG: Open - probing detected format [dts]
08:37:01 T:3054425984 M:1954267136 DEBUG: Open - av_find_stream_info starting
08:37:01 T:3054425984 M:1954013184 ERROR: ffmpeg[B60ED780]: [dca] Not a valid DCA frame
08:37:01 T:3054425984 M:1953378304 DEBUG: ffmpeg[B60ED780]: [dts] max_analyze_duration reached
08:37:01 T:3054425984 M:1953378304 DEBUG: ffmpeg[B60ED780]: [dts] Estimating duration from bitrate, this may be inaccurate
08:37:01 T:3054425984 M:1953378304 DEBUG: Open - av_find_stream_info finished
08:37:01 T:3054425984 M:1953378304 INFO: ffmpeg[B60ED780]: Input #0, dts, from '/home/xbmc/Music/Norrlanda.wav':
08:37:01 T:3054425984 M:1953378304 INFO: ffmpeg[B60ED780]: Duration: 00:04:25.00, bitrate: 1411 kb/s
08:37:01 T:3054425984 M:1953378304 INFO: ffmpeg[B60ED780]: Stream #0.0: Audio: dca, 44100 Hz, 5.1, s16, 1411 kb/s
08:37:01 T:3054425984 M:1953378304 DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Opening
08:37:01 T:3054425984 M:1953378304 INFO: CDVDAudioCodecPassthrough::Open - disabled passthrough due to sample rate not being 48000
08:37:01 T:3054425984 M:1953378304 DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Failed
I'm not terribly concerned with that (multichannel .wav) just yet, and it seems like it's going to be easy to fix, perhaps add additional passthrough sample rates to a config file somewhere, so, let's scroll down a little and see what the deal is with our .vob video.
I took your advice to heart yesterday and did a significant amount of messing around with the audio output. The closest I was able to come is with the passthrough set to "Creative X-Fi iec958" which results in nasty, modem like noises.
Here's my log now.
http://pastebin.com/k5ZdbuRd
It looks like it's detecting the correct format.
Code:
INFO: ffmpeg[4A33EB70]: Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Code:
#
DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Opening
#
09:01:58 T:1244916592 M:1880289280 INFO: CDVDAudioCodecPassthroughFFmpeg::SetupMuxer - Trying to setup spdif muxer
#
09:01:58 T:1244916592 M:1880289280 INFO: CDVDAudioCodecPassthroughFFmpeg::SetupMuxer - spdif muxer ready
#
09:01:58 T:1244916592 M:1880289280 DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Opened
Code:
NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
Code:
#
DEBUG: Initialize - using alsa device iec958:CARD=XFi:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
#
09:01:58 T:1214249840 M:1875177472 ERROR: Initialize - failed to open custom device iec958:CARD=XFi:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 (error:Invalid argument), retry with default iec958:CARD=XFi
#
09:01:58 T:1214249840 M:1875050496 DEBUG: CALSADirectSound::Initialize - packet size:2048, packet count:16, buffer size:8192
#
09:01:58 T:1214249840 M:1875050496 DEBUG: CALSADirectSound::Initialize - Channels: 2 - SampleRate: 48000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough true - audioDevice: iec958:CARD=XFi
Now I'm just confused. This looks nothing like the device listed in xbmc's config. Maybe it's an alias? How annoying is that? Where did it get "AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2"?
You mentioned being able to create a device once we knew all the right hardware info, a trick that I would certainly love to learn.