Project: Kernel 3.8

Share here your ideas for new projects

Moderators: meveric, mdrjr, odroid

Re: Project: Kernel 3.8

Unread postby OverSun » Wed Aug 28, 2013 5:14 pm

memeka wrote:Put a pastebin with the combined patch if you can, ill try it


find * | grep mfc | grep -E 'samsung|s5p' in kernel 3.11 source tree and copy all these files over to 3.8
apply your patch with clock issue,
comment two line in s5p_mfc.c regarding timestamp (807 and 829 as I recall) it's a new feature of 3.11 videodev2 framework, doesn't look to be used much in s5p, just set and never read, so probably harmless change. And compile.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Wed Aug 28, 2013 6:22 pm

Forgot to change the MFC clock, and 1080p mpeg4 was soo slow...
We can safely say that MFC works good on mpeg4 :)
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Wed Aug 28, 2013 6:29 pm

The question is is it something wrong with MFC codebase or the clocks are still not high enough and connected wrong...
Try to fetch rate for clock_parent in mfc driver, the only clocks that are left in driver by authors, it would be 0. Descriptions says that it is clocks used for gating .I don't know how right it is... Still think that someone who know how this thing work should look into the issue with MFC. Because what we did was just a guess and fortune pick.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby Tor » Wed Aug 28, 2013 7:16 pm

memeka wrote:The size of the files is exactly the same.
Since MFC is a separate chip, (plus u2 and s3 have the same soc) I would same probably is the same firmware...

If you check with 'md5sum' you'll know for certain.

-Tor
Tor
 
Posts: 26
Joined: Sun Feb 24, 2013 2:12 am
Location: Norway
languages_spoken: English

Re: Project: Kernel 3.8

Unread postby memeka » Wed Aug 28, 2013 7:20 pm

Tried to apply some patches, and now I get this:

Code: Select all
[  296.399967] s5p_mfc_handle_error:418: Interrupt Error: 00000055
[  296.400278] vidioc_dqbuf:612: Call on DQBUF after unrecoverable error


On mpeg4 videos.
h264 works the same as usual.


UPDATE: After upgrading s5p-mfc to the latest version in 3.11 kernel (from linus not hardkernel), videos > 320p won't work anymore, and 320p xvid works very very choppy.
And errors like the one above.
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Thu Aug 29, 2013 12:06 am

I downloaded really small h264 clip and it plays choppy too. So it is not performance. Looks like s5p-mfc implementation is not working good with odroid hardware.
We have two approach on this:
- port mfc5x from 3.0,
- ask someone from hardkernel to look into the issue.

And s5p-mfc from 3.11 doesn't work for me too, I got "Interrupt Error: 00000004", so the MFC hardware IS dependent on the driver used.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby daviessm » Thu Aug 29, 2013 12:44 am

OvverSun wrote:And it doesn't reboot using 3.8 for months now, it just hangs on last "notifier called", so I cannot reboot it remotely.


@OvverSun, do you know what causes this? I have the same problem.
daviessm
 
Posts: 93
Joined: Thu Jul 25, 2013 2:14 am
Location: Belfast, UK
languages_spoken: English, German
ODROIDs: X2, XU4

Re: Project: Kernel 3.8

Unread postby OverSun » Thu Aug 29, 2013 1:13 am

Nope. It was ok for some people and not ok for others, and then was "fixed" by this commit https://github.com/hardkernel/linux/com ... dd84c61ce1, but after that fix it stopped to work for everyone else. For me for example.
Last edited by OverSun on Thu Aug 29, 2013 1:17 am, edited 1 time in total.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby OverSun » Thu Aug 29, 2013 1:16 am

I'm looking into the mfc5x code and there are indeed some differences of how mfc initialised for h264 and other codecs. And I mean not only "it's obvious, it's different codecs they are initialised differently", there are some parts like:
Code: Select all
if (ctx->codecid == H264_DEC) {
   exynos4_busfreq_lock(DVFS_LOCK_ID_MFC, BUS_L0);
   mfc_dbg("Bus FREQ locked to L0\n");
} else {
   exynos4_busfreq_lock(DVFS_LOCK_ID_MFC, BUS_L1);
   mfc_dbg("Bus FREQ locked to L1\n");
}

So there is a probability that h264 is working wrong because of the driver. I have no other ideas on the issue...
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby OverSun » Thu Aug 29, 2013 2:07 am

