HDMI audio drops intermittently

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

HDMI audio drops intermittently

Unread post by Holzhaus » Wed Feb 04, 2015 11:59 pm

Hi,

my HDMI audio silences intermittently for a short time (~2s) in Kodi (the video continues just fine). If I watch a 2 hour movie this roughly happens about 10 times. I set up my pulseaudio like this (using ArchLinuxARM).

Is this a known issue? Can anyone give me some pointers how to fix this?

Thanks in advance!
Jan

EDIT: As of June 3rd 2015, this issue has been fixed. Update your kernel if you're still experiencing this. And if you happen to meet tobetter, buy him a beer ;)
Last edited by Holzhaus on Sat Jun 13, 2015 11:11 am, edited 1 time in total.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Fri Feb 06, 2015 6:11 am

Don't know if that helps, but this is my dmesg:

Code: Select all

$ dmesg | tail  -n 30
[20918.938523] IEC958 16bit
[20918.973570] 264 ucode swap area: physical address 0x3ec68000, cpu virtual addr f07cd000
[20918.976177] start load orignal firmware ...
[20918.981941] video first pts = 0
[20919.051562] video first pts = 62445cc
[20919.610879] ----aml_hw_iec958_init,runtime->rate=48000--
[20919.610923] audio_set_958_clk, freq=4,
[20919.614668] ----aml_hw_iec958_init,runtime->rate=48000,sample_rate=4--
[20919.621387] iec958 mode PCM16
[20919.624492] IEC958 16bit
[20919.638906] ----aml_hw_iec958_init,runtime->rate=48000--
[20919.638940] ----aml_hw_iec958_init,runtime->rate=48000,sample_rate=4--
[20919.645481] iec958 mode PCM16
[20919.648604] IEC958 16bit
[21422.714063] video first pts = 0
[21422.714534] mem-addr=9a00000,buff_offset=8a00000,buf_start=9b3e000
[21422.721007] 264 ucode swap area: physical address 0x3ec68000, cpu virtual addr f07d3000
[21422.726246] start load orignal firmware ...
[21422.731191] video first pts = 0
[21423.059853] video first pts = 0
[21423.060252] mem-addr=9a00000,buff_offset=8a00000,buf_start=9b3e000
[21423.066022] 264 ucode swap area: physical address 0x3ec68000, cpu virtual addr f07d9000
[21423.072079] start load orignal firmware ...
[21423.077280] video first pts = 0
[21425.018628] video first pts = 0
[21425.019065] mem-addr=9a00000,buff_offset=8a00000,buf_start=9b3e000
[21425.040131] 264 ucode swap area: physical address 0x3ec68000, cpu virtual addr f07df000
[21425.042691] start load orignal firmware ...
[21425.052027] video first pts = 0
[21425.683355] video first pts = 8950e90

User avatar
odroid
Site Admin
Posts: 32672
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 208 times
Been thanked: 362 times
Contact:

Re: HDMI audio drops intermittently

Unread post by odroid » Fri Feb 06, 2015 11:22 am

The dmesg doesn't show any clue..

Is that problem popping for all the movie files? or a few of specific video or audio codec included movies?

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Fri Feb 06, 2015 3:34 pm

Yes, it happens with all videos (e.g. with YouTube Videos, with H.264/AC3 videos I stream from my NAS via NFS, with H.264/DTS videos played from a locally mounted USB flash drive). It also happens no matter if passthrough is enabled in Kodi.

I'm also owning a Raspberry Pi Model B (rev 2.0) and I've had issues with it, too: It also had HDMI issues, but instead of 1-2 seconds silence, the pitch raised a bit for ~0,1s (almost unnoticable). When I updated XBMC on my Pi from Frodo to Gotham-RC1, I even had 1-2s audio cuts AND black screen for that duration. This was then fixed and returned to the much more subtle "raising pitch" behavior in later releases. I read somewhere that this might be a HDMI handshake issue.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Mon Feb 09, 2015 2:38 am

This issue still persists with the latest kernel. Is it possible that this is a buffer underrun problem?

kucho
Posts: 92
Joined: Sun Jan 25, 2015 4:16 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by kucho » Mon Feb 09, 2015 8:10 pm

Is something like the problem described in this thread?

http://forum.odroid.com/viewtopic.php?f=112&t=8764

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Mon Feb 09, 2015 11:10 pm

