#246813 - 18/01/2005 11:11
Resetting playlist via Hijack menu?
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
I was driving to work this morning, and my empeg rebooted. It looks like a bad track -- 'cos every time I turn it on, it reboots. I don't get a chance to skip the track. Is there a way (using the Hijack knob-press menu) to clear the player's playlist, so that I can listen to some music on the way home. (Alternatively, is there anyone on the BBS who's working at Microsoft UK in Reading today who has an empeg PSU and serial cable with them? )
_________________________
-- roger
|
Top
|
|
|
|
#246814 - 18/01/2005 13:45
Re: Resetting playlist via Hijack menu?
[Re: Roger]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
Sometimes on bootup you can really quickly skip to the next track...you may want to try that a couple times. I've done that several times when on the road with a bad track. Sometimes it take a couple tries to hit it at just the right second.
_________________________
~ John
|
Top
|
|
|
|
#246815 - 18/01/2005 19:20
Re: Resetting playlist via Hijack menu?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Switch it to tuner/Aux mode if possible, then use a web browser to connect to Hijack's httpd server, and hit "play" on one of the playlists.
No way from the front panel that I can think of.
Cheers
|
Top
|
|
|
|
#246816 - 18/01/2005 22:02
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Wouldn't that be a cool hijack feature, though? Reset the playlist from the hijack menu. It could simply stop the player app and restart it with the -i command line.
Unless a bad track means that the kernel reboots and even the hijack menu can't be called up...
|
Top
|
|
|
|
#246817 - 18/01/2005 22:25
Re: Resetting playlist via Hijack menu?
[Re: tfabris]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Implement it yourselves in config.ini using ;@MENUEXEC
Cheers
|
Top
|
|
|
|
#246818 - 18/01/2005 22:26
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
|
Top
|
|
|
|
#246819 - 18/01/2005 22:55
Re: Resetting playlist via Hijack menu?
[Re: tfabris]
|
pooh-bah
Registered: 15/01/2002
Posts: 1866
Loc: Austin
|
|
Top
|
|
|
|
#246820 - 18/01/2005 22:58
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Mmm.. perhaps not so simple.. I just tried this one line script to kill the existing player threads:
Code:
;@MENUEXEC Restart_Player for y in /proc/[0-9]* ; do if ( grep -l 'player' $y/cmdline &>/dev/null ); then kill ${y:6}; fi; done; player -i &
Problem is, the Empeg's custom init process immediately restarts the player whenever it dies, giving no chance for my script to succeed with "player -i".
Mmm..
Edited by mlord (18/01/2005 22:59)
|
Top
|
|
|
|
#246821 - 19/01/2005 01:11
Re: Resetting playlist via Hijack menu?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Roger, how about a Hijack menu option to simply blank the flash savearea and then restart the player. This could cure all sorts of ills.
But I suppose the only important thing would be to clear the current playlist. It might even be nice if Hijack would detect the player crashing repeatedly and then implement that strategy autonomously.. or would it?
Cheers
|
Top
|
|
|
|
#246822 - 19/01/2005 06:39
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: be nice if Hijack would detect the player crashing repeatedly and then implement that strategy autonomously.. or would it?
Yeah, that'd be cool. I was thinking that Hijack could hook init, and if it attempted to start the player more than, say, 3 times in a minute, the 4th time it could frob the command line to add the -i.
As it turns out, though, it was a loose hard disk cable -- I still haven't hot-glued it onto the disk drives. Or at least, by the time I got home and plugged it into a serial cable, it had come loose...
_________________________
-- roger
|
Top
|
|
|
|
#246823 - 19/01/2005 06:41
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: ...use a web browser to connect to Hijack's httpd server...
I didn't bring the power supply in with me, unfortunately. I've got a spare PSU somewhere, so if I can find that, I'll just stuff it in the bag for the future.
_________________________
-- roger
|
Top
|
|
|
|
#246824 - 19/01/2005 11:35
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
Carpal Tunnel
Registered: 08/02/2002
Posts: 3411
|
Yeah, if that stategy succeeded it would be sweet.
I'm wondering how clever the custom init is. If you killed init first, and then restarted the player with the -i flag, could your then restart init without it trying to start another player instance? Or would you need to kill the player first?
_________________________
Mk2a 60GB Blue. Serial 030102962
sig.mp3: File Format not Valid.
|
Top
|
|
|
|
#246825 - 19/01/2005 13:00
Re: Resetting playlist via Hijack menu?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Mm.. yes, we already hook into the exec*("player") call for the serial port parameter, so simply counting those over a short interval would detect crash-loops, and sticking in the "-i" should be simple.
I'll put it on my TO-DO list, behind PASV ftp support -- yesterday I wrote a simple FTP server from scratch (userspace), and discovered that PASV is much simpler to implement than previously thought. But my brief attempt to then add it to Hijack just plain failed with core dumps. I need to tidy up the existing code some first, I guess.
Maybe in February, after the crunch is over (still busy writing material for Embedded Linux course that starts on Monday..)
Cheers
|
Top
|
|
|
|
#246826 - 19/01/2005 14:30
Re: Resetting playlist via Hijack menu?
[Re: mlord]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Kill it with signal 2. That'll stop it and it won't restart because it thinks it's received Ctrl-C.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#246827 - 19/01/2005 17:04
Re: Resetting playlist via Hijack menu?
[Re: wfaulk]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Quote: Kill it with signal 2. That'll stop it and it won't restart because it thinks it's received Ctrl-C.
But then init will attempt to run bash. If that exists, it'll leave you at a shell prompt in the car with no way to talk to it. The code for init looks something like this:
Code:
for (;;) { int rc = try_run_player(); if (rc == REBOOT_EMPEG) shutdown_and_reboot(); else if (rc != RESTART_PLAYER) try_run_bash(); }
Obviously, that could be refactored a little, but I hope you get the idea.
If bash doesn't exist, init will restart the player, and then you'll have two copies running.
I think the only sensible way to do it is to hook the exec() call in init.
_________________________
-- roger
|
Top
|
|
|
|
#246828 - 19/01/2005 17:20
Re: Resetting playlist via Hijack menu?
[Re: Roger]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Ah, good point. Even in the best-case scenario, you'd have an extraneous bash process lying around with nowhere to swap it to.
_________________________
Bitt Faulk
|
Top
|
|
|
|
|
|