MFC F/W version : 11yy, 01mm, 26dd
btw
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Thu Aug 29, 2013 2:14 am

Yes I saw that :)
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Sat Aug 31, 2013 3:04 am

In 3.8 kernel hkdk audio device name is spelled wrong as hkdk-snd-max89090, when the chip name is max98090. Doesn't affect operations much since everywhere else it has been addressed by that name, but still took some time from me to understand why the driver is named max98090 and I cannot find anything about it in logs by that name. =D
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby robroy » Sun Sep 01, 2013 7:38 am

I've been trying to download the 3.8.y branch from GitHub this morning, and the "git clone" command ends early with this error:

Code: Select all
Downloading GitHub 3.8.y branch...
Cloning into 'odroid-3.8.y'...
remote: Counting objects: 44219, done.
remote: Compressing objects: 100% (42493/42493), done.
error: RPC failed; result=18, HTTP code = 200MiB | 197 KiB/s   
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: recursion detected in die handler

I also tried downloading as .zip file from the www.github.com/hardkernel website several times, but the archive manager reports that it is corrupt.
Rob Roy, Editor-in-Chief of ODROID Magazine (submit an article | make a donation)
User avatar
robroy
 
Posts: 3349
Joined: Mon Feb 25, 2013 2:29 am
Location: San Francisco, California
languages_spoken: English
ODROIDs: Q2, X, X2, U2, U3, XU-E, XU3, XU4, C1, C1+, C2

Re: Project: Kernel 3.8

Unread postby mdrjr » Sun Sep 01, 2013 7:40 am

That's Github issue.. We can't do nothing on it.
mdrjr
Site Admin
 
Posts: 11637
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Project: Kernel 3.8

Unread postby neagix » Sun Sep 01, 2013 9:11 pm

mdrjr wrote:MFC Patch by Memeka
FIMC Patch by Ruppi
Mali Patch by OvverSun
are now all merged.
:)

Great! Although now this needs to be tested :)

First minor improvement: can you merge this patch from memeka? it shows the frequency (instead of voltage)
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby OverSun » Sun Sep 01, 2013 10:17 pm

Audio issue is hitting me hard.
I'm sitting the whole day taking my rest and using U2 as an XBMC box - downloading movies, watch youtube etc. Everything is almost perfect, except the sound which can turn white noise any time.
Something is not right in the driver.

PS. CEC seems to be working in cec-client, I have my TV connected and keypresses and everything, but XBMC compiled against this libcec doesn't work. I will look into it since it userspace, but little later.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby odroid » Sun Sep 01, 2013 11:55 pm

OvverSun wrote:Audio issue is hitting me hard.
I'm sitting the whole day taking my rest and using U2 as an XBMC box - downloading movies, watch youtube etc. Everything is almost perfect, except the sound which can turn white noise any time.
Something is not right in the driver.

PS. CEC seems to be working in cec-client, I have my TV connected and keypresses and everything, but XBMC compiled against this libcec doesn't work. I will look into it since it userspace, but little later.


Can you tell me the sample rate of the audio stream in your video files? If the downmixer or audio codec driver in XBMC are okay, it should be driver issue.
I think we need to test the audio device driver with aplay or similar tool for various sample rate audio clips or different PCM format... probably.

We need to buy a TV which has the CEC feature as soon as possible. ;)
User avatar
odroid
Site Admin
 
Posts: 25057
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 12:08 am

Code: Select all
[    0.290085] max77686 0-0009: device found
[    0.290284] max77686 0-0009: irq is not specified
[    4.357980] max98090 1-0010: revision 0x43
[    4.384350]    [MAX98090] max98090_set_record_main_mic(150)
[    4.390922] hkdk-snd-max89090 hkdk-snd-max89090:  max98090-aif1 <-> samsung-i2s.0 mapping ok
[    4.403389] hkdk-snd-max89090 hkdk-snd-max89090:  max98090-aif1 <-> samsung-i2s.0 mapping ok
[    5.716602]  max98090_set_playback_path [682] param 2
[    5.722722]    [MAX98090] max98090_set_playback_speaker_headset(111)
[    5.725680]  max98090_set_record_path [734] param 0
[    5.741916]    [MAX98090] max98090_set_record_main_mic(150)
[    7.930187]  max98090_set_playback_path [682] param 2
[    7.935467]    [MAX98090] max98090_set_playback_speaker_headset(111)
[    7.938036]  max98090_set_record_path [734] param 0
[    7.946517]    [MAX98090] max98090_set_record_main_mic(150)
[   10.397782]    [MAX98090] max98090_set_playback_speaker_headset(111)
[  103.076281]    [MAX98090] max98090_set_playback_speaker_headset(111)
[  170.382493]    [MAX98090] max98090_set_playback_speaker_headset(111)
[  170.394587]    [MAX98090] max98090_set_playback_speaker_headset(111)
[  183.703101]    [MAX98090] max98090_set_playback_speaker_headset(111)