Videos works fine for me. Also, I'm not using an AV receiver. My C1 is directly connected to my TV (Sony Bravia KDL-40Z4500). So I don't think that this issue is related. I'm using the suggested MicroHDMI-to-HDMI cable from Pollin (thus I had to ground my MicroHDMI port with a paperclip to get a signal at all).

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Thu Feb 12, 2015 7:36 am

Does nobody know how to fix this?

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Tue Feb 17, 2015 12:19 am

Still having that issue with latest pulseaudio v6.0. I'd like to check if this also occurs with plain ALSA. Is it possible to use Kodi without pulse yet?

User avatar
streetboy
Posts: 196
Joined: Tue Feb 26, 2013 6:43 pm
languages_spoken: english
ODROIDs: ODROID-X,U2,XU3-Lite
C1, XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by streetboy » Tue Feb 17, 2015 12:36 am

Can you share a sample video file to reproduce the issue?

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Tue Feb 17, 2015 2:05 am

It happens with all video files (e.g. with YouTube Videos, with H.264/AC3 videos I stream from my NAS via NFS, with H.264/DTS videos played from a locally mounted USB flash drive). I suspect that this is not related to any particular audio/video codec, but a driver/pulseaudio buffer underrun issue of some kind.

Just in case you need it, here's my audio setup:

Code: Select all

$ cat /var/lib/kodi/.config/pulse/default.pa
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
#load-sample-lazy pulse-hotplug /usr/share/sounds/freedesktop/stereo/device-added.oga
#load-sample-lazy pulse-coldplug /usr/share/sounds/freedesktop/stereo/device-added.oga
#load-sample-lazy pulse-access /usr/share/sounds/freedesktop/stereo/message.oga

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
load-module module-alsa-sink
load-module module-alsa-source device=hw:0,1
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=x11-bell

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

### Make some devices default
#set-default-sink output
#set-default-source input

$ cat /var/lib/kodi/.asoundrc               
pcm.!default {
  type plug
  slave {
    pcm "hw:0,1"
  }
}
ctl.!default {
  type hw
  card 0
}

slaav
Posts: 17
Joined: Tue Feb 03, 2015 10:58 pm
languages_spoken: english, polish
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by slaav » Mon Feb 23, 2015 11:18 pm

I can confirm this issue. I've got C1 with original HDMI cable from HK connected to Samsung TV. My friend, however, doesn't have this "feature" on similar setup.

I don't remember having this issue when I was using UBS sound. But now (probably Kodi bug) I can use only HDMI audio and I'm facing similar problems as @Holzhaus

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Sun Mar 01, 2015 4:24 pm

This problem is really annoying... Anyone got a clue what's the cause of this?

mdrjr
Site Admin
Posts: 11726
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: HDMI audio drops intermittently

Unread post by mdrjr » Tue Mar 03, 2015 1:25 pm

Hi, We pushed an update today that attempts to fix that by disabling the HDMI Hotplug detection :)

Its already on the servers for update.. can you guys try "sudo apt-get update && sudo apt-get dist-upgrade"
The update should be live for ArchLinux ARM as well

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Tue Mar 03, 2015 6:47 pm

mdrjr wrote:The update should be live for ArchLinux ARM as well
Thanks a lot, it'll test this evening.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Wed Mar 04, 2015 5:41 am

Unfortunately the issue still occurs. I'm now using Kodi without x11 and pulseaudio, so we can also be sure that pulseaudio is the not the cause of this.

Here's some dmesg output (if that's of any help):

Code: Select all

