• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 15
Linux Almost solved: PROPER Dual Audio on Linux
#46
This is all very disappointing to me. Half a year ago I decided to move from my dune player to XBMC mainly because of the user friendly remote control for playing music and video. Now I find myself in some kind of deadlock situation: due to need of dual audio (HDMI (movies) + SPDIF(music) ) I am forced to use OE 2.0 having the disadvantage of a broken resume function, which is probably solved in OE 3.0 due to the latest AMD drivers. Perhaps moving to XBCMBuntu is an option, but I don't know if I'm able to select XBMC 11 (EDEN) instead of XBMC 12 (Frodo). Perhaps I just have to be patient, or increase my coding capabilities Big Grin
Reply
#47
(2013-03-02, 22:13)Hawaltie Wrote: This is all very disappointing to me. Half a year ago I decided to move from my dune player to XBMC mainly because of the user friendly remote control for playing music and video. Now I find myself in some kind of deadlock situation: due to need of dual audio (HDMI (movies) + SPDIF(music) ) I am forced to use OE 2.0 having the disadvantage of a broken resume function, which is probably solved in OE 3.0 due to the latest AMD drivers. Perhaps moving to XBCMBuntu is an option, but I don't know if I'm able to select XBMC 11 (EDEN) instead of XBMC 12 (Frodo). Perhaps I just have to be patient, or increase my coding capabilities Big Grin

Have you tried defining your dual audio device to be the !default alsa device?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#48
(2013-03-03, 00:20)nickr Wrote: Have you tried defining your dual audio device to be the !default alsa device?

My Config:
Zotac AD12, 4G memory, 500 Gb Harddrive
Openelec 2.99.4 (Openelec 3 RC4)

This is what I tried:

1. used the description of puntloos and I adjusted his asound.conf to my audio config using aplay -l. I put this in the ./storage/.config/asound.conf folder.
2. I tried to change my audio device in system settings to default, but this option is not available.
a. I tried to change /storage/.xbmc/userdata/guisettings.xml and manually change the audio device to default (
<audiodevice>ALSA:default</audiodevice>). No effect, the option default can not be selected)
3. Added the suggested advanced settings (/storage/.xbmc/userdata/advancedsettings.xml)

Did I forget something?
Reply
#49
OK I've bought a cable I needed to connect my new player to my DAC. Once I have it I'll see if I get dual audio going again, but who knows. No promises, obviously.
System: Kodi on NVidia Shield 2015
Video: Panasonic AE3000 Projector / Samsung 46" LCD
Audio: Quad 2912 on Nord DM500Up with Marantz 7010 receiver.
Reply
#50
I'm following closely, I just made the switch to OpenELEC from Windows in hopes of dual audio output!
Reply
#51
I have the same issue as Hawaltie using XBMCbuntu 12.

My /etc/asound.conf file correctly defines the default audio device to produce dual output and I can confirm this is working using speaker-test -c6.

However, there is no way to make Frodo use the default audio device, or any custom audio device. It only lists the motherboard / graphics card outputs.

Is there something inherent with the new AudioEngine that means we cannot specify a custom audio device? This method was working perfectly for me in both Dharma and Eden.
Reply
#52
Yes, this would save the hassle of changing settings each time for me nicely.

(2013-02-23, 23:53)ReMi Wrote: Hopefully the future audioengine feature "Rules-based decisions for output formats based on hardware capabilities" wil be completed soon Rofl
Reply
#53
After some digging I have been able to determine that XBMC does enumerate the custom audio devices under certain circumstances. With the setup I require, however, they're not enumerated. I can see the point at which the enumeration fails but I lack the knowledge to determine why this is. Hopefully these logs will provide a clue for someone to help.

Running XBMCbuntu 12 installation with the latest compiled git source. Both logs are after a system reboot.

TV is connected to the HDMI port of the graphics card: http://pastebin.com/cH1iEYBQ
TV is connected to the DVI port of the graphics card: http://pastebin.com/kTTjmANB

When the TV is connected to DVI the custom devices are enumerated correctly and appear in the audio devices list. Using the HDMI output the custom devices are tested but fail at the snd_pcm_hw_params_any() function.

So the question is, why does use of the HDMI port stop snd_pcm_hw_params_any() from returning successfully on custom devices?
Reply
#54
I just tried OPENELEC 3.0, because I noticed that the default device problem related to OSX was fixed in the latest OE/XBMC release. However, I was still not able to select the default device. I tried both HDMI and DVI, but did not see any difference. To complete my post, hereby my setup:

Zotac AD06: SPECS
Chipset AMD M3L
CPU AMD E2-1800 APU (dual-core) (1.7 GHz) (GPU AMD Radeon™ HD 7340 integrated)
Memory: 4G ddr 3, 1333 Mhz

Code:
aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Reply
#55
Works perfectly on my Asrock ION 330 HT BD!

Thank you very much!
Reply
#56
Is it AMD related Huh

Next week I will reinstall OPENELEC and see if the problem reoccurs.
Reply
#57
Tried it on the generic build of OE, but no effect. Still no default device.