in 3.0 kernel there is also:

Code: Select all
[    3.337588] max77686_rtc_gettime : 2013.08.27 03:44:59
[    3.439850] max77686_rtc_gettime : 2013.08.27 03:44:59
[    3.541782] max77686_rtc_gettime : 2013.08.27 03:44:59
[    4.602091] max98090 1-0010: revision 0x43
[    4.603962]    [MAX98090] max98090_set_record_main_mic(163)
[    4.611481] asoc: max98090-aif1 <-> samsung-i2s.0 mapping ok
[    4.618339] asoc: max98090-aif1 <-> samsung-i2s.0 mapping ok
[    4.625222] ALSA device list:
[    4.626669]   #0: Ooroid-max98090
[    9.220559]    [MAX98090] max98090_set_playback_speaker_headset(112)
[    9.221123]  max98090_set_record_path [706] param 0
[    9.226699]    [MAX98090] max98090_set_record_main_mic(163)
[   11.151109]    [MAX98090] max98090_set_playback_speaker_headset(112)
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby neagix » Mon Sep 02, 2013 1:42 am

Can some of you guys with the most recent 3.8 help me to reproduce this?

When I run glmark2-es I get the following serious mali crash + CPU lockups

http://pastebin.com/c656YVxS

Are you able to reproduce it? this prevents me from finishing the tests :(
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 1:47 am

In kernel .config, change
CONFIG_MALI_DVFS=y
to
# CONFIG_MALI_DVFS is not set

and rebuild.
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby neagix » Mon Sep 02, 2013 2:12 am

@mdrjr: please revert commit a0972d938b137413bcdd9eacce37e2bf936c67c0, since without it the above-mentioned issue fades away

@memeka: yes, that is the problem

Update: I have also discovered that there is still one patch missing to fix the performance issue.

So, summary of needed changes to current odroid-linux-3.8 kernel:

  1. revert commit a0972d938b137413bcdd9eacce37e2bf936c67c0
  2. fix clock reporting with this memeka's patch: http://pastebin.com/fmdBfpAc
  3. apply this (not yet merged) patch, also by memeka (where I removed overclocking to 640Mhz): https://gist.github.com/neagix/6334397/raw/7ca2e0b053d4b0590aea7c7ceda56f6f23e68f7f/memeka-cumulative-3.8-performance-fix.patch

If all the above is done, then compiling the odroid-linux-3.8 git would lead to good performance as 3.0 (and no crashes) :)
Last edited by neagix on Mon Sep 02, 2013 2:37 am, edited 2 times in total.
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 2:35 am

odroid wrote:
OvverSun wrote:Audio issue is hitting me hard.
I'm sitting the whole day taking my rest and using U2 as an XBMC box - downloading movies, watch youtube etc. Everything is almost perfect, except the sound which can turn white noise any time.
Something is not right in the driver.

PS. CEC seems to be working in cec-client, I have my TV connected and keypresses and everything, but XBMC compiled against this libcec doesn't work. I will look into it since it userspace, but little later.


Can you tell me the sample rate of the audio stream in your video files? If the downmixer or audio codec driver in XBMC are okay, it should be driver issue.
I think we need to test the audio device driver with aplay or similar tool for various sample rate audio clips or different PCM format... probably.

We need to buy a TV which has the CEC feature as soon as possible. ;)


