Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#200362 - 25/01/2004 14:42 Hijack v356, v357, v358, v359, and soon.. v360
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
I've been hacking Hijack today, trying to remember How Things Work.

In the course of doing so, the Calculator function has now been nixed, the Flash Savearea Display has been fixed (wasn't highlighting all changes before), and the display "jitter" sometimes seen on the Hijack menus has been removed completely.

Version v359 is the one I want everyone to try and use. It should work perfectly for all.

But I will shortly be following up with v360, which changes how the display is refreshed slightly. I would like to hear if anyone out there can tell the difference between v359 and v360, paying particular attention to Visuals syncing with whatever is playing.

You see, today I instrumented things, and discovered that the player software is issuing needless "refresh" requests to the display driver. Needless, in the sense that the audio driver is already driving the display updates in sync (mostly) with whatever audio is playing (or not). So this logic meant that the display was being refreshed twice as many times per second as necessary, mostly just a waste of processing power as near as I could tell.

This is all very important to me, because the entire Hijack UI is simply a hook into the display refresh logic. So cutting refreshes by half cuts Hijack overhead by half. And makes things much more predictable inside Hijack, as it should now be atomic. Before v359, it was not atomic, thus the weird display jitter on some menu displays!

As of v359, the display updates, and Hijack UI, are ALWAYS only ever invoked from tq_immediate, a kind of "soft IRQ" mechanism in tne 2.2 Linux kernel. Previously, this code was ALSO being invoked simultaneously from a userspace ioctl() call into the kernel. In v359, this second invocation now just acts as another trigger for the first method.

As of v360, the second invocation doesn't even bother with the trigger -- but I'm curious if anyone can note any change in Visuals timing as a result. I cannot -- with all recent Hijack's the visuals all look delayed by about 1/10 of a second or so.

Cheers




Edited by mlord (25/01/2004 14:45)

Top
#200363 - 25/01/2004 14:48 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
foxtrot_xray
addict

Registered: 03/03/2002
Posts: 687
Loc: Atlanta, Georgia
I'll try it out shortly (since I happen to have Waldorf handy at the moment..) But, is this HiJack good for 3.00v3 AND 3.00v5?

Thanks for the hard work! :>
Me.

_________________________
Mike 'Fox' Morrey 128BPM@124MPH. Love it! 2002 BRG Mini Cooper

Top
#200364 - 25/01/2004 14:49 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Downloading now.
_________________________
Brad B.

Top
#200365 - 25/01/2004 15:01 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: foxtrot_xray]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Mark is good about that stuff. You'll be fine w. the Alphas.
_________________________
Brad B.

Top
#200366 - 25/01/2004 15:15 Hijack v360 [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Okay, v360 is now available.

By default, it no longer bothers with the redundant display refreshes from the player app. Let me know if you can actually see any difference in the Visuals.

To make comparisms easier, there is also now a (temporary) new Hijack menu entry to toggle back to the old behaviour: "Reduce Display Overhead". If one sets this back to "disabled", then the redundant refreshes *immediately* begin again until you turn it off, or until the player is rebooted (this setting is NOT saved over reboots).

Another side effect of v359+ is that long animations at boot-up may now play more smoothly -- or not. I haven't checked.

Safe for all player software versions 2.x and 3.x-alpha.

Cheers



Edited by mlord (25/01/2004 15:16)

Top
#200367 - 25/01/2004 16:20 Re: Hijack v360 [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Well, silly me.. I went outdoors to play some ice-hockey for half an hour, just got back in from the cold now, and can no longer touch type -- one of my little (smallest) fingers appears to be disabled -- cannot control one of the joints!

Broken tendon, I suppose..

Cheers

Top
#200368 - 25/01/2004 17:51 Re: Hijack v360 [Re: mlord]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Well, that sucks.

Top
#200369 - 25/01/2004 18:36 Re: Hijack v360 [Re: mlord]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Mark, it's good to see that a guy of your tallent is also able to ruff it up on ice! I'm sorry to hear about your finger, but you're typing is suffering (too much);).

In regards to your latest HiJack, mine is syncing visuals with music very well.

EDIT !! lol, I meant to type "but your typging isn't suffering". Oops!


Edited by SE_Sport_Driver (25/01/2004 21:46)
_________________________
Brad B.

Top
#200370 - 25/01/2004 21:42 Re: Hijack v360 [Re: Daria]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Mmmm.. yah.. It appears to be a case of "mallet finger", and may require a splint for 8+ weeks to heal.. Mmm..

Cheers


Edited by mlord (25/01/2004 23:11)

Top
#200371 - 25/01/2004 22:34 Re: Hijack v360 [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I've put v360 through its paces today and I can't say I see a difference. Any reduction in overhead is good, of course, but I'm not sure it's a visible difference.

Speaking of things related to the display, care to take a look at the attached patch (against v360) and see if it's worthy of inclusion in Hijack? I added two ioctl()'s, one gets the player UI flags out of the kernel, and the other gets the contents of the player's display buffer. Both of them seem to be working for what I'm doing, and in lieu of further upgrades to the userland API, I'd like to see these available.


Attachments
198872-getplayerbuffer.patch (160 downloads)

_________________________
- Tony C
my empeg stuff

Top
#200372 - 25/01/2004 23:16 Re: Hijack v360 [Re: tonyc]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
And I suppose I should finish the crap to allow injecting messages to the tuner and send that patch soon. Sigh.

Top
#200373 - 26/01/2004 04:26 Re: Hijack v360 [Re: tonyc]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
One minor nitpick. Could you fill in the comments bit?
 #define EMPEG_HIJACK_INJECTBUTTONS	_IO(EMPEG_DISPLAY_MAGIC, 90)	// Inject button codes into player's input queue

+#define EMPEG_HIJACK_GETPLAYERBUFFER _IO(EMPEG_DISPLAY_MAGIC, 91) // Inject button codes into player's input queue
+#define EMPEG_HIJACK_GETPLAYERUIFLAGS _IO(EMPEG_DISPLAY_MAGIC, 92) // Inject button codes into player's input queue

Top
#200374 - 26/01/2004 06:16 Re: Hijack v360 [Re: tman]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Guh. You've found my downfall as a programmer.

Revised patched attached.


Attachments
198895-getplayerbuffer.patch (165 downloads)

_________________________
- Tony C
my empeg stuff

Top
#200375 - 26/01/2004 07:10 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
ShadowMan
addict

Registered: 09/06/1999
Posts: 559
Loc: Newfoundland, Canada
Believe it or not but I actually used the calculator regularly.

Oh well.

Rene
_________________________
12 gig empeg Mark II, SN: 080000101
30 gig RioCar SN: 30103114
My blog

Top
#200376 - 26/01/2004 07:29 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: ShadowMan]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Believe it or not but I actually used the calculator regularly.

I imagine that Mark's intent was to encourage someone to move the calculator functionality into a user-space program, rather than having it take up space in the kernel.

Whether anyone will actually get around to doing this is another thing, however.
_________________________
-- roger

Top
#200377 - 26/01/2004 07:32 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: Roger]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
RPN here we come! Does anybody else here actually use RPN?

Top
#200378 - 26/01/2004 07:36 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: tman]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Does anybody else here actually use RPN?

Yoda?
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#200379 - 26/01/2004 09:04 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: ShadowMan]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
>Believe it or not but I actually used the calculator regularly.

I did too, until I got a cellphone that has a better calculator built-in.

I think that makes two of us, in total, as ex fans of the Hijack calculator!

Cheers

Top
#200380 - 26/01/2004 09:51 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Hijack v356, v357, v358, v359, and soon.. v360

So, I'm thinking: Taking a break from the contract work at the moment, Mark?
_________________________
-- roger

Top
#200381 - 26/01/2004 10:00 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: tman]
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Exclusively!

I've always thought that it was about 1000% faster and easier once you got used to it. I can't use a "normal" calculator now.

I've started going through Structure and Interpretation of Computer Programs (the famous "wizard book") and it is my first experience with Lisp (actually, the scheme variant of lisp).

As many of you probably know, scheme uses "prefix notation", so instead of RPN's "5 enter 5 +", you have (+ 5 5). It took some getting used to, but I like it a lot! it works with an indefinite number of arguments, which is very cool.

Jim

Top
#200382 - 26/01/2004 10:04 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: Roger]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
>So, I'm thinking: Taking a break from the contract work at the moment, Mark?

Only a small break. On my little finger!

Top
#200383 - 26/01/2004 12:21 Re: Hijack v360 [Re: Daria]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
And I suppose I should finish the crap to allow injecting messages to the tuner and send that patch soon. Sigh.
And after you finish that (or before, if you like) I could sure use a vfdlib_drawBitmapScaled() function that can display a vfdlib bitmap, scaling it to user-supplied dimensions. I've had no luck finding an appropriate image scaling algorithm, and my attempts to use the GD library to do it resulted in (as expected) very poor performance.
_________________________
- Tony C
my empeg stuff

Top
#200384 - 26/01/2004 13:37 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Mark, I was very sorry to hear about your injury. I hope that working on Hijack and answering posts on the BBS isn't hurting it.

If you're still able to type, I had an idea this morning that might be fun for Hijack, if it's even possible...

Does the player I/O report the line voltage back to the OS anywhere? I know that somewhere in the electronics, the player knows what the voltage is, so it can do the bit where it puts up the battery icon. But is that value reported anywhere that Hijack can get its mitts onto the number? If so, could that number make an appearance in the Vital Signs screen?

Dunno how you'd reformat that screen to make it fit, but I wouldn't care if it was just the number followed by "v" (i.e., no label) if that helped it fit.
_________________________
Tony Fabris

Top
#200385 - 26/01/2004 13:55 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
The hardware appears to have the capability to generate a powerfail interrupt when the car power supply drops below about 10VDC. When this happens, the kernel does a number of things, including muting the audio, writing the 128byte flash savearea, and blanking the display.

Software also disables the powerfail detection, so that the interrupt doesn't just keep interrupting things -- polling is used to detect when the powerfail trigger goes away -- voltage above 10VDC again.

The player software "sees" this by looking at /proc/empeg_power, where there is a bit labelled "1 (Powerfail enabled)". When this shows up as "0", the player displays the battery icon. When it shows as "1", the player does not display the battery icon.

EDIT: there does not appear to be a way to read the actual voltage, but rather just the trigger for above/below 10VDC.

Cheers


Edited by mlord (26/01/2004 13:56)

Top
#200386 - 26/01/2004 14:08 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Ah, that answers my question. Too bad. It would only have been useful if we could have seen the actual voltage itself.

Now that I think about it, I'm sure I've asked that question before and gotten the same answer. It's just been so long that I didn't remember.
_________________________
Tony Fabris

Top
#200387 - 26/01/2004 15:39 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: tfabris]
paulj
stranger

Registered: 10/09/2002
Posts: 48
Loc: Austin, TX
what? you asked it before and it didn't make it into the FAQ? What's the world coming to...



--pj

Top
#200388 - 26/01/2004 16:33 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: paulj]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
There's a FAQ?

Top
#200389 - 26/01/2004 16:47 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: Daria]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
It's just a model.
_________________________
Brad B.

Top
#200390 - 26/01/2004 16:50 Re: Hijack v360 [Re: tonyc]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
And after you finish that (or before, if you like) I could sure use a vfdlib_drawBitmapScaled() function that can display a vfdlib bitmap, scaling it to user-supplied dimensions. I've had no luck finding an appropriate image scaling algorithm, and my attempts to use the GD library to do it resulted in (as expected) very poor performance.


Probably after. The code for the tuner injection stuff is mostly done but needs cleanup; The real thing holding up this project is that after the last car was totalled the new vehicle's empeg install resulted in no antenna being connected to the tuner, despite what was otherwise a much nicer install. So, I either have to take the minivan (the one I had in Ohio in 2002) out to test or open the dash in the Neon, and with the crappy weather neither has happened. It's a shame, because I think tunermon works otherwise already, it just can't change what channel is being monitored.

Top
#200391 - 26/01/2004 17:01 Re: Hijack v356, v357, v358, v359, and soon.. v360 [Re: mlord]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
I don't use any of the fancy visuals, just track info, but I haven't noticed any difference between 352 and 360. Playing oggs the load avg via vital signs is about the same, 1.10 +/- 0.25

--Nathan

Top
Page 1 of 2 1 2 >