[33913.835378] video first pts = 1d2e
[33913.838522] [video4osd] first  picture {1916,1076} pts:1d2e,
[33913.841090] DisableVideoLayer()
[33913.843186] DisableVideoLayer()
[33913.845866] video first pts = 0
[33913.849595] video_disable_store(1)
[33913.852717] DisableVideoLayer()
[33913.855181] VsyncDisableVideoLayer
[33914.016338] ----aml_hw_iec958_init,runtime->rate=48000--
[33914.016406] ----aml_hw_iec958_init,runtime->rate=48000,sample_rate=4--
[33914.022962] iec958 mode PCM16
[33914.026031] IEC958 16bit
[33914.043902] buf=0
[33914.043942] IEC958_mode_raw=0
[33914.046862] ----aml_hw_iec958_init,runtime->rate=44100--
[33914.049107] audio_set_958_clk, freq=5,
[33914.053034] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[33914.059840] iec958 mode PCM16
[33914.062703] IEC958 16bit
[33914.079056] ----aml_hw_iec958_init,runtime->rate=44100--
[33914.079114] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[33914.085743] iec958 mode PCM16
[33914.088932] IEC958 16bit
[33917.989921] mem-addr=9a00000,buff_offset=8a00000,buf_start=9b3e000
[33917.993228] 264 ucode swap area: physical address 0x3ec60000, cpu virtual addr f0c25000
[33918.002522] start load original firmware ...
[33918.005103] video first pts = 0
[33918.012869] frame_mbs_only_flag 1, crop_bottom 6,  frame_height 1076, mb_height 68,crop_right 2, frame_width 1916, mb_width 68
[33918.093667] video first pts = 1
[33918.105181] [video4osd] first  picture {1916,1076} pts:1,
[33918.162579] video_disable_store(0)
[33918.171841] [video4osd] first  picture {1916,1076} pts:2bf2,
[33918.188500] VsyncEnableVideoLayer
[33918.196223] ----aml_hw_iec958_init,runtime->rate=44100--
[33918.196260] ----aml_hw_iec958_init,runtime->rate=44100,sample_rate=5--
[33918.202769] iec958 mode PCM16
[33918.205909] [video4osd] first  picture {1916,1076} pts:3ab6,
[33918.211908] IEC958 16bit
[33918.221836] VsyncEnableVideoLayer
[33918.227991] buf=0
[33918.228015] IEC958_mode_raw=0
[33918.230113] ----aml_hw_iec958_init,runtime->rate=48000--
[33918.233052] audio_set_958_clk, freq=4,
[33918.237010] ----aml_hw_iec958_init,runtime->rate=48000,sample_rate=4--
[33918.243923] iec958 mode PCM16
[33918.246880] IEC958 16bit
[33918.262544] ----aml_hw_iec958_init,runtime->rate=48000--
[33918.262591] ----aml_hw_iec958_init,runtime->rate=48000,sample_rate=4--
[33918.269233] iec958 mode PCM16
[33918.272609] IEC958 16bit
EDIT: OK, that dmesg output is useless. It just happened again, but dmesg doesn't show anything new.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Thu Mar 12, 2015 5:42 am

I can also reproduce this while playing N64 with mupen64plus. So this is definitely not a codec problem.

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Mon Mar 16, 2015 9:29 am

Holzhaus wrote:I can also reproduce this while playing N64 with mupen64plus. So this is definitely not a codec problem.
That's good, kinda. I can stop rummaging through KODI source and echoing arbitrary numbers in sysfs codec audio buffers, trying to find the needle in that huge ass haystack.

I forgot whether it does the same intermittent audio dropout in the official image too. I don't see what would make the official image that different from arch with respect to audio.

I was thinking since I have a Yamaha receiver, maybe it's similar to that 'Yamaha receiver' problem posted in another thread but without the video problems they have. I'll try testing it directly connected to the TV later.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Tue Mar 17, 2015 4:43 am

Yup, I guess there's just a buffer underrun somewhere in the alsa driver.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Thu Mar 19, 2015 6:00 am

I really hope this gets fixed somehow, its really annoying.

gautier
Posts: 24
Joined: Wed Mar 04, 2015 11:42 am
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by gautier » Thu Mar 19, 2015 9:12 am

Have you tried to enable the debugging option of Kodi and trace the error on the audio module? System>Setting>System>Debugging>Enable Component logging>Specify...>Verbose Audio? You my display the menu in Standard or Expert Mode to see the Debugging menu. It may give you a clue.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Thu Mar 19, 2015 5:18 pm

Nope, since it's not a Kodi bug but rather a bug in the ALSA driver. These audio cuts do not just happen in kodi, but in all programs I tested so far, i.e. Kodi, mupen64plus and libretro-pcsx-rearmed.

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sat Mar 21, 2015 4:33 pm

@Holzhaus, can you check your /boot/boot.ini and see if it has the HDMI Hotplug enable/disable option lines in it?

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Sat Mar 21, 2015 7:04 pm

No, it hasm't.

Code: Select all

$ cat /boot/boot.ini
ODROIDC-UBOOT-CONFIG

# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.

