v17 PAPlayer - AudioEngine issues - kernel Oops - System Crash
#1
Hi,

I've been using several Kodi releases, starting from 17 - beta popcornmix up to the official 17.6 under Slackware ARM on a Raspberry Pi2B and was never letting Kodi go online but only using it to play tvheadend streaming locally and local media files (storage), everything on Audio Analogue. During this almost 2 years period I observed very rarely some issues with the audioplayer - PAPlayer on this Pi2B, in that the player suddenly stopped playing a Mp3/flac file. I didn't pay too much attention to this as I was able to resume playing with the next track. In all this time I was trying to use an external USB sound card (Creative X-Fi Go!) and whether I was using PAPlayer (default for local files) or VideoPlayer - MMAL accelerated player (DVB streams - Satellite Radio) in both cases the sound output was distorted  - the sound output was constantly slowing down/speeding up and I ended up using solely the internal audio engine of the Raspberry Pi2B. Additionally, as reported in the following link, I had desync issues while playing DVB Radio streams with OMXPlayer:
https://forum.kodi.tv/showthread.php?tid...pid2580545

This is how I compile and use (configure) Kodi 17 - documented for the Slackware community:
https://www.linuxquestions.org/questions...175613852/

Recently I got a Raspberry Pi0 (present) and also bought one myself, didn't know what to do with them and considered to dedicate one solely for Kodi 17.6. Since under OMXPlayer I was not able to use an external USB Card, I did some soldering and recreated the audio analogue schematics from Raspberry Pi3 and used it on this Pi0 board. I was happy with the sound quality and Kodi performance and started using Kodi online, playing mainly YouTube and radio streams under http in the form of playlists containing records with the following format: http://XXX.XXX.XXX.XXX:port/ , that I saved and opened from within the Music menu in Kodi.
While playing radio streams under a 3G connection that is dropping every 2-3 hours, on which occasions the playing usually resumed once connectivity was reestablished,  I got finally into several kernel oops-es after 2-3 such connectivity drops and had my system crashed - had to unplug the power and start it fresh. Worth to mention that I was using the visualization.spectrum addon, which together with the audio playing was driving the Pi0 CPU crazy - had temperatures exceeding 64C. I suspected that the first Pi0 board would not run stable at this temperature and used the second Pi0, just to experience the same result. Funny enough, while monitoring temperature under the heavy load of PAPlayer & visualization.spectrum I started some memory testing processes and sysbench utilities to artificially add some extra load and drive the CPU over 65C but the temperature was actually dropping at 58C ...
I thought to downgrade my Kodi 17.6 and loaded 17.4 instead, experiencing the same result.
I ended up disabling and uninstalling the visualization.spectrum addon and now the CPU load looks OK and the temperature is in normal range 48-55C, no more kernel Oops but Kodi (both 17.6 & 17.4) is freezing instead and I have to manually kill the process and start it over again.
Here you can find the kernel Oops-es that I collected in the past week:
http://www18.zippyshare.com/v/xrHmqbzb/file.html
And the afferent Kodi logs - with some notes inside:
http://www61.zippyshare.com/v/osRL2VoZ/file.html

I might be wrong but I've noticed a pattern, once this happens the third/fourth time:
Code:
NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:2205)
I got the kernel Ooops and newly, after removing visualization.spectrum, the Kodi freeze.

Now that I'm constantly monitoring Kodi, I got yesterday into one of those rare exceptions in which PAPlayer will suddenly stop playing a local file:
- Kodi 17.6 PAPlayer - playing local files - stops playing - able to resume
Code:
13:03:33.970 T:2966970928   ERROR: ActiveAE::MakeStream - could not create stream
13:03:33.972 T:2966970928   ERROR: Playlist Player: skipping unplayable item: 5, path [/home/kodi-user/Music/track1.flac]
13:03:44.330 T:2966970928   ERROR: ActiveAE::MakeStream - could not create stream
13:03:44.333 T:2966970928   ERROR: Playlist Player: skipping unplayable item: 6, path [/home/kodi-user/Music/btrack2.flac]
13:03:44.613 T:2966970928  NOTICE: Storing total System Uptime
13:03:44.615 T:2966970928  NOTICE: Saving settings
13:03:44.689 T:2966970928  NOTICE: Saving skin settings
13:03:44.703 T:2966970928  NOTICE: stop all
13:03:44.705 T:2966970928  NOTICE: stop player
13:03:44.888 T:2966970928  NOTICE: clean cached files!