I tried downmix to 44100 and 48000 all the output, there is such an option in XBMC.
It could be actually XBMC issue, I opened the logs and it looks like sometimes it loses ALSA device completely:
Code: Select all
15:36:59 T:3041657920   ERROR: CAESinkALSA::Initialize - failed to initialize device ""
15:36:59 T:3041657920   ERROR: CAESinkOSS::Initialize - Failed to open the audio device: /dev/dsp
15:36:59 T:3041657920   ERROR: CAESinkALSA::Initialize - failed to initialize device ""
15:36:59 T:3041657920   ERROR: CAESinkOSS::Initialize - Failed to open the audio device: /dev/dsp
15:36:59 T:2783372352   ERROR: CLinuxV4l2::DequeueBuffer - dequeue input buffer

I will do some more test possible.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 2:37 am

neagix wrote:@mdrjr: please revert commit a0972d938b137413bcdd9eacce37e2bf936c67c0, since without it the above-mentioned issue fades away

@memeka: yes, that is the problem


But for me when you turn off DVFS, clocking becoming to be unset completely again. And it was the same for mdrjr yesterday, that's why he made this commit.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 2:41 am

neagix wrote:[*] apply this (not yet merged) patch, also by memeka (where I removed overclocking to 640Mhz): https://gist.github.com/neagix/6334397/raw/7ca2e0b053d4b0590aea7c7ceda56f6f23e68f7f/memeka-cumulative-3.8-performance-fix.patch[/list]


The last part is not needed, it was a workaround to attach mali to different clocks. By fixing their parent everything was done right and there is no need anymore to attach it directly to vpll
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby neagix » Mon Sep 02, 2013 2:55 am

@Overssun: now with that patch I get correct (higher) performance

so it's indeed possible that part of it is redundant, but it's doing something here

update: I removed the parent mali clock setting, now I am using the .config and patch here (https://gist.github.com/neagix/6334397)
Last edited by neagix on Mon Sep 02, 2013 3:48 am, edited 1 time in total.
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 2:59 am

About sound looks like all my videos are 48000 KHz, the only difference that all 6 channel videos are 100% played as white noise. 2 channels videos are fine.
And I got absolutely the same results using VLC as player.
So it is not XBMC issue, something is wrong with driver.
I tried 44100 stereo mp3 - white noise it is. So I cannot track when the audio will be garbled or not.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 3:44 am

So it looks like only workaround on this would be install pulseaudio, which can like "handle" the problem and feed alsa driver the data it like.
But it populate syslog with this every time new file played:
Code: Select all
Sep  1 20:41:13 oversun-odroidu2 pulseaudio[5474]: [alsa-sink] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
Sep  1 20:41:13 oversun-odroidu2 pulseaudio[5474]: [alsa-sink] alsa-sink.c: Most likely this is a bug in the ALSA driver '(null)'. Please report this issue to the ALSA developers.
Sep  1 20:41:13 oversun-odroidu2 pulseaudio[5474]: [alsa-sink] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 3:49 am

The only most suspicious thing I see here is that XBMC and pulseaudio report problem with device "" or "(null)". So could it be that somewhere in driver some needed name is not set and it causes condition fails in applications?

Code: Select all
odroid@oversun-odroidu2:/usr/src/xbmc$ alsactl init
Found hardware: "Built-in_Audio" "" "" "" ""
Hardware is initialized using a generic method


And I got this in logs:
Code: Select all
[ 1776.372583] exynos4_epll_set_rate: Invalid Clock EPLL Frequency
[ 1776.391634] max98090 1-0010: Invalid master clock frequency
[ 1776.410635] hkdk-snd-max89090 hkdk-snd-max89090: ASoC: machine hw_params failed: -22
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 6:33 am

OvverSun wrote:
neagix wrote:[*] apply this (not yet merged) patch, also by memeka (where I removed overclocking to 640Mhz): https://gist.github.com/neagix/6334397/raw/7ca2e0b053d4b0590aea7c7ceda56f6f23e68f7f/memeka-cumulative-3.8-performance-fix.patch[/list]


The last part is not needed, it was a workaround to attach mali to different clocks. By fixing their parent everything was done right and there is no need anymore to attach it directly to vpll



It is needed to enable the regulator as well... since it's not working from the platform files :)
With my original patch:

* you don't need to enable DVFS
* you can set a clock that you want (and get higher performance)
* why is it a workaround? Mali DVFS basically enables that file as well - it compiles 2 extra files in, the platform file that I also include, and the DVFS file.
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 6:47 am

By "last part" I meant last part of the third patch. ;) Where parent clocks are attached from mali_parent to vpll directly.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 6:50 am