# setenv m "vga"            # 640x480
# setenv m "480p"           # 720x480
# setenv m "576p"           # 720x576
# setenv m "800x480p60hz"   # 800x480
# setenv m "800x600p60hz"   # 800x600
# setenv m "1024x600p60hz"  # 1024x600
# setenv m "1024x768p60hz"  # 1024x768
# setenv m "1360x768p60hz"  # 1360x768
# setenv m "1366x768p60hz"  # 1366x768
# setenv m "1440x900p60hz"  # 1440x900
# setenv m "1600x900p60hz"  # 1600x900
# setenv m "1680x1050p60hz" # 1680x1050
# setenv m "720p"           # 720p 1280x720
# setenv m "800p"           # 1280x800
# setenv m "sxga"           # 1280x1024
# setenv m "1080i50hz"      # 1080I@50Hz
# setenv m "1080p24hz"      # 1080P@24Hz
# setenv m "1080p50hz"      # 1080P@50Hz
setenv m "1080p"            # 1080P@60Hz
# setenv m "1920x1200"      # 1920x1200

# HDMI DVI Mode Configuration
setenv vout_mode "hdmi"
# setenv vout_mode "dvi"

# HDMI BPP Mode
#setenv m_bpp "32"
# setenv m_bpp "24"
setenv m_bpp "16"

# UHS Card Configuration
# Uncomment the line below to __DISABLE__ UHS-1 MicroSD support
# This might break boot for some brand models of cards.
setenv disableuhs "disableuhs"

# Disable VPU (Video decoding engine, Saves RAM!!!)
# 0 = disabled
# 1 = enabled
setenv vpu "1"

# Disable HDMI Output (Again, saves ram!)
# 0 = disabled
# 1 = enabled
setenv hdmioutput "1"

setenv bootargs "console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait rw no_console_suspend consoleblank=0 vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=${m} m_bpp=${m_bpp} vout=${vout_mode} ${disableuhs}"
ext4load mmc 0:1 0x21000000 /boot/uImage
ext4load mmc 0:1 0x21800000 /boot/dtbs/meson8b_odroidc.dtb
fdt addr 21800000

if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi

if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi

bootm 0x21000000 - 0x21800000

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sat Mar 21, 2015 8:58 pm

I was thinking about Mdrjr's post above and he said they disabled the hotplug HDMI detection which should stop the audio drop. What I didn't realize was that the boot.ini file that controls whether hotplug HDMI detection was in a newer file called boot.ini.pacnew that got created when I updated (pacman places .pacnew at the end of newly installed config files so they don't mess with the config file that's already installed.)

So, if you made any alterations to boot.ini, make those changes in boot.ini.pacnew. Then remove boot.ini and move boot.ini.pacnew to boot.ini.

I haven't tested to see if it helps the audio dropping because I'm trying to get kodi working (the r5p0 Mali driver seemed to break it.) but it seems promising since they put hotplug disable in there for this reason.

EDIT: So, the hotplug disable didn't help. It still drops audio randomly as before.

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Thu Mar 26, 2015 1:02 am

So, after more testing, I noticed it also drops audio while playing audio via passthrough. This leads me to believe that the issue may be with the HDMI driver instead of the alsa driver since alsa does less in passthrough mode. That would also explain why there aren't any alsa errors when the drops happen.

Also, have you tried the HDMI grounding hack? I know it helped those who have screwy HDMI cables to get stable video, but I wonder if it would help those of us with sound problems too even if our video is fine.

EDIT: I did the grounding hack and it didn't help at all, still drops audio. I'm currently testing it plugged directly into my TV and no drops so far. I'll watch some more videos and update later to report whether I get any drops.

EDIT 2: Hours of video and not a single audio drop. So it looks like the audio drop problem is due to being connected to an AV receiver (at least for me, anyway.) My receiver make/model is Yamaha RX-V371. So for an inconvenient fix...don't use an AV receiver.

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Thu Mar 26, 2015 7:35 am

I already needed to ground my cable to get video working. I'm not using a receiver, It's directly connected to my TV (Sony Bravia KDL40Z4500).

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Thu Mar 26, 2015 10:48 pm

Holzhaus wrote:I already needed to ground my cable to get video working. I'm not using a receiver, It's directly connected to my TV (Sony Bravia KDL40Z4500).
Damn. Do you have any other TVs to try it on? I tried mine on 2 different TVs and both had zero problems (though both are Samsung TVs.) I still need to try my 2nd receiver (also a Yamaha, but a later model than the first one I tried that dropped the audio). Also, are you using Hardkernel's cable?

Maybe the HDMI signal strength isn't good enough. I know on the RPI, you can adjust the "HDMI drive strength", I wonder if that is adjustable in the C1 as well?

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Fri Mar 27, 2015 9:45 am

I did a few "tests" with a multimeter on the TV end of my HDMI cable while plugged into my C1. Unfortunately since the output of the TMDS lines are digital, a multimeter is not really an accurate way to determine the line voltage, so take this with a grain of salt.