However, after enabling the logging function I noticed the following in the log file:
Code:
21:00:59 T:3046460032   ERROR: CAESinkOSS::EnumerateDevicesEx - Failed to open mixer: /dev/mixer
21:00:59 T:3046460032  NOTICE: Found 1 Lists of Devices
21:00:59 T:3046460032  NOTICE: Enumerated ALSA devices:
21:00:59 T:3046460032  NOTICE:     Device 1
21:00:59 T:3046460032  NOTICE:         m_deviceName      : hdmi:CARD=Generic,DEV=0
21:00:59 T:3046460032  NOTICE:         m_displayName     : HD-Audio Generic
21:00:59 T:3046460032  NOTICE:         m_displayNameExtra: HDMI
21:00:59 T:3046460032  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
21:00:59 T:3046460032  NOTICE:         m_channels        : FL,FR
21:00:59 T:3046460032  NOTICE:         m_sampleRates     : 32000,44100,48000
21:00:59 T:3046460032  NOTICE:         m_dataFormats     : AE_FMT_S16NE,AE_FMT_S16LE
21:00:59 T:3046460032  NOTICE:     Device 2
21:00:59 T:3046460032  NOTICE:         m_deviceName      : @:CARD=Generic_1,DEV=0
21:00:59 T:3046460032  NOTICE:         m_displayName     : HD-Audio Generic
21:00:59 T:3046460032  NOTICE:         m_displayNameExtra: ALC892 Analog
21:00:59 T:3046460032  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
21:00:59 T:3046460032  NOTICE:         m_channels        : FL,FR
21:00:59 T:3046460032  NOTICE:         m_sampleRates     : 44100,48000,96000,192000
21:00:59 T:3046460032  NOTICE:         m_dataFormats     : AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
21:00:59 T:3046460032  NOTICE:     Device 3
21:00:59 T:3046460032  NOTICE:         m_deviceName      : iec958:CARD=Generic_1,DEV=0
21:00:59 T:3046460032  NOTICE:         m_displayName     : HD-Audio Generic
21:00:59 T:3046460032  NOTICE:         m_displayNameExtra: ALC892 Digital S/PDIF
21:00:59 T:3046460032  NOTICE:         m_deviceType      : AE_DEVTYPE_IEC958
21:00:59 T:3046460032  NOTICE:         m_channels        : FL,FR
21:00:59 T:3046460032  NOTICE:         m_sampleRates     : 32000,44100,48000,88200,96000,192000
21:00:59 T:3046460032  NOTICE:         m_dataFormats     : AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
21:00:59 T:3046460032  NOTICE: load settings...

I don know if it the error is related to the problem(perhaps its not related to ALSA but only to OSS). Somebody? And how does this part of the log file look like in case of a proper functioning dual audio set up?

By the way, when I run the speakertest on the defaultt device, i get the following output:
Code:
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable
Broken configuration for playback: no configurations available: Invalid argument
Setting of hwparams failed: Invalid argument
Reply
#58
(2013-04-01, 17:53)c3po Wrote: Works perfectly on my Asrock ION 330 HT BD!

Thank you very much!

Well... I was a bit too early with my "works perfectly" comment. It worked perfectly for my analog out (although the volume was a bit low compared to "Analog out only", but I think that was due to the downmixing from 6 to 2 channels). And the HDMI sound also did work but it sounded very weird with some high frequency kinda noice filter over it.

The reason for this weird HDMI sound was because I have no HDMI receiver: the HDMI directly goes to my TV which only has stereo speakers. So probably I only heard 2 channels out of a 6 channel configuartion (quite an old TV: Hitachi 42PD8600, or maybe I have some wrong TV sound settings).

I hacked the asound.conf from puntloos to make it work for a both analog & hdmi stereo (2 channels) configuration:

Code:
# asound.conf for Dual Audio - HDMI (5.1) + Stereo out
# by puntloos
# This should allow you to send audio to two devices, one HDMI (for surround) and one other device, which can be digital or even analog outputs
# 1- Location of asound.conf in OpenELEC is ./storage/.config/asound.conf - create or modify that file.  
# 2- Modify the bottom part of the file to match your hardware
#
# update by c3po:
# Reworked the excellent work from puntloos to make it work for a both analog & hdmi stereo (2 channels) configuration
# Can be a good sollution for people that do not have a 5.1 setup (like I have: HDMI goes directly to my TV which has only stereo speakers)

pcm.!default {
        type plug
        slave {
                pcm "both_digital"
        }
}

# First we create a 'both' route, that has 4 channels
pcm.both_digital {
        type route
        slave {
                pcm multi
                channels 4
        }
        # And we route the channels 1:1
        # 2 inputs (0-1) get mapped into 4 outputs (0-3)
        # (this is how we copy channels)
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
}

# Then define a multi device that splits the 4-channel input
# Into 2x 2 output

pcm.multi {
        type multi
        slaves.a {
                pcm "hdmi_hw"
                channels 2
        }
        slaves.b {
                pcm "dac_hw"
                channels 2
        }

        # Bind stuff to the HDMI outputs
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        
        # And to the DAC outputs
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1
}

# And here is my actual hardware
# Note that this is linked to the output of 'aplay -l'
# HDMI output
pcm.hdmi_hw {
        type hw
        card 0
        device 3
        channels 2
}

# Stereo output
pcm.dac_hw {
        type hw
        card 0
        device 0
        channels 2
}

This works for me as far as I've tested it yet (and as a side-effect I have the normal analog out volume again since no downscaling is required anymore).

@Puntloos: Maybe you can find the time to review if this asound.conf file makes any sense? Thank you for providing this DualAudio sollution to us: I couldn't hacked this file without your example (actually I din't know - & still don't - what I was doing exactly Confused)
Reply
#59
Thanks C3po! As soon as the 'Default' option comes availabe in the system --> system settings --> audio output I'll try your config since I have a comparable setup and I don't like downmixing.

One question: how did you configure your audio output settings ( system --> system settings --> audio output); e.g. number of channels etc.
Reply
#60
(2013-04-07, 08:38)Hawaltie Wrote: One question: how did you configure your audio output settings ( system --> system settings --> audio output); e.g. number of channels etc.

See this screenshot of my settings:

Image
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 15

Logout Mark Read Team Forum Stats Members Help
Almost solved: PROPER Dual Audio on Linux1