• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 15
Linux Almost solved: PROPER Dual Audio on Linux
#31
remove the last ) on link https://github.com/xbmc/xbmc/pull/2097
Reply
#32
(2013-02-01, 22:13)Hawaltie Wrote: For some reason I am not able to select the audio device 'default'. The system settings only show 3 devices, HDMI, SPDIF and Analog and no default.
My current config is:
- ZBox AD12
- Openelec 2.99.2
This fix (2097 (PR)) on github seems to be related.

I corrected the link in this post.
Reply
#33
(2013-02-02, 08:04)Hawaltie Wrote:
(2013-02-01, 22:13)Hawaltie Wrote: For some reason I am not able to select the audio device 'default'. The system settings only show 3 devices, HDMI, SPDIF and Analog and no default.
My current config is:
- ZBox AD12
- Openelec 2.99.2
This fix (2097 (PR)) on github seems to be related.

I corrected the link in this post.

Hmm while the fix sounds OSX-related you might be right. Haven't had a chance to try much recently. You could try to replace the name of the device from '!default' to 'Dual' - not sure if that would work but I would try that first.

System: Kodi on NVidia Shield 2015
Video: Panasonic AE3000 Projector / Samsung 46" LCD
Audio: Quad 2912 on Nord DM500Up with Marantz 7010 receiver.
Reply
#34
Tried that already, but no effect. Are you using an OPENELEC nightly build? I could try that.
Reply
#35
(2013-02-02, 23:52)Hawaltie Wrote: Tried that already, but no effect. Are you using an OPENELEC nightly build? I could try that.

No, currently I'm on the main RC.. (and I haven't checked if it works currently or not.... sorry, been swamped).
System: Kodi on NVidia Shield 2015
Video: Panasonic AE3000 Projector / Samsung 46" LCD
Audio: Quad 2912 on Nord DM500Up with Marantz 7010 receiver.
Reply
#36
(2013-02-01, 22:13)Hawaltie Wrote: For some reason I am not able to select the audio device 'default'. The system settings only show 3 devices, HDMI, SPDIF and Analog and no default.
My current config is:
- ZBox AD12
- Openelec 2.99.2
This fix (2097 (PR)) on github seems to be related.

I have the same issue (no "default" choice in the device list). I was, however, able to get my "HDMI" option to work simply by removing pulseaudio (and rebooting). I don't know why I had it installed, but after removing it, the HDMI option appears to be using my default defined in .asoundrc.
Reply
#37
(2013-02-06, 18:16)SorryGoFish Wrote:
(2013-02-01, 22:13)Hawaltie Wrote: For some reason I am not able to select the audio device 'default'. The system settings only show 3 devices, HDMI, SPDIF and Analog and no default.
My current config is:
- ZBox AD12
- Openelec 2.99.2
This fix (2097 (PR)) on github seems to be related.

I have the same issue (no "default" choice in the device list). I was, however, able to get my "HDMI" option to work simply by removing pulseaudio (and rebooting). I don't know why I had it installed, but after removing it, the HDMI option appears to be using my default defined in .asoundrc.

Actually, when I have it "working" out of both speakers, after about 5 minutes of running XBMC floods the log with thousands of CAESinkALSA errors.

I haven't timed it exactly, but it's very consistent. After a few minutes, without fail (TV on or off, playing a movie or not) the log begins to grow out of control.


Reply
#38
Can one of the Openelec guys in this thread help me.

heres the results of aplay:

Code:
Card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
   Sub Devices: 1/1
   Subdevice #0: subdevice #0
Card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
   Subdevices: 0/1
   Subdevice #0: subdevice #0

I'm running Openelec 2.99.2 on an Arctic MC001.

Out of the box I could get 2 Channel audio on the TV via HDMI which is what I want.
By changing options in the audio menu I could get DD5.1 audio on my non HDMI or HD Audio receiver (Sony DB1080) via Optical cable.

I would like to enable both at the same time so that one doesn't have to mess around in the audio menu to switch. I can do this quickly but WAF means having to change audio menu settings isn't tenable.

I thought I might be able to manage this hack myself by following the OP's guide but it looks like he enables 5.1 on HDMI and 2.0 on Toslink/Optical which is the reverse of what I need. I need 2.0 on the HDMI and 5.1 on the Optical.

