#300629 - 26/07/2007 16:34
Re: Seeburg Wallbox -- Video Demo
[Re: techtom]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Very, very cool! Good work!
Now how about a Seeburg wallbox group buy?
|
Top
|
|
|
|
#300630 - 26/07/2007 19:47
Re: Seeburg Wallbox -- Video Demo
[Re: techtom]
|
carpal tunnel
Registered: 08/07/1999
Posts: 5549
Loc: Ajijic, Mexico
|
Quote: demo of my seeburg wallbox interface.
Impressive!
I noticed one absolutely trivial discrepancy. I'm not criticizing, just curious: When you skipped to the second track, the time stamp showed the track starting at 2:14, instead of 0:00, even though it was actually the beginning of the song.
Is this fixable, even though it doesn't really need to be?
tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"
|
Top
|
|
|
|
#300631 - 26/07/2007 20:19
Re: Seeburg Wallbox -- Video Demo
[Re: tanstaafl.]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31604
Loc: Seattle, WA
|
Is it possible that he had the time display mode set to "Count down"? And in any case, that wasn't *his* display, that was the now-and-next display built into the empeg player software, he can't change that. If there's a bug related to that, it's far too late to fix it now.
|
Top
|
|
|
|
#300632 - 26/07/2007 20:23
Re: Seeburg Wallbox -- Video Demo
[Re: tfabris]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31604
Loc: Seattle, WA
|
Ah, I see. He had the time display set to "Playlist elapsed/Total". It's working correctly.
It starts off with his first song entry being a song of 2:14 in length. Then he enqueues a second song, thus making the total playlist time be over four minutes. When he presses "Next" to advance to the second song, the time index starts at 2:14 because it's the playlist position (the end of the 2:14 song).
|
Top
|
|
|
|
#300633 - 26/07/2007 22:58
Re: Seeburg Wallbox -- Video Demo
[Re: tfabris]
|
carpal tunnel
Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
|
Quote: Absolutely fucking brilliant.
Awesome.
tfabris, you are fined one credit for a violation of the verbal morality statute.
_________________________
Glenn
|
Top
|
|
|
|
#300634 - 01/08/2007 09:51
Re: It works!
[Re: techtom]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14497
Loc: Canada
|
Quote:
1. I was planning to use the DTR output as the pullup resistor +5V source. But it looks like it's deasserted (-5V). Most rs-232 DTEs assert DTR. I can turn it on in my driver, but is it used for something else?
I think it is available. The docking connector uses CTS for "headlight", and CD for "telephone mute", but DTR seems to have no non-standard (RS232) use.
Quote:
2. I'm currenly using fprintf(empeg_notify_fp,"SERIAL=#fid\n") to queue the song. But I was thinking of using the "write" portion of my driver to "notify" the Hijack kernel directly. I've looked at notify.c, but I'm not sure which function to call.
The implementation of "SERIAL=" itself calls hijack_serial_rx_insert(the_string, strlen(the_string, 1)), where the_string must include a trailing '\n' (newline).
Quote:
3. I'm using down(&sem) but I'd like to use down_interrruptable. When I do, I get an unresolved external. I #include <asm-arm/semaphore.h> but it doesn't help.
That's weird. down_interruptible() is a kernel inline function, so it doesn't really exist at run/link time. Don't even thing about declaring it with a function prototype or extern line. The correct include file is asm/semphore.h, but if that's not working for you, then you could try including asm/proc/semaphore.h before it.
Quote:
4. What's the best licence to release under (e.g. BSD)?
You have no choice for the kernel module: GPLv2. For the rest, LGPL or GPL are both good (IMHO). With full souce code released, BSD is also decent.
Quote:
5. I'd like to release the code, but I probably need some sort of "code review" for my kernel / driver changes. Can anyone help out?
Just release it, and anyone who cares will eventually have a peek at it. That's the whole idea for open source stuff!
Quote:
6. How do I pick a "real" device MAJOR number?
It varies, depending upon the kernel version. For the empeg kernel, the simplest is to just re-use an existing one that never had meaning on an empeg. But there is some documentation for your exact question in the Documentation/devices.txt file from the kernel source tree.
Cheers!
|
Top
|
|
|
|
#300635 - 02/08/2007 20:28
Seeburg release in progress...
[Re: mlord]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote:
... DTR seems to have no non-standard (RS232) use.
I've looked at serial_sa1100.c It looks like they have ifdef/removed DTR support from the serial driver. I could re-implement the DTR functionality (e.g flush before de-asserting DTR, etc), but I'm just planning on asserting DTR when port 1 is opened.
Quote:
The implementation of "SERIAL=" itself calls hijack_serial_rx_insert(the_string, strlen(the_string, 1))
Yup, found that too. I'll call it directly. Thanks. I noticed that when I write to empeg_notify, I need to send "+" as "%2B". When I call rx_insert directly, Can I send "#FID+\n" or do I still need to send "#FID%2B\n"?
Quote:
That's weird. down_interruptible() is a kernel inline function, so it doesn't really exist at run/link time.
Yes it is wierd... <asm-arm/semaphore.h> actually has the inline definition of down_interruptible. There's probably some #define that's turning it off...
Quote:
Just release it, and anyone who cares will eventually have a peek at it.
How exactly do I release the kernel part? I'm using v459 patched to v461 (serial bug v441 fixes). are you willing accept it into the hijack source tree? I'd need the latest source tarball which I would provide diff -c patch files. Most of the work is done in reset_timer (timer.h) and in my seeburg.c driver. Small changes in notify.c, mem.c and serial_sa1100.c (DTR). I can also create a menuconfig item in arch/arm/config.in to turn on/off seeburg driver support.
Quote:
Quote:
6. How do I pick a "real" device MAJOR number?
For the empeg kernel, the simplest is to just re-use an existing one that never had meaning on an empeg. [See] Documentation/devices.txt file from the kernel source tree.
Ok I'll use 51 (Baycomm radio modem in devices.txt)
Thanks for all your help!
-Techtom
|
Top
|
|
|
|
#300636 - 02/08/2007 21:38
Re: Seeburg release in progress...
[Re: techtom]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14497
Loc: Canada
|
Quote: I noticed that when I write to empeg_notify, I need to send "+" as "%2B". When I call rx_insert directly, Can I send "#FID+\n" or do I still need to send "#FID%2B\n"?
Do the same as you did when writing to /proc/empeg_notify.
Quote:
How exactly do I release the kernel part?
You could start by posting it here as an attachment. Then I can have a look-see and decide how best to incorporate it into Hijack (based mostly on code size, compatbility, etc..).
Cheers
Edited by mlord (02/08/2007 21:39)
|
Top
|
|
|
|
#300637 - 03/08/2007 20:32
Re: Seeburg Wallbox -- Video Demo
[Re: gbeer]
|
addict
Registered: 25/06/2002
Posts: 456
|
Quote: tfabris, you are fined one credit for a violation of the verbal morality statute.
I never did get the hang of using those shells.
Enhance your calm, Glenn Spartan.
|
Top
|
|
|
|
#300638 - 07/08/2007 05:56
Re: Seeburg Wallbox release, Attached
[Re: mlord]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote:
Quote:
How exactly do I release the kernel part?
You could start by posting it here as an attachment. Then I can have a look-see and decide how best to incorporate it into Hijack (based mostly on code size, compatbility, etc..).
Mark, Attached is my driver for the Seeburg Wallbox. It consists of two files (attached). The sampler runs in linux/include/asm-arm/arch-sa1100/time.h and the driver is in a separate file seeburg.c
I also made the following small changes in three files (in pseudo diff -c) Code:
file:drivers/char/serial_sa1100.c line 2342 . #ifdef SERIAL_DEBUG_OPEN printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line, info->state->count); #endif + //hack -- force on DTR because driver doesn't + if(line==1) + GPDR &= ~EMPEG_SERIALDTR; + //hack-end . . . file /drivers/char/mem.c line 699 . extern void empeg_cs4231_init(void); extern int empeg_power_init(void); + extern int seeburg_init(void); + seeburg_init(); #ifdef CONFIG_EMPEG_RAMTEST . . . file: arch/arm/special/notify.c line 40 . #define NOTIFY_FIDLINE 2 // index of 'F' in notify_chars[] +#define NOTIFY_SOUNDLINE 6 // index of 'S' in notify_chars[] #define NOTIFY_MAX_LENGTH 64 static char notify_data[NOTIFY_MAX_LINES][NOTIFY_MAX_LENGTH] = {{0,},}; . +const char *notify_sound (void) +{ + return ¬ify_data[NOTIFY_SOUNDLINE][0]; +}
Attachments
302342-time_upload.h (891 downloads)
|
Top
|
|
|
|
#300639 - 07/08/2007 05:58
Re: Seeburg Wallbox release, Attached
[Re: techtom]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Seeburg.c driver attached
(time.h is attached in the previous post)
Attachments
302343-seeburg_upload.c (816 downloads)
Edited by techtom (07/08/2007 14:50)
|
Top
|
|
|
|
#300640 - 07/08/2007 11:29
Re: Seeburg Wallbox release, Attached
[Re: techtom]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14497
Loc: Canada
|
Quote: Seeburg.c driver attached
It seems to be missing an interrupt handler or some such thing, where the up(&seeburg_sem) line lives.
EDIT: oh, nevermind. That part was buried in the prior attachment.
Could you perhaps just create a proper unified patch instead, by running this command (below) to differentiate between an original Hijack kernel tree and your modified kernel treee?
diff -u --recursive --new-file hijack-v477/ seeburg/
Edited by mlord (07/08/2007 11:33)
|
Top
|
|
|
|
#300641 - 07/08/2007 14:46
Re: Seeburg Wallbox release, Attached
[Re: mlord]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote:
Could you perhaps just create a proper unified patch instead, by running this command (below) to differentiate between an original Hijack kernel tree and your modified kernel treee?
diff -u --recursive --new-file hijack-v477/ seeburg/
Sure. How do I change the directory name and have buildit still work? I ask because I patched v459 to v461 but when I tried to rename the directory to v461 the build complained about not being able to find files based off the v459 path.
Do I need to patch to the current v477 or can I do the diff -u on my unmodified v461 tree?
-Techtom
|
Top
|
|
|
|
#300642 - 07/08/2007 16:08
Re: Seeburg Wallbox release, Attached
[Re: techtom]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14497
Loc: Canada
|
Quote:
Do I need to patch to the current v477 or can I do the diff -u on my unmodified v461 tree?
A diff against v461 (but not v460) should be new enough for this purpose, so just diff what you've got.
The buildit script was just my own personal convenience hack.
Cheers
|
Top
|
|
|
|
#300643 - 07/08/2007 22:58
Re: Seeburg Wallbox release, Attached
[Re: mlord]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote:
A diff against v461 should be new enough for this purpose, so just diff what you've got.
As requested... One of two attachments.
-Techtom
Attachments
302359-driver.patch (785 downloads)
|
Top
|
|
|
|
#300644 - 07/08/2007 22:59
Re: Seeburg Wallbox release, Attached
[Re: mlord]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote:
A diff against v461 should be new enough for this purpose, so just diff what you've got.
As requested... Two of two attachments. This patch is for time.h only. It looks like I ran "indent" on the time.h file after I added my code. Thats why there are alot of changes in the patch. All "real" changes are confined within the #ifdef MAX_SAMPLES.
-Techtom
Edited to change attachment to cleaner version of the patch
Attachments
302360-time_small.patch (798 downloads)
Edited by techtom (08/08/2007 01:45)
|
Top
|
|
|
|
#300645 - 08/08/2007 00:31
Re: Seeburg Wallbox release, Attached
[Re: techtom]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14497
Loc: Canada
|
Quote:
As requested... Two of two attachments. This patch is for time.h only. It looks like I ran "indent" on the time.h file after I added my code.
Ghad. Could ya maybe do it again with the -b flag then ?
I really just want to see what you did, not what was cumulatively there since 1991 or so.
Thanks.
|
Top
|
|
|
|
#300646 - 08/08/2007 01:44
Re: Seeburg Wallbox release, Attached
[Re: mlord]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote:
Could ya maybe do it again with the -b flag then ?
Here ya go...
-Techtom
Attachments
302367-time_small.patch (787 downloads)
|
Top
|
|
|
|
#300647 - 12/08/2007 03:43
Re: Seeburg Wallbox release, time.h patch for V477
[Re: techtom]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
I've attached my latest patch for time.h. The previous time.h patch failed on hunk #3 with Hijack source tree v477. To add my driver to the latest v477 hijack, you need the attached patch and the driver patch in this post (i.e. attachment one of two). Please don't use the old time.h patches attachements from the previous posts. -Techtom
Attachments
302501-time_h_477.patch (782 downloads)
|
Top
|
|
|
|
#300648 - 13/09/2007 19:36
Re: Seeburg Wallbox release, time.h patch for V477
[Re: techtom]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
I think this is one of the coolest things I have seen done with an empeg !!! Is there any chance of someone putting together a summary of how someone like me might get this working on my empeg, I'd really like to give it a go, but you guys have kinda lost me From a hardware point of view, I assume the Seeburg unit has the 25v supply connected, with just the pulse output of the unit connected to the empeg via the serial port, am I right ??? This is soooo cool Cheers Cris.
|
Top
|
|
|
|
#300649 - 14/09/2007 19:46
Re: Seeburg Wallbox release, time.h patch for V477
[Re: techtom]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
Just re-read my post, I think what I am really asking is can you post a copy of the patched kernel and info on how the whole project can together. I am sure there are few people here who would love to give something similar a try Cheers Cris.
|
Top
|
|
|
|
#300650 - 15/09/2007 01:54
Re: Seeburg Wallbox release, time.h patch for V477
[Re: Cris]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote: Just re-read my post, I think what I am really asking is can you post a copy of the patched kernel and info on how the whole project can together.
I am sure there are few people here who would love to give something similar a try
I started this thread to answer questions about how to modify the kernel/hijack. I posted kernel patches to allow Mark to include my driver in the hijack release if there was enough interest. Now that the project is finished I'll release a package in the projects section with everything you'll need to interface a seeburg wallbox to your empeg:
modified v478 HiJack kernel my Seeburg application instructions to mknod /dev/seeburg and install the application simple schematic and parts list for the cable and power supply
I'm on my way back from vacation, but I'll try to get something out late next week.
Techtom
Edited by techtom (15/09/2007 02:02)
|
Top
|
|
|
|
#300651 - 15/09/2007 04:11
Re: Seeburg Wallbox release, time.h patch for V477
[Re: techtom]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
Quote: I'm on my way back from vacation, but I'll try to get something out late next week.
Brilliant!
There is no rush of course, my unit is in safe hands in the States until I can figure a cost effective way of shipping it across the pond
Again, cool project
Cheers
Cris.
|
Top
|
|
|
|
#300652 - 17/09/2007 05:06
Seeburg Wallbox -- Schematic
[Re: Cris]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Attached is a simple schematic for the power supply and interface cable. The seeburg interface cable does not interfere with the normal opperation of the serial port. All of the "important" signals are passed through.
-Tecthom
Attachments
303604-SeeburgSchematic.pdf (1634 downloads)
|
Top
|
|
|
|
#300653 - 17/09/2007 05:09
Re: Seeburg Wallbox -- Picture
[Re: techtom]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Attached is a picture of the completed Seeburg interface cable.
-T
Attachments
303605-SeeburgCable.JPG (2054 downloads)
Edited by techtom (17/09/2007 05:09)
|
Top
|
|
|
|
#300654 - 17/09/2007 06:21
Re: Seeburg Wallbox -- Picture
[Re: techtom]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
Thanks for the detail! Just what I need So you are wiring this direct to the serial port on the emepg's wiring harness ? I wonder if the 50Hz supply here in the UK will effect the pulse times from the Seeburg? And also I think I have a 200 selection unit, so I guess I may have to learn how to do all this stuff myself anyway Thanks for the help so far. Cheers Cris.
|
Top
|
|
|
|
#300655 - 17/09/2007 21:26
Re: Seeburg Wallbox -- Picture
[Re: techtom]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14497
Loc: Canada
|
Hi, *someday* I'll get round to incorporating your patches into the Hijack source tree. In the meanwhile, if you have any updates, then just re-post the "diff -u" output against a recent Hijack.
Thanks
|
Top
|
|
|
|
#300656 - 21/09/2007 16:37
Re: Seeburg Wallbox -- Picture
[Re: Cris]
|
carpal tunnel
Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
|
Cris, seeing as hacking kernels isn't your thing, why don't you try and use a microcontroller like a Picaxe to fit between your box and your empeg, I bet you'd find it much easier. The Picaxe is a piece of piss to program.
_________________________
Cheers,
Andy M
|
Top
|
|
|
|
#300657 - 21/09/2007 18:59
Re: Seeburg Wallbox -- Picture
[Re: andym]
|
journeyman
Registered: 30/12/2002
Posts: 51
Loc: Southern California
|
Quote: ...why don't you try and use a microcontroller like a Picaxe to fit between your box and your empeg, I bet you'd find it much easier.
Actually the work that chris would need to do has nothing to do with the kernel. The kernel collects 256, 10ms samples of the pulses from the seeburg wallbox and the seeburg application parses the samples to identify the button pressed. Chris would need to modify my seeburg app to adjust for the 50Hz driving the motor. My seeburg app uses a big state machine to convert the samples into pulses and the pulses into a button press. So chris only needs to adjust the state machine. If you used the picaxe, you would end up writing the exact same state machine. I looked into a PIC based off the shelf $99 seeburg to rs-232 interface. But there isn't a free serial port on the empeg, so I ended up doing this version.
My seeburg app should work with the 160 and 200 song wallboxes. The app will read up to 200 entries in a play list, but I only have the 100, so I can't test the extra buttons. The app will writeout to disk (assuming rw) the 256 samples when ever the state machine fails. (e.g. badstate_v224.bin) I can post process the file and figure out what went wrong.
-Techtom
Edited by techtom (22/09/2007 04:15)
|
Top
|
|
|
|
#300658 - 22/09/2007 05:24
Re: Seeburg Wallbox -- Picture
[Re: andym]
|
pooh-bah
Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
|
Quote: Cris, seeing as hacking kernels isn't your thing, why don't you try and use a microcontroller like a Picaxe to fit between your box and your empeg, I bet you'd find it much easier. The Picaxe is a piece of piss to program.
I like the idea. And I think an ultimate goal may be this solution. I had been looking around at other solutions but hadn't seen this product before.
I'd like to develop something that would interface with my slimserver network in the house, say over WiFi. But for now using the empeg seems like a really good idea, it gets used once every 2 weeks or so at the moment and this will put it back into regular usage.
I guess I will have to wait for my unit to turn up and see if it works first
I am still unsure how you build the seeburg driver into Hijack, is it possible to post a patched version here that I could upload just like anyother hijack update?
Cheers
Cris.
|
Top
|
|
|
|
|
|