How good is DVFS working?
Compared to http://neagix.blogspot.com.au/2013/09/t ... on-on.html ?
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 6:51 am

Back to sound business.
I made a research and found out that it is a config issue.
For some reason root user have "default" output in alsa set to "sysdefault" channel, which is card 0 device 0. Normal. But any normal user has default output in alsa set to " Playback/recording through the PulseAudio sound server" and when you don't have Pulseadio it leads to white noise. Not sure why not always, but in most of the cases.
This can be fixed by creating /etc/asound.config and putting there:
Code: Select all
pcm.!default {
  type sysdefault
}

ctl.!default {
  type sysdefault
}

This will redirect all output for any user from "default" device, which can be strange, to "sysdefault" which is Card 0, Device 0.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 6:55 am

I've already did that yesterday, but I got no sound out of pulse on HDMI ... and end up uninstalling it. is it working for you?
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 7:13 am

Yeah, works, but it turns out that it fires up pulseaudio on the background and stream everything through it...
So it looks like pulse is the only fast solution we can have while it is not fully understood what is going on with direct alsa sink to card...
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 7:24 am

So you have pulseaudio installed, and xbmc compiled with --disable-pulseaudio --enable-alsa ? :) Or is xbmc compiled with --enable-pulseaudio ?
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby neagix » Mon Sep 02, 2013 7:29 am

OvverSun wrote:By "last part" I meant last part of the third patch. ;) Where parent clocks are attached from mali_parent to vpll directly.

yes, I have removed that part after your comment, and apparently mdrjr has already merged a cleaned up/improved version here

So looks like now odroid-linux-3.8 is crystal clear for usage :)
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 7:44 am

Ovversun - have you actually just try running alsamixer and change the playback path?
For example to TVOUT ?

Code: Select all
[20415.058680]  max98090_get_playback_path [718] current playback path 4
[20415.065122]  max98090_set_playback_path [682] param 5
[20415.071603]  max98090_get_playback_path [718] current playback path 5
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 1:45 pm

Of course I did. Makes no difference unfortunately.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 1:48 pm

So what's your setup that actually works?
pulseaudio installed? and what options for xbmc ? --disable-alsa?
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby odroid » Mon Sep 02, 2013 1:59 pm

OvverSun wrote:About sound looks like all my videos are 48000 KHz, the only difference that all 6 channel videos are 100% played as white noise. 2 channels videos are fine.
And I got absolutely the same results using VLC as player.
So it is not XBMC issue, something is wrong with driver.
I tried 44100 stereo mp3 - white noise it is. So I cannot track when the audio will be garbled or not.


We are trying to find which makes the white noise.
I have a question about the 44.1Khz stero MP3 playback.
Can you hear the white noise on HDMI as well as Headphone(MAX98090 output)?
User avatar
odroid
Site Admin
 
Posts: 25057
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Project: Kernel 3.8

Unread postby mdrjr » Mon Sep 02, 2013 2:01 pm

odroid wrote:
OvverSun wrote:About sound looks like all my videos are 48000 KHz, the only difference that all 6 channel videos are 100% played as white noise. 2 channels videos are fine.
And I got absolutely the same results using VLC as player.
So it is not XBMC issue, something is wrong with driver.
I tried 44100 stereo mp3 - white noise it is. So I cannot track when the audio will be garbled or not.


We are trying to find which makes the white noise.
I have a question about the 44.1Khz stero MP3 playback.
Can you hear the white noise on HDMI as well as Headphone(MAX98090 output)?


Yep, it happens on both outputs...
But only happens when you don't use Pulseaudio...
mdrjr
Site Admin
 
Posts: 11637
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 2:04 pm

@odroid - in my experience, is only on HDMI :)
If I would plug speakers in the audio port and mute the TV, everything would be perfect.
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 2:14 pm

Both sources for me too is white noise.

And I'm still continuously getting this in console:

Code: Select all
[   47.795000] max98090 1-0010: Invalid master clock frequency
[   47.795000] hkdk-snd-max89090 hkdk-snd-max89090: ASoC: machine hw_params failed: -22
[   47.805000] exynos4_epll_set_rate: Invalid Clock EPLL Frequency
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby memeka » Mon Sep 02, 2013 2:18 pm

I don't get that ... very weird...
Maybe it's because of different kernel config?

EDIT: here is my config: http://paste.debian.net/33559/

Also, different from the hk branch, I have the mct-frc correctly initialized

Code: Select all
[    0.000000] MCT clocksource init timer with clk_rate=24000000 HZ
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    1.299591] Switching to clocksource mct-frc


using this

Code: Select all
commit 3d005171e158a0068b8dbc5a49dd204c3324866a
Author: memeka<mihailescu2m@gmail.com>
Date:   Fri Jun 28 16:40:31 2013 +0200

    enable Exynos MCT clocksource

diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index 57668eb..2160ce8 100644
--- a/arch/arm/mach-exynos/mct.c
+++ b/arch/arm/mach-exynos/mct.c
@@ -24,6 +24,7 @@
 #include <asm/arch_timer.h>
 #include <asm/hardware/gic.h>
 #include <asm/localtimer.h>
+#include <asm/sched_clock.h>

 #include <plat/cpu.h>

@@ -162,6 +163,8 @@ static void __init exynos4_clocksource_init(void)

        if (clocksource_register_hz(&mct_frc, clk_rate))
                panic("%s: can't register clocksource\n", mct_frc.name);
+
+       setup_sched_clock(exynos4_frc_read, 32, clk_rate);
 }

 static void exynos4_mct_comp0_stop(void)
@@ -463,6 +466,8 @@ static void __init exynos4_timer_resources(void)

        clk_rate = clk_get_rate(mct_clk);

+       printk ("MCT clocksource init timer with clk_rate=%d HZ\n", clk_rate);
+
 #ifdef CONFIG_LOCAL_TIMERS
        if (mct_int_type == MCT_INT_PPI) {
                int err;
User avatar
memeka
 
Posts: 3732
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Project: Kernel 3.8

Unread postby OverSun » Mon Sep 02, 2013 3:18 pm

Yes, this patch is very useful for debug, I just forgot to apply it to my current build. =D
Anyway it doesn't make any difference for sound.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby neagix » Tue Sep 03, 2013 2:42 am

@mdrjr: I also tested this patch "enable Exynos MCT clocksource", commit 3d005171e158a0068b8dbc5a49dd204c3324866a and works fine, you might want to merge as well :)
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby OverSun » Tue Sep 03, 2013 3:56 am

Sound still clicks with pulse, but at least it hasn't that ugly background noise and doesn't turn fullvolume white noise at 70% of the cases.
Something is wrong with alsa, but not as deep since pulse somehow can handle it.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Project: Kernel 3.8

Unread postby neagix » Tue Sep 03, 2013 4:16 am

I find it weird since I always thought that pulse would use ALSA under the hood...
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Project: Kernel 3.8

Unread postby mdrjr » Tue Sep 03, 2013 4:55 am

I did this mct patch a while ago, I think it was me and memeka searching for it and I end up finding it back in time.. not sure why I didn't merge it..
mdrjr
Site Admin
 
Posts: 11637
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Project: Kernel 3.8

Unread postby neagix » Sat Sep 07, 2013 3:06 am

I am able to reproduce a hangup:

Code: Select all
#0  0xb6f4b3c4 in __libc_do_syscall ()
   from /lib/arm-linux-gnueabihf/libpthread.so.0
No symbol table info available.
#1  0xb6f46fea in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/arm-linux-gnueabihf/libpthread.so.0
No symbol table info available.
#2  0xb6dc61b6 in _mali_osu_lock_wait () from /usr/lib/libEGL.so
No symbol table info available.
#3  0xb6dc5e88 in ?? () from /usr/lib/libEGL.so
No symbol table info available.
#4  0xb6dc5e88 in ?? () from /usr/lib/libEGL.so
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


That was on one of the two threads related to the GPU. On the second thread we have:

Code: Select all
[Switching to thread 5 (Thread 0xb6224440 (LWP 4848))]
#0  0xb6b38448 in ioctl () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) bt full
#0  0xb6b38448 in ioctl () from /lib/arm-linux-gnueabihf/libc.so.6
No symbol table info available.
#1  0xb6dc66c4 in ?? () from /usr/lib/libEGL.so
No symbol table info available.
#2  0xb6dc66c4 in ?? () from /usr/lib/libEGL.so
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


I have VSYNC enabled and PAGE_FLIP disabled.
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

PreviousNext

Return to The Ideas

Who is online

Users browsing this forum: No registered users and 3 guests