Looking for an alternative to PAPlayer I got the mpv-player compiled and created the playercorefactory.xml file with the following content:
Code:
<playercorefactory>
 <players>
   <player name="MPV" type="ExternalPlayer" audio="true" video="false">
     <filename>/usr/local/bin/mpv</filename>
     <hidexbmc>true</hidexbmc>
   </player>
 </players>
 <rules action="prepend">
   <rule name="http" protocols="http" player="MPV" />
 </rules>
</playercorefactory>

It was working, it started playing the online stream (pls file), the audio was at the maximum and I was not able to control anything in Kodi and had to kill it.

Since this PAPlayer issue might be a little difficult to fix, I'd be very thankful if someone could help me with a proper playercorefactory.xml syntax/format to use the external mpv player as default.

Thanks!
Reply
#2
I was wrong about Kodi 17.4 behavior in my original post and I do apologize for any confusion resulted from this. I'm using a script to build Kodi and mistakenly I compiled the Kodi 17.5 source, named the resulted package as Kodi 17.4 and used it. During my tests, being captivated by the beautiful Kodi splash screen, I omitted to read the actual version under the logo and in the Kodi logs I was focusing only on the PAPlayer behavior - never looked after the version in the log header.

Kodi 17.4 is stable and performing well (running and playing, recovering from network disconnections, already for ~30 hours), network connectivity issues while playing online audio streams are not generating any kernel Ooops-es or freezing the Kodi GUI/ Kodi process. The only versions that are apparently affected are 17.5 and 17.6. I've noticed that there were changes in the audio output code in Kodi 17.5:
https://kodi.tv/article/kodi-v175-final-...unch-fixes
and I suspect that these might be the cause of issues I reported in my original post.

Worth to mention that I'm always compiling and using Kodi together with its corresponding FFMPEG release, in the case of Kodi 17.4 (the well performing one) the sources I used were:
https://github.com/xbmc/xbmc/archive/17....ton.tar.gz
https://github.com/xbmc/FFmpeg/archive/3...7.4.tar.gz

On the external USB Audio Card issue (sound is slowing down - speeding up) I might have found some interesting records in my last Kodi logs:
Code:
10:17:33.602 T:2692551664 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
10:17:53.926 T:2692551664   ERROR: CCurlFile::Stat - Failed: Timeout was reached(28) for http://XXX.XXX.XXX.XXX:port/;
11:03:53.000 T:2819527664   ERROR: COMXCoreComponent::WaitForOutputDone OMX.broadcom.audio_mixer wait event timeout
11:03:53.001 T:2819527664   ERROR: CActiveAEResamplePi::Resample m_omx_mixer.WaitForOutputDone result(0x80001011)
11:39:55.598 T:2936210416  NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:2205)
13:45:24.649 T:2700940272  NOTICE: Previous line repeats 2 times.

While playing with PAPlayer, what exactly is OMX.broadcom.audio_mixer and Resample m_omx_mixer doing? I only got this once in a lot of pages of Kodi logs. Is this Raspberry specific build target of Kodi not using the external USB Audio card clock if this card is used, but the internal one? This is what I'm referring to:
https://www.edn.com/design/consumer/4376...-USB-Audio
https://www.silabs.com/documents/public/...lified.pdf
http://www.cypress.com/file/122521/download

Many thanks in advance for looking into this!
Reply

Logout Mark Read Team Forum Stats Members Help
PAPlayer - AudioEngine issues - kernel Oops - System Crash0