I am lost and don't know what to edit in the OP's code nor what setting to make in Openelec.

Can anyone help.

Look I'll even settle for 2.0 on both HDMI and Optical at the same time and let the Amps Dolby Prologic 2 create Psuedo surround if its the only way to get sound from the TV and Reciever at the same time.

Thanks in advance for any assistance
Reply
#39
As it stands I'm not sure if 2.99.2 supports dual audio, due to what I *think* is a bug in the latest version. Can someone confirm it still works for them? DId they have to modify anything?

On the other hand, I can answer your question, the name of the audio devices at the bottom of the file isn't important. What you should do is put your optical device in the "pcm.hdmi_hw" section, and put your actual HDMI device in the "pcm.dac_hw" section.

You could rename the names but it's only a name.
System: Kodi on NVidia Shield 2015
Video: Panasonic AE3000 Projector / Samsung 46" LCD
Audio: Quad 2912 on Nord DM500Up with Marantz 7010 receiver.
Reply
#40
Hi, great stuff!

I have the predicament that i need to output to all three devices on my Asrock ION 330, understand the basics of the routing tables here, but not everything.

So if anyone have the setup for enabeling all 3 devices and could share them (or give me a hand in how to make the conf file) it would be most appreciated.

This is the output for aplay:
Code:
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Thanks.
Reply
#41
(2013-02-18, 17:53)Sorcer Wrote: <snip>

Well, I'm a little busy this week, so you will have to do some legwork. Can you first confirm the setup works for 2 destinations? If it works we can split to 3.
System: Kodi on NVidia Shield 2015
Video: Panasonic AE3000 Projector / Samsung 46" LCD
Audio: Quad 2912 on Nord DM500Up with Marantz 7010 receiver.
Reply
#42
I think puntloos is right. I'll wait till the final version of OE3.0 will be available, and then I'll try again.
Reply
#43
puntloos: I think that it works better than expeceted, at least with DTS streams, I had some problems with AC3 in the beginning ("lagg" as best i can tell). I even managed to get the AUX working by just "fidgeting around" a bit. In case that remains working i will post the full conf file and XBMC settings.

But I'm not convinced it will: since I see no reason why optical even has audio since the conf say it should not... (amended the conf file instead of replaceing it).

Update: The audio is persistently working: BUT it is getting "spikes" ever 2-4 minutes: more noticable on Optical than HDMI/AUX. Loosing the audio for 1-2 seconds (actually missing what people are saying). Presenting advancedsettings/asound.conf and XBMC settings (added tomorrow).

Any suggestions to correcting this by the way?

aplay -l output:
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

asound.conf
Code:
# downmixing to 2 channels
pcm.xbmc_71to2 {
  @args.0 SLAVE
  @args.SLAVE {
    type string
    default "default"
  }
  type plug
  slave.pcm $SLAVE
  slave.channels 2
  route_policy duplicate
  ttable.0.0 1          # front left speaker
  ttable.1.1 1          # front right speaker
  ttable.2.0 0.7        # rear left speaker
  ttable.3.1 0.7        # rear right speaker
  ttable.4.0 0.7        # center to left mapping
  ttable.4.1 0.7        # center to right mapping
  ttable.5.0 0.5        # LFE (base) to left mapping
  ttable.5.1 0.5        # LFE to right mapping
  ttable.6.0 0.6        # SL to left mapping
  ttable.7.0 0.6        # SR to right mapping
}

# downmixing to 2 channels
pcm.xbmc_51to2 {
  @args.0 SLAVE
  @args.SLAVE {
    type string
    default "default"
  }
  type plug
  slave.pcm $SLAVE
  slave.channels 2
  route_policy duplicate
  ttable.0.0 1          # front left speaker
  ttable.1.1 1          # front right speaker
  ttable.2.0 0.7        # rear left speaker
  ttable.3.1 0.7        # rear right speaker
  ttable.4.0 0.7        # center to left mapping
  ttable.4.1 0.7        # center to right mapping
  ttable.5.0 0.5        # LFE (base) to left mapping
  ttable.5.1 0.5        # LFE to right mapping
}

# downmixing to 2 channels
pcm.xbmc_50to2 {
  @args.0 SLAVE
  @args.SLAVE {
    type string
    default "default"
  }
  type plug
  slave.pcm $SLAVE
  slave.channels 2
  route_policy duplicate
  ttable.0.0 1          # front left speaker
  ttable.1.1 1          # front right speaker
  ttable.2.0 0.7        # rear left speaker
  ttable.3.1 0.7        # rear right speaker
  ttable.4.0 0.7        # center to left mapping
  ttable.4.1 0.7        # center to right mapping
}
# 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

# !!!! !!!!!! Renamed the pcm to see if it would show in XBMC: it did NOT.
pcm.!AWdef {
        type plug
        slave {
                pcm "both_digital"
        }
}

# First we create a 'both' route, that has 12 channels
pcm.both_digital {
        type route
        slave {
                pcm multi
                channels 12
        }
        # And we route the channels 1:1
        # 6 inputs (0-5) get mapped into 12 outputs (0-11)
        # (this is how we copy channels)
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.2.2 1.0
        ttable.3.3 1.0
        ttable.4.4 1.0
        ttable.5.5 1.0
        ttable.0.6 1.0
        ttable.1.7 1.0
        ttable.2.8 1.0
        ttable.3.9 1.0
        ttable.4.10 1.0
        ttable.5.11 1.0
}

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

pcm.multi {
        type multi
        slaves.a {
                pcm "hdmi_hw"
                channels 6
        }
        slaves.b {
                # virtual dac still has 6 channels
                # although I suppose I could try making it 2
                pcm "dac_virtual"
                channels 6
        }

    # Bind stuff to the HDMI outputs
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave a
        bindings.2.channel 2
        bindings.3.slave a
        bindings.3.channel 3
        bindings.4.slave a
        bindings.4.channel 4
        bindings.5.slave a
        bindings.5.channel 5

        # And to the DAC outputs
        bindings.6.slave b
        bindings.6.channel 0
        bindings.7.slave b
        bindings.7.channel 1
        bindings.8.slave b
        bindings.8.channel 2
        bindings.9.slave b
        bindings.9.channel 3
        bindings.10.slave b
        bindings.10.channel 4
        bindings.11.slave b
        bindings.11.channel 5
}

# Since the DAC is 2 channels, we downmix.
pcm.dac_virtual
{
  type route
  slave.pcm dac_hw
  slave.channels 2

  # Front and rear, at 33% of original signal strength
  ttable.0.0 0.33
  ttable.1.1 0.33
  ttable.2.0 0.33
  ttable.3.1 0.33

  # Center channel routing (routed to front-left and front-right),
  # 6dB gaindrop (gain half of main channels) per channel
  ttable.4.0 0.16
  ttable.4.1 0.16

  # LFE channel routing (routed to front-left and front-right),
  # 6dB gaindrop (gain half of main channels) per channel
  ttable.5.0 0.16
  ttable.5.1 0.16
}

# 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 1
        device 3
        channels 2
# !!!! !!!!!! !!!!!  Here i changed it to 2 channels: 6 worked as well: but since it was going to Stereo TV speakers i figured it was enough with 2. I still dont know how the optical audio "gets out".
}

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

advancedsettings.xml:
Code:
<advancedsettings>
  <useddsfanart>true</useddsfanart>
  <cputempcommand>cputemp</cputempcommand>
  <gputempcommand>gputemp</gputempcommand>
  <samba>
    <clienttimeout>50</clienttimeout>
  </samba>
  <network>
    <disableipv6>true</disableipv6>
    <cachemembuffersize>30242880</cachemembuffersize>
  </network>
  <audio>
      <resample>0</resample>
      <audiophile>1</audiophile>
      <audiosinkbufferdurationmsec>200</audiosinkbufferdurationmsec>
      <allowtranscode44100>0</allowtranscode44100>
      <streamsilence>1</streamsilence>
      <dont_resample>1</dont_resample>
      <audiophile>1</audiophile>
  </audio>
  <videoscanner>
    <ignoreerrors>true</ignoreerrors>
  </videoscanner>
</advancedsettings>
Reply
#44
Sorcer, you mentioned in the asound.config:
Quote:Renamed the pcm to see if it would show in XBMC: it did NOT.
My question is: how did you configure XBMC to use the asound.conf instead of ignoring it?

By the way, I tried OE 2.99.3: same problem, no default audio can be selected.
Reply
#45
Hopefully the future audioengine feature "Rules-based decisions for output formats based on hardware capabilities" wil be completed soon Rofl
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 15

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