I noticed the voltage averaged about .2 volts on the TMDS clock line. I compared that measurement to another HDMI device that I know works and the voltage averaged almost 3x more than the C1 on the same clock line.

Now, I can't accept any conclusions from this test because of the drastic inaccuracy of a multimeter reading on a digital signal line. If anyone has a decent oscilloscope, can you check the amplitude of the HDMI TMDS lines?

Also trivial, but I found a function in a C1 uboot file mentioning HDMI power modes of HDMI5V and HDMI1.8V and others. These mentions are in comments in the file as the function seems to be blank other than a print line so I'm not sure if they mean anything at all. I do find it strange that there is an option for a 1.8v HDMI signaling when the standard is 5v though, especially when my "test" of the HDMI voltage resulted in the C1 volts being about the same difference as 1.8v is to 5v.

This is obviously a shot in the dark and again, not an accurate test, but may be something to look into. An oscilloscope comparing TMDS lines to the ground lines should give a definite answer...though I sadly don't have one.

User avatar
rooted
Posts: 6865
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 260 times
Been thanked: 56 times
Contact:

Re: HDMI audio drops intermittently

Unread post by rooted » Sat Mar 28, 2015 3:47 pm

@Apokalypz

skgo in the C1 CEC thread has an oscilloscope, perhaps you could ask him to test.

http://forum.odroid.com/viewtopic.php?p=71487#p71487

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Mon Mar 30, 2015 3:05 am

Hardkernel did some tests on the HDMI output of the C1:
http://forum.odroid.com/viewtopic.php?f=115&t=11837

Unfortunately, it doesn't look like there are any obvious problems as it passed all the tests they ran on it.

crashoverride
Posts: 4551
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 79 times
Contact:

Re: HDMI audio drops intermittently

Unread post by crashoverride » Tue Mar 31, 2015 10:06 pm

Did you try running the sound test from a command line?

Code: Select all

speaker-test -c 2

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Tue Mar 31, 2015 10:29 pm

I did. It works. Most of the time, audio works fine, but there are noticable audio drops every 15-30 minutes that last for ~1-2 seconds. Sometimes, they occur more often, but that's about it. I'm sure that if I ran the sound test for one hour, I'd get 2 to 4 short audio cuts, but I can't listen to that sound for so long ;-)

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Sat Apr 04, 2015 5:04 pm

I've sadly also gotten this issue. Not sure if I didn't have it before, but now I have it.
My posts (including a workaround) from the HDMI issue thread:
Now that I have easter, I decided to test a little more. I've switched under Android from 1080p60 to 1080p50 and the odroid is connected to my Onkyo AVR. Then I started Netflix to test this. I did have the AVR showing that the audio signal went away, but never the video. The audio went away around once a minute, so quite a bit disturbing. Video remained active when this happened.
I think this might be the issue the others are having, some AVR might consider the missing audio signal a reason to blank the video and do the full HDMI handshake again.
After that I turned on alogcat on the C1, that interestingly didn't show any message when audio came and went.

Something else I detected. When I had the app Terminal open, my AVR showed me that the audio signal is HDMI - PL2, when I switched to the normal desktop, it changed the audio signal to HDMI - PL2 - PCM on the small front LCD. Interestingly though, the OSD of the Onkyo didn't show a difference.

I just discovered that Odroid-utility can't overwrite an existing boot.ini! Watch out for that. So all my tests above were at 1080p60hz and not 50 :S (sorry for not editing my post)

Doing tests again now after deleting boot.ini and changing the configuration in odroid-utility to 1080p50
On Netflix audio still went and came back every few seconds to minute. Image remained fine.

So for me there is no visible difference between 50 and 60 Hz.
I will try now to debug the audio service, but I'm not sure if I can manage that :)
part2
patoberli wrote:Just found the following error messages in the dmseg when booting fresh (they don't anymore appear once it's running though):

Code: Select all

IEC958 16bit
hdmitx: audio: Time out: AIU_HDMI_CLK_DATA_CTRL
enter aml_set_bias_level level: 1
enter aml_set_bias_level level: 2
[aaml-spdif-dai]aiu 958 playback enable
[aaml-spdif-dai]aiu 958 playback disable
[aml-spdif-dai]----aml_hw_iec958_ini,runtime->rate=44100--
[aml-spdif-dai]----aml_hw_iec958_ini,runtime->rate=44100,sample_rate=5--
[aml-spdif-dai]iec958 mode PCM16
... and now those lines repeat again some 10-30 times
patoberli wrote:Next update, I booted now Linux instead of Android.
Here every time I loose the audio signal, dmesg shows:

