Quantcast
Channel: Kodi Community Forum - All Forums
Viewing all articles
Browse latest Browse all 84005

Sharing audio with other apps when using AudioEngine

$
0
0
I'm trying to run squeezeslave in the background when using XBMC and sending audio through my optical output. Unfortunately if I start XBMC first, the digital output is not available to squeezeslave, it just doesn't even show up in it's available output device list. Likewise if I squeezeslave first, XBMC can't see the digital audio output.

I used the info from this thread to create an asound.conf file, and while dmix0 became an available device, the behavior is identical, if either one of the apps is using it, then it is completely unavailable to the other, by that I mean it doesn't appear in the list of available devices.

Here's the relevant output from aplay and squeezeslave -L. This output was generated by starting squeezeslave first, so it works, but XBMC now has no audio.

Code:
keith@xbmc:~$ squeezeslave -L
Output devices:
  0: (ALSA) HDA Intel PCH: ALC892 Analog (hw:0,0) (11/46)
  1: (ALSA) HDA Intel PCH: ALC892 Digital (hw:0,1) (11/46)
  3: (ALSA) HDA Intel PCH: HDMI 0 (hw:0,3) (11/46)
  4: (ALSA) HDA Intel PCH: HDMI 1 (hw:0,7) (11/46)
  5: (ALSA) sysdefault (42/46)
  6: (ALSA) front (11/46)
  7: (ALSA) surround40 (11/46)
  8: (ALSA) surround41 (11/46)
  9: (ALSA) surround50 (11/46)
10: (ALSA) surround51 (11/46)
11: (ALSA) surround71 (11/46)
12: (ALSA) iec958 (11/46)
13: (ALSA) spdif (11/46)
14: (ALSA) hdmi (11/46)
15: (ALSA) dsp0 (170/46)
16: (ALSA) dmix0 (170/170)
17: (ALSA) dmix (42/42)
*18: (ALSA) default (170/46)
keith@xbmc:~$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
dsp0
dmix0
sysdefault:CARD=PCH
    HDA Intel PCH, ALC892 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct sample mixing device
dmix:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample mixing device
dmix:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct sample mixing device
dmix:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Hardware device with all software conversions
keith@xbmc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

If XBMC is run first and using the digital output then squeezeslave -L doesn't show the lines beginning with 1, 12, 13, 15, and 16.

And my /etc/asound.conf file:
Code:
pcm.!default            { type                  plug;
                          slave.pcm             "dmix0"; }
ctl.!default            { type hw; card 0; device 1; }

pcm.dsp0                { type                  plug;
                          slave.pcm             "dmix0"; }
ctl.dsp0                { type hw; card 0; device 1; }
ctl.mixer0              { type hw; card 0; device 1; }

pcm.dmix0               { type                  dmix;
                          ipc_key               13759;

                          slave.pcm             "hw:0,1";
                          slave.channels        2;

#                          slave.rate            48000;
#                          slave.period_size     4096;
#                          slave.buffer_size     16384;


                          slave.period_time     84000;
                          slave.buffer_time     340000;

                          # Map only the first two channels
                          bindings.0            0;
                          bindings.1            1; }

I commented out the rate line and the ones below it because squeezeslave crashed when using dmix0 with an error saying the rate was invalid.

Viewing all articles
Browse latest Browse all 84005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>