2013-02-26, 09:14
(2013-02-23, 21:05)fnc1 Wrote: Clad. That's odd that its not getting focus. You have a default install of the new mythbuntu?
Not mythbubtu the officially distributed XBMCbutnu, the install is rather vanilla but I have done a few things to customize the OS for the sake of Plex, SAB, Couchpotato and Sickbeard.
Good news is I fixed this but not using traditional means. I found if I launched netflix-desktop without openbox it works fine. Now to the audio issue some are having. This is becuase the XBMCbuntu desktop does not have alsa configured. Its a fairly simple process but I'll be detail oriented to make it easy..
In my case I'm using HDMI to a reciever and needed to have audio from XBMC and XBMCubuntu desktop mixed. .... so!
-First you need to break your audio config in XBMC (this is so we can test it in console as 2 services cant share the same device without mixing, which we setup later) to do this you simply navigate to 'system > system > audio output' and change the 'audio output device' to something OTHER than what works. (in my case I chose an analog device)
-Next you will need to either dump to the virtual console (ALT+CTRL+F1) or ssh to your box (either will work).
-Now we need to determine what audio devices are on your system, we do this with the command:
Code:
aplay -l
It will produce the following output (a map of all sound devices):
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC1200 Analog [ALC1200 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: ALC1200 Digital [ALC1200 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 0/1
Subdevice #0: subdevice #0
Now we need to test which device is the correct one we are going to use the speaker-test command passing it specific instruction to test each card and device.
Since I know I only care about HDMI on my Nvdia GT610 I want card 1 device 3 or 7, for device 3.
Code:
speaker-test -D plughw:1,3
say it was card 5 device 2
Code:
speaker-test -D plughw:5,2
On my configuration I found it as card 1, device 7
If it works you will hear "pink noise" more commonly known as static.
now we know the device which outputs audio!!
Next we need to create or modify the existing /etc/asound.conf file (on my new XBMCbuntu install its not there)
Code:
sudo nano /etc/asound.conf
If the file exists feel free to exit [CTRL-X] and save it 'cp /etc/asound.conf ~/' <-- puts it in your home dir just incase I'm a crazy baboon and you can get back to where you were before.
Anywho back to nano, if its not empty blitz it out by using [CTRL-K] to wipe out each line. Now paste in this crazy mess of code.
Code:
pcm.!default { type plug;
slave.pcm "dmix0"; }
ctl.!default { type hw; card 1; device 7; }
pcm.dsp0 { type plug;
slave.pcm "dmix0"; }
ctl.dsp0 { type hw; card 1; device 7; }
ctl.mixer0 { type hw; card 1; device 7; }
pcm.dmix0 { type dmix;
ipc_key 13759;
slave.pcm "hw:1,7";
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; }
You see the 'hw:1,7' you'll need to change all these entries to what worked for your setup. Ill put links to what all this means (if you care).
Lets finish up in nano:
quit [CTRL-X]
save 'Y' and [ENTER]
The great news is 'speaker-test' reads the alsa global configuration file '/etc/asound.conf' live so theres no need to reboot or reload services (typically) so if you made a booboo or want to play around feel free to just re-edit the file and test away!
Now, a test to make sure the ubuntu system can play sounds using the configuration, this time we dont want to specify hardware or plugins we just want the configuration file to tell the 'speaker-test' binary what to do ... so ....
Code:
speaker-test
if it works you'll get sound out both your front speakers! If you want to test the 2 front channels
Code:
speaker-test -c2
You cant test all your surround sound channels because this sound is being down mixed to only two channels, dont worry this is only for apps that your not choosing the dsp0 channel (dont worry I'll explain next). If you want to learn about upmixing to 5.1 for applications, google 'alsa upmix examples'.
Unfortunately XBMC doesn't read the channel data from alsa live so a reboot will be required (yes a reboot, not just a restart of XBMC, you can probably find a way to restart everything to get around this ... well this is just a quick tutorial).
Code:
sudo reboot
Once XBMC is back up navigate back to System > System > Audio Output;
For 'Audio Output Device' find the option which includes (dsp0) mine looks like 'HDA NVidia (dsp0) HDMI 1'
For 'Passthru output device' if you changed it (which there was no need to) set it back to your same device mine looks like 'HDA NVidia, PIO SC-1222 on HDMI'
dsp0 is mapped to send audio directly to the output device (HDMI in my case) so there is no resampling or downmixing, everything should work just as it did.
Here is a link to details on ALSAs configuration and will help if you need to tweak anything.
BTW:
How is the smoothness of the video for everyone on FRODO, I'm not too happy it seems its about 18-20 FPS, I tried the latest experimental NVidia drivers and didn't see any improvement. I tested in XBMCbuntu (desktop) and see the same thing, I also applied all the PPA available updates as they have come out too.
Sad thing is I may still force myself to use this as I cant bring myself to plug my AppleTV back in