Code: Select all

hdmitx: cec: aocec irq 4
After a reboot, with CEC disabled in boot.ini, that message went away, but I still lost audio every few seconds/minutes while trying to play a youtube video in Chrome. With Kodi and audio pass-through enabled, the sound also went and came. Interestingly I was unable to output the DTS stream to my AVR, although it was enabled in the Kodi settings. It always only received a PCM stream. Same with cec enabled.
Here possible workaround
patoberli wrote:Did some more tests with Android. I could "work around" the sound issue by switching to 1080p with 24hz. So far I hadn't a single audio dropout.
@People with the screen blacking, do you also have the issue with 24hz? Most TVs and AVRs should fully support it.
-
pato

drEagle
Posts: 101
Joined: Sun May 18, 2014 7:43 pm
languages_spoken: english
ODROIDs: U3/U3+/C1
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by drEagle » Sat Apr 04, 2015 8:20 pm

patoberli wrote: Here possible workaround
patoberli wrote:Did some more tests with Android. I could "work around" the sound issue by switching to 1080p with 24hz. So far I hadn't a single audio dropout.
@People with the screen blacking, do you also have the issue with 24hz? Most TVs and AVRs should fully support it.
Tested; still get video drops !
:-(

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sat Apr 04, 2015 9:24 pm

patoberli wrote:Here possible workaround

Did some more tests with Android. I could "work around" the sound issue by switching to 1080p with 24hz. So far I hadn't a single audio dropout.
@People with the screen blacking, do you also have the issue with 24hz? Most TVs and AVRs should fully support it.
Didn't help audio for me. I didn't even notice a change in frequency of audio drops switching between 60hz and 24hz.

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Sun Apr 05, 2015 1:05 am

dreagle + apokalypz, Android or Linux? I made this test with Android.
-
pato

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sun Apr 05, 2015 1:17 am

patoberli wrote:dreagle + apokalypz, Android or Linux? I made this test with Android.
Linux (Arch)

drEagle
Posts: 101
Joined: Sun May 18, 2014 7:43 pm
languages_spoken: english
ODROIDs: U3/U3+/C1
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by drEagle » Sun Apr 05, 2015 1:22 am

patoberli wrote:dreagle + apokalypz, Android or Linux? I made this test with Android.
OpenElec (so Linux)

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Holzhaus » Sun Apr 05, 2015 1:26 am

Apokalypz wrote:
patoberli wrote:Here possible workaround

Did some more tests with Android. I could "work around" the sound issue by switching to 1080p with 24hz. So far I hadn't a single audio dropout.
@People with the screen blacking, do you also have the issue with 24hz? Most TVs and AVRs should fully support it.
Didn't help audio for me. I didn't even notice a change in frequency of audio drops switching between 60hz and 24hz.
Yup, same for me. And 50Hz doesn't make a difference either.

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Thu Apr 09, 2015 2:58 pm

I noticed something odd with the audio quality the other day. While outputting PCM to my TV and sending that to my receiver to which I plugged in some headphones, I noticed the higher frequencies are very harsh. It actually sounds like a broken tweeter or a 22khz samplerate. My receiver confirms the sample rate is 48khz though. So I unplugged my headphones and listened carefully to my speakers, and sure enough, the same problem. It is very noticeable with hi-hat or hiss sounds.

My guess is that it's dropping samples at a much higher rate than I originally thought. Anyone else notice this quality issue?

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Thu Apr 09, 2015 4:05 pm

I'm getting 44.1 KHz on android, you sure get 48?
-
pato

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sat Apr 11, 2015 6:39 am

So, its not just HDMI. I just got a USB-SPDIF adapter and it is having very similar issues as HDMI. It's connected via optical, so cable EMI problems can be ruled out.

Now I'm thinking it can be anything from interrupts to buffers. This sucks, there doesn't seem to be an escape from these damn audio skips.

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Sat Apr 11, 2015 5:10 pm

Thanks for your test. That means it's probably a software issue that can be fixed. :)
-
pato

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sun Apr 12, 2015 6:33 am

Anyone having this audio drop issue, can you play a video and (while the video is still playing in the background) back out to the kodi menu. Then go in into settings and back to the menu a few times. For me, it drops audio exactly when I go back to the main menu from the settings menu. It also drops a lot if I hold an arrow key (left or right) at the main menu so it cycles very quickly through the menu options. Also, I have the Aeon Nox skin (if you can test it with that skin if it doesn't doesnt drop on your current skin that would be awesome.)

You want to know the funny thing? This even happens if I play a passthrough DTS file (haven't tested with PCM or ac3 yet) through mplayer on the command line while also having kodi running moving through menu options like above (without an audio device selected.) So I don't think it is really a kodi problem, but maybe a CPU or GPU hogging/latency issue. Also, it does this with my new USB SPDIF out as well.

EDIT: NVM, this only seems to apply to the USB SPDIF adapter. Stressing the C1 by moving through menus doesn't affect HDMI.

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Tue Apr 14, 2015 10:45 am

I tested the HDMI audio (PCM, AC3 passthrough, and DTS passthrough) with mplayer playing each audio format for 40 mins each (PCM was actually 17 mins). I only had Mplayer running and that's it, no kodi. As it turned out, I had 0 audio drops for each test.

@Holzhaus, you mentioned that some other applications have audio drops. Can you see if mplayer causes any drops for you? (If you test pass through, don't forget to:

Code: Select all

 echo '2' > /sys/class/audiodsp/digital_raw 
or you will get a panic. Also, the command string I used to play things with mplayer is:

Code: Select all

mplayer -ao alsa:device=default -ac hw*** filename
Just replace filename with the audio file name you want to test and replace hw*** with hwac3 for an ac3 file, hwdts for a dts file, or just remove -ac hw*** to play a file you dont want to be sent via passthrough (aac, mp3, wav, etc...) to test PCM. Thanks.

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Sat Apr 18, 2015 4:58 am

Troubleshooted a little bit more.
I lose audio when I only open the app menu :S
Here what is logged to dmesg (at 309.xx I opened the app menu and at 326 I clicked the home button)

Code: Select all

<7>[  309.217594@0] [aml-spdif-dai]----aml_hw_iec958_init,runtime->rate=44100--
<7>[  309.217607@0] [aml-spdif-dai]----aml_hw_iec958_init,runtime->rate=44100,sa
mple_rate=5--
<7>[  309.217614@0] [aml-spdif-dai]iec958 mode PCM16
<7>[  309.217622@0] IEC958 16bit
<4>[  309.230309@0] hdmitx: audio: Time out: AIU_HDMI_CLK_DATA_CTRL
<7>[  309.230437@1] enter aml_set_bias_level level: 1
<7>[  309.230441@1] enter aml_set_bias_level level: 2
<7>[  309.230919@0] [aml-spdif-dai]aiu 958 playback enable
<7>[  313.192613@2] [aml-spdif-dai]aiu 958 playback disable
<7>[  318.201025@0] enter aml_set_bias_level level: 1
<7>[  318.201036@0] enter aml_set_bias_level level: 2
<7>[  326.812920@2] [aml-spdif-dai]----aml_hw_iec958_init,runtime->rate=44100--
<7>[  326.812932@2] [aml-spdif-dai]----aml_hw_iec958_init,runtime->rate=44100,sa
mple_rate=5--
<7>[  326.812939@2] [aml-spdif-dai]iec958 mode PCM16
<7>[  326.812947@2] IEC958 16bit
<4>[  326.824758@2] hdmitx: audio: Time out: AIU_HDMI_CLK_DATA_CTRL
<7>[  326.825017@3] enter aml_set_bias_level level: 1
<7>[  326.825030@3] enter aml_set_bias_level level: 2
<7>[  326.825463@2] [aml-spdif-dai]aiu 958 playback enable
<7>[  330.812609@2] [aml-spdif-dai]aiu 958 playback disable
While trying to play a movie in Netflix, right after audio dropped:

Code: Select all

<14>[  606.584283@0] healthd: battery l=100 v=0 t=2.0 h=2 st=2 chg=a
No joke, that was the only line when audio dropped for a second.

And here the second audio drop:

Code: Select all

<14>[  666.584162@0] healthd: battery l=100 v=0 t=2.0 h=2 st=2 chg=a
So it seems my audio drops when the healthd runs.

Logcat is not very useful, as it gets spammed with these messages

Code: Select all

I/ACodec  ( 3023): video render this buffer -1207045120
I/ACodec  ( 3023): video render this buffer -1207045120 ok
D/AmlogicVideoDecoderAwesome( 2215):              Out PTS: 305889..
I/ACodec  ( 3023): video render this buffer -1207071704
I/ACodec  ( 3023): video render this buffer -1207071704 ok
D/AmlogicVideoDecoderAwesome( 2215):              Out PTS: 305931..
I/ACodec  ( 3023): video render this buffer -1207044480
I/ACodec  ( 3023): video render this buffer -1207044480 ok
D/AmlogicVideoDecoderAwesome( 2215):              Out PTS: 305972..
I/ACodec  ( 3023): video render this buffer -1207045120
I/ACodec  ( 3023): video render this buffer -1207045120 ok
I/ACodec  ( 3023): video render this buffer -1207071704
I/ACodec  ( 3023): video render this buffer -1207071704 ok
D/AmlogicVideoDecoderAwesome( 2215):              Out PTS: 306014..
D/AmlogicVideoDecoderAwesome( 2215):              Out PTS: 306056..
I/ACodec  ( 3023): video render this buffer -1207044480
I/ACodec  ( 3023): video render this buffer -1207044480 ok
D/AmlogicVideoDecoderAwesome( 2215):              Out PTS: 306097..
I/ACodec  ( 3023): video render this buffer -1207045120
I/ACodec  ( 3023): video render this buffer -1207045120 ok

Currently running 1.4 with 1080p50hz.
-
pato

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Sat Apr 18, 2015 5:02 am

Here the description for healthd, which probably can disabled for the C1?
https://android.googlesource.com/platfo ... /healthd.h
28.//
29.// periodic_chores_interval_fast is used while the device is not in
30.// suspend, or in suspend and connected to a charger (to watch for battery
31.// overheat due to charging). The default value is 60 (1 minute). Value
32.// -1 turns off periodic chores (and wakeups) in these conditions.
-
pato

Apokalypz
Posts: 178
Joined: Thu Dec 26, 2013 12:58 pm
languages_spoken: english
ODROIDs: • Odroid -XU
• Odroid-C1
Location: USA
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by Apokalypz » Sat Apr 18, 2015 7:54 am

patoberli wrote:Here the description for healthd, which probably can disabled for the C1?
https://android.googlesource.com/platfo ... /healthd.h
28.//
29.// periodic_chores_interval_fast is used while the device is not in
30.// suspend, or in suspend and connected to a charger (to watch for battery
31.// overheat due to charging). The default value is 60 (1 minute). Value
32.// -1 turns off periodic chores (and wakeups) in these conditions.
The problem may not be with healthd. I've been trying to see if it only happens when certain applications run that hog certain resources. Or if they utilize a piece of hardware that hogs the resources. I originally thought the GPU was hogging the resources, perhapse causing too much latency in sound that leads to dropouts, but I don't think healthd accesses the GPU in any way.

I tried running 'stress' (a stress test application) and maxed out CPU, Memory, IO, and the HDD (eMMC) individually and in combination while playing audio through mplayer. None of them caused any audio drops (except for the memory test, but that was because it started using my swapfile.)

Dmesg doesn't really seem to help. I turned on tons of debugging options through the sysfs and saw nothing useful. For me, nothing pops up when the audio drops.

My last idea would be that it is an amlogic video decoder problem, but that doesn't explain why holzhaus has reported the same problem while running other, non video, applications.)

And that's just the HDMI sound problem. I've come to believe that the SPDIF audio drops may be caused by something else. Either that or it is a lot more sensitive. I read that someone 'solved' the spdif problem by setting the sample rate to 44100. I tried the same and it 'helped' but I noticed the skips were doing the opposite thing now, instead of dropping audio, it was running spots together. It's kinda like it still has audio drops, but it gets rid of the silence and you're left with a 1/4 second audio jump every few seconds instead.

To possibly support my amlcodec theory, I noticed that the kodi source states that the amlogic decoder audio part is different from other decoders in that it doesn't like empty audio packets. I'm not sure exactly what that means, but there is a bit of code that fills any empty spots or packets with zeros. So I tried to disable it from filling empty packets with zeros and rebuilt it, but didn't see a difference so I'm not sure what it does or why my rebuild didn't break anything like it should have.

I'm just at a complete loss as to what is causing these audio drops and have serious doubts that we will ever find a solution.

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Has thanked: 0
Been thanked: 0
Contact:

Re: HDMI audio drops intermittently

Unread post by patoberli » Sat Apr 18, 2015 6:14 pm

As you already know the source somewhat, can you somewhere tune the buffers a little? So that there are larger audio buffers? That should allow the board maybe to better handle the audio.
But who know, maybe it's also an Android 4.4 bug?
I think I might try the latest 5.0 or 5.1 nightly, I luckily still have a spare card at home :D
-
pato

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests