Kodi Community Forum

Full Version: Yet another audio issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've installed the lastest xbmcbuntu and updated. I do have sound in xbmc but not in chrome/openbox. I've been searching and have yet to find a solution.

Using an nvidia GT610 hdmi for video / audio and not the Intel G530 hdmi. Infact disabled azalia audio in the bios.

cat .asoundrc

Code:
# AUTOUPDATE=True  # change this to disable updating of this file
pcm.!default {
  type plug;
  slave.pcm "hdmi:CARD=NVidia,DEV=1";
}

aplay -l

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I'm using Advanced Launcher with the following script to launch chrome while changing resolution in the process.

Code:
#!/bin/bash
xrandr -s 1280x720
/usr/bin/xbmc-send --action="XBMC.InhibitIdleShutdown(true)"
/usr/bin/xdotool search --name "XBMC Media Center" windowunmap

# turn off screensaver/screenblank
xset s off

# turn off dpms
xset -dpms

openbox &
#/usr/bin/google-chrome --alsa-output-device=plughw:1,3 --kiosk --start-maximized "$1"
/usr/bin/google-chrome --start-maximized "$1"
killall -9 openbox

# turn on dpms
xset +dpms

# turn on screensaver/screenblank
xset s on

/usr/bin/xdotool search --name "XBMC Media Center" windowmap
/usr/bin/xbmc-send --action="XBMC.InhibitIdleShutdown(false)"
xrandr -s 1920x1080

Not sure if this is related but when I close Chrome with ctrl-w, I see this in the log and don't really know what to make of it.

Code:
Oct 30 14:57:35 piggie kernel: [   42.606520] ------------[ cut here ]------------
Oct 30 14:57:35 piggie kernel: [   42.606523] WARNING: CPU: 1 PID: 151 at /build/buildd/linux-3.13.0/fs/proc/generic.c:511 remove_proc_entry+0x139/0x1b0()
Oct 30 14:57:35 piggie kernel: [   42.606524] name 'fs/nfsfs'
Oct 30 14:57:35 piggie kernel: [   42.606525] Modules linked in: joydev autofs4 snd_hda_codec_hdmi dm_multipath scsi_dh ir_lirc_codec lirc_dev ir_mce_kbd_decoder ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder intel_rapl ir_rc6_decoder ir_rc5_decoder ir_nec_decoder x86_pkg_temp_thermal intel_powerclamp rc_rc6_mce snd_hda_intel mceusb snd_hda_codec rc_core kvm_intel snd_hwdep snd_pcm kvm crct10dif_pclmul crc32_pclmul snd_page_alloc ghash_clmulni_intel snd_seq_midi snd_seq_midi_event nvidia(POX) cryptd snd_rawmidi snd_seq snd_seq_device snd_timer psmouse serio_raw snd mei_me soundcore mei lpc_ich drm nfsd auth_rpcgss nfs_acl nfs mac_hid lockd sunrpc fscache lp parport coretemp btrfs xor raid6_pq libcrc32c dm_mirror dm_region_hash dm_log hid_logitech_dj usbhid hid video atl1c wmi ahci libahci
Oct 30 14:57:35 piggie kernel: [   42.606554] CPU: 1 PID: 151 Comm: kworker/u4:5 Tainted: P        W  OX 3.13.0-37-generic #64-Ubuntu
Oct 30 14:57:35 piggie kernel: [   42.606555] Hardware name: ECS H61H2-M2/H61H2-M2, BIOS 4.6.5 01/04/2013
Oct 30 14:57:35 piggie kernel: [   42.606557] Workqueue: netns cleanup_net
Oct 30 14:57:35 piggie kernel: [   42.606558]  0000000000000009 ffff880035f45c80 ffffffff8171ed09 ffff880035f45cc8
Oct 30 14:57:35 piggie kernel: [   42.606560]  ffff880035f45cb8 ffffffff8106773d 0000000000000000 0000000000000005
Oct 30 14:57:35 piggie kernel: [   42.606562]  ffffffffa023c8a8 ffff88011a018b30 0000000000000080 ffff880035f45d18
Oct 30 14:57:35 piggie kernel: [   42.606564] Call Trace:
Oct 30 14:57:35 piggie kernel: [   42.606566]  [<ffffffff8171ed09>] dump_stack+0x45/0x56
Oct 30 14:57:35 piggie kernel: [   42.606568]  [<ffffffff8106773d>] warn_slowpath_common+0x7d/0xa0
Oct 30 14:57:35 piggie kernel: [   42.606571]  [<ffffffff810677ac>] warn_slowpath_fmt+0x4c/0x50
Oct 30 14:57:35 piggie kernel: [   42.606574]  [<ffffffff81229839>] remove_proc_entry+0x139/0x1b0
Oct 30 14:57:35 piggie kernel: [   42.606582]  [<ffffffffa021c4e2>] nfs_fs_proc_net_exit+0x62/0x70 [nfs]
Oct 30 14:57:35 piggie kernel: [   42.606588]  [<ffffffffa02225b2>] nfs_net_exit+0x12/0x20 [nfs]
Oct 30 14:57:35 piggie kernel: [   42.606590]  [<ffffffff8161b409>] ops_exit_list.isra.1+0x39/0x60
Oct 30 14:57:35 piggie kernel: [   42.606593]  [<ffffffff8161bc90>] cleanup_net+0x110/0x250
Oct 30 14:57:35 piggie kernel: [   42.606596]  [<ffffffff810839c2>] process_one_work+0x182/0x450
Oct 30 14:57:35 piggie kernel: [   42.606598]  [<ffffffff810847b1>] worker_thread+0x121/0x410
Oct 30 14:57:35 piggie kernel: [   42.606601]  [<ffffffff81084690>] ? rescuer_thread+0x430/0x430
Oct 30 14:57:35 piggie kernel: [   42.606603]  [<ffffffff8108b492>] kthread+0xd2/0xf0
Oct 30 14:57:35 piggie kernel: [   42.606605]  [<ffffffff8108b3c0>] ? kthread_create_on_node+0x1c0/0x1c0
Oct 30 14:57:35 piggie kernel: [   42.606607]  [<ffffffff8172f77c>] ret_from_fork+0x7c/0xb0
Oct 30 14:57:35 piggie kernel: [   42.606609]  [<ffffffff8108b3c0>] ? kthread_create_on_node+0x1c0/0x1c0
Oct 30 14:57:35 piggie kernel: [   42.606611] ---[ end trace b1aa5a459e5d335f ]---

lspci
Code:
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation H61 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
03:00.0 Ethernet controller: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet (rev c0)

Any help at this point would be greatly appreciated.
Most likely XBMC is holding onto the alsa sink.

You will likely have to get XBMC to release it. I'm not sure how you can do this in shell, but in python it is something like

Code:
import xbmc

def pauseXbmc():
  xbmc.executebuiltin("PlayerControl(Stop)")
  xbmc.audioSuspend()
  xbmc.enableNavSounds(False)
Thanks for the suggestion. I guess I can somehow hack the advanced launcher to put this in but not sure about it.

I would guess you would have to do something like this once returning to xbmc:

Code:
xbmc.audioResume()
xbmc.enableNavSounds(True)

But like you say, not sure how to implement via a bash script.

Edit: just looked at the advanced launcher code and it appears that xbmc.audioSuspend() is implemented so that would not help. Must be my asoundrc file.

Edit: I have setup another system with the exact script and sound works fine in chrome. The only difference being that the system does not have a dedicated gpu and uses the intel g1610. Whereas the error prone system has a gt610 nvidia card.
Anybody willing to help?
Try:

Code:
pcm.!default {
  type plug
  slave {
    pcm "hw:0,7"
    rate 48000
  }
}

Try speaker-test -D plughw:0,7 -c 2

and after the change and reboot:
Try speaker-test -c2

xbmc's audio engine needs to be suspended, also menu sounds be off (prior to suspend)
(2014-10-31, 18:16)fritsch Wrote: [ -> ]Try:

Code:
pcm.!default {
  type plug
  slave {
    pcm "hw:0,7"
    rate 48000
  }
}

Try speaker-test -D plughw:0,7 -c 2

and after the change and reboot:
Try speaker-test -c2

xbmc's audio engine needs to be suspended, also menu sounds be off (prior to suspend)

Thank you fritsch, that seems to work!
I had originally thought this issue was solved but then realized that audio works with the HTML5 embedded player and not flash based videos.

Thoughts on what could be the issue?
No idea. If the html5 player works, then the browser picks up the correct audio device. If the browser's flash plugin decides onto something else - no idea.

Ask in a general purpose distribution forum.
Thanks, I solved the flash issue by appending the following to the google-chrome command in the script:

Code:
--alsa-output-device=plughw:0,7
Yes, that's a good solution if audio device is not blocked. The OpenELEC guys do the same for their chromium addon.