difference performance BTW usermode and kernelmode

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jmdetiege
Posts: 10
Joined: Thu Jul 17, 2008 12:05 am

difference performance BTW usermode and kernelmode

Post by jmdetiege »

Hello everybody,

I'm new in forum and this is my first post => hi all.
Sorry for my poor english, i'm belgian french.

Do you know if it's a difference in performance between the 2 mode ?

I've 2 HB with same code but first is in kernel mode (Kmode) and second in User mode (Umode).

I'm streaming 8 MP3 in // (launched with thread and sema for sync) from memorystick.

4 is mute on and 4 other is mute off. i must be able to mute one and unmute one other, .....

In Kmode, i launch all MP3 (R) and i can press some key (L, X,O,....) to interact with MP3 (Play, pause, mute, unmute ....) or exit my HB (START). Sound is not so bad but there's some LAG, distorsion :-(

In Umode, when i'm launch MP3 (R key), i can't interact with any key , sound is totally destroy.
And I must power off my PSP to stop everything and restart it.

somebody know why ?

Tks for advance for your help
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

From what i can understand - after deciphering for a while - you're not giving enough information. You should post the relevant code instead of asking a general question...

But my guess is that 8 MP3 decodings at the same time might be a little too much for the PSP memory- and power- wise. As for the trouble exiting the kernel mode application, it is probably due to you not exiting properly at callback time.
jmdetiege
Posts: 10
Joined: Thu Jul 17, 2008 12:05 am

Post by jmdetiege »

Hello,

Tks for your reply.
adrahil wrote:But my guess is that 8 MP3 decodings at the same time might be a little too much for the PSP memory- and power- wise.
I think that'you right but do you know if streaming 8 WAV in // might be better than 8 MP3 in // (no decodings isn't it ?)

I would use MP3 for the little size

I explain the HB:

4 SOUND playing at the same time (1 for drums, 1 for guitar, 1 for Keyb, ...) => using thread for synchro
4 other sound with a different sound (guitar, keyb, ...)
it must be able to swith between guitar's sound or keyb' sound, ...

The 1st way (to do that) that i founded is :

- Launch all sound with thread (for playing synchro) and mute on the 4 other sound.
- Mute on and mute off each sound that i want to swith

The 2d way that i founded is

- Launch 4 sound
- when user want to change, pausing 4 sound , memories the offset of playing, stopping the sound and begin the new sound from the offset of the other sound

But for this second way i'm not found a lib which i can do that (i'm using sakya oslibmod 1_0_1) or i'm not able to use it efficiently.

Other way ? impossible result due to technical specification of PSP ?
Other idea (i'm open to everything) ?

Thanks a lot for your reply ?

jmdetiege
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Why do you need kernel mode for audio?
jmdetiege
Posts: 10
Joined: Thu Jul 17, 2008 12:05 am

Post by jmdetiege »

it's my first develop and i'm use the oslibmod 1_0_1 and i don't see that it don't need kernel mode to playing MP3 (1_0_0 request kernel mode)

i think
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
jmdetiege wrote:it's my first develop and i'm use the oslibmod 1_0_1 and i don't see that it don't need kernel mode to playing MP3 (1_0_0 request kernel mode)
OSLib MOD 1.0.0 needs kernel mode for mp3 playback (untouched from OSLib 2.10) while version 1.0.1 can play mp3 in user mode.

Here you can find the Super Patrick II sample from original OSLib "converted" to user mode.
http://www.sakya.it/downloads/Super_Patrick_II_3xx.rar

Note that you don't really need to create a new thread, I was just too lazy to remove it...

Ciaooo
Sakya
Post Reply