[LINUX] Problems switching from Analog to Digital over SPDIF? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: [LINUX] Problems switching from Analog to Digital over SPDIF? (/showthread.php?tid=62165) |
[LINUX] Problems switching from Analog to Digital over SPDIF? - miseryshining - 2009-11-22 I've read all the relevant threads here but couldn't find a working solution. version: 9.11 alpha 2, ubuntu 9.10 This is the situation:
Here is the log where i successfully played DTS content(Eastern.Promises), then successfully switched to analog audio content(Happiness) and failed to switch back to the same DTS content(Eastern.Promises). http://pastebin.com/pastebin.php?dl=m767fda9c this is where it goes wrong (seems it doesn't even try to switch to passthrough here): Code: 02:37:49 T:2928397168 M:1889439744 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(484414693.877551, 0) All help appreciated! - F3d0r - 2009-11-22 Exact same problem here, so bump. - F3d0r - 2009-11-22 Ok I got it to work by explicitly stating the same device for audio and passthrough. In my case SPDIF is on card 0 device 1: custom audio device: plughw:0,1 custom passthrough device: plughw:0,1 This way normal audo and passthrough seems to work via the same SPDIF device without error. The only problem with this setup is that crossfading now fails with the audio init error. So this will work only when disabling crossfading for music :/ - miseryshining - 2009-11-22 F3d0r Wrote:Ok I got it to work by explicitly stating the same device for audio and passthrough. In my case SPDIF is on card 0 device 1: tried that and same result here. crossfading breaks, but switching digital/analog works. Still annoying but it's a step forward - F3d0r - 2009-11-23 With the help of the alsa dmix plugin I also managed to get crossfade working. I just put the following in ~/.asoundrc Code: pcm.dmixer { After this I specified plug:dmixer as audio output device. Result: Anlaog Audio + Crossfading + Passthrough via a single SPDIF device - razo - 2009-11-23 I also ran into some failiures with the stereo / passthrough too. Now after some trying i figured out that for movies my xbmc (9.11 alpha 2 on ubuntu karmic too) for stereo i should use custom iec958 and for passthrough i use the preconfigured iec958 for playing movies just fine. when playing mp3 music i still get this could initialize audio device error. none of the solutions above fixed this for me. - F3d0r - 2009-11-23 Some additional notes: The described solution bypasses PulseAudio and forces XBMC to directly use ALSA. However, there is no need to uninstall or mess with PulseAudio on Ubuntu in any way. @razo Of course youhave to specify the correct device on audio and passthrough for this to work. I really recommend to test the device with aplay -d<device> <yoursample>.wav before messing around in XBMC. - miseryshining - 2009-11-24 F3d0r Wrote:Some additional notes: you know what? YOU ARE AWESOME!! All but menu sounds (which work unless switching to a digtial source) work! Took the liberty to throw your solution on the wiki. Thanks again! - F3d0r - 2009-11-24 Another note: The solution described here is not limited to SPDIF, it will also work for other digital audio sinks like HDMI. - dongioia - 2009-11-24 F3d0r Wrote:Ok I got it to work by explicitly stating the same device for audio and passthrough. In my case SPDIF is on card 0 device 1: In my case, I had to add iec98 instead of plughw:0,1 (wich is the same device, according to aplay -l). By the way, I can hear dts and stereo sounds, but no dolby digital. XBMC gives me "failed to initialize audio settings". - F3d0r - 2009-11-24 dongioia Wrote:In my case, I had to add iec98 instead of plughw:0,1 (wich is the same device, according to aplay -l). The alsa hw plugin communicates directly with the ALSA kernel driver. It depends on the configuration of your virtual iec958 device if this is really the same (I doubt it). If DTS works but DD not you have either unchecked "DD capable receiver" or your receiver is just not capable or does not get the signal. However, if using ubuntu try to configure PulseAudio to not use the SPDIF as output device (sound hardware settings). - dongioia - 2009-11-24 F3d0r Wrote:The alsa hw plugin communicates directly with the ALSA kernel driver. It depends on the configuration of your virtual iec958 device if this is really the same (I doubt it). My receiver is capable to play DD sounds. This problem starts to happen when I switch from Jaunty to Karmic, upgrading xbmc to the latest beta. Previously (jaunty, no pulse, xbmc 9.10, alsa 1.20), using iec958 as output device, I was able to hear everything. I'll try to disable iec958 output in pulseaudio. Thanks for the clue. - dongioia - 2009-11-24 @ F3d0r You were right. I disabled the iec958 output in pulseaudio settings, and everything now is just fine: xbmc plays every kind of audio streams. The downside is that now I can't hear system sounds or sounds from youtube, for example, because my only audio output is the digital one. - lloydsmart - 2009-11-28 YES! My problems with sound are finally solved, thanks to this solution. Thanks! - remb0 - 2009-11-28 can somebody help me>? remco@xbmc:~$ aplay -l **** Lijst van PLAYBACK hardware-apparaten **** kaart 0: NVidia [HDA NVidia], apparaat 0: ALC662 rev1 Analog [ALC662 rev1 Analog] Sub-apparaten: 1/1 Sub-apparaat #0: subdevice #0 kaart 0: NVidia [HDA NVidia], apparaat 1: ALC662 rev1 Digital [ALC662 rev1 Digital] Sub-apparaten: 0/1 Sub-apparaat #0: subdevice #0 kaart 0: NVidia [HDA NVidia], apparaat 3: NVIDIA HDMI [NVIDIA HDMI] Sub-apparaten: 1/1 Sub-apparaat #0: subdevice #0 but in xbmc i have no dts and dd. i have chosen iec958 as output, digital and passtrough i use an optical cable to my receiver Iḿ a linux noob and spend all night I hope I can explain my problem. |