This is weird!

Posted by: tonyc

This is weird! - 15/03/2001 21:29

I've been doing some kernel tweaking (IR related) and this morning when I put my Empeg in my car, whenever I used the remote, there was a slight (50 ms or less) "delay" and skip in the music before the remote worked. Also, whenever I used the front panel buttons, they got "stuck" down, not physically, but one click of the button would keep it stuck in fast forward or rewind, whatever button I hit was "stuck" according to the kernel. I figured I had a bug, wouldn't be the first time...

So I bring it inside tonight, plug it in, and everything works FINE. No delay, no music skip, remote response is instantaneous, and the front panel buttons work FINE.

What the HECK is going on here? I can post the code I've been working on, but what could possibly be different that is making my kernel code behave totally different in the car? It's not like the code is looking at the power state, at least not that I've seen.

I'm stumped... Some of this kernel hacking is new to me, I'm a C systems programmer, but this is my first venture into Linux kernel land. Weird territory. :)

Incidentally what I'm trying to do is enable a "modifier key" function with one of the steering wheel remote's buttons, as I had stated in another post. It's working at home and in the car, but needs a couple tweaks. I don't get this goofy bug though!!!

-Tony
MkII #554
Posted by: Roger

Re: This is weird! - 16/03/2001 04:48

Are you tracing anything to the serial port in your modified kernel (e.g. using printk)? The player has the ports set to 4800 baud (IIRC) in the car, as opposed to 115K at home, which can cause an apreciable slowdown.

Roger - not necessarily speaking for empeg
Posted by: tonyc

Re: This is weird! - 16/03/2001 07:31

Ah HA! That's got to be it. I have a bunch of printk traces in there. I'll try removing those and see how things work. How does one change the docked serial rate? Is it a config change or is there some #define I can change somewhere?


-Tony
MkII #554
Posted by: kim

Re: This is weird! - 16/03/2001 07:40

How does one change the docked serial rate? Is it a config change or is there some #define I can change somewhere?

Check your /empeg/var/config.ini file. There should be [Serial] block which can have a car_rate=115200 variable.

Kim

Posted by: tonyc

Re: This is weird! - 16/03/2001 08:52

I figured it was something like that. Thanks.

-Tony
MkII #554
Posted by: altman

Re: This is weird! - 24/03/2001 01:59

The reason this causes a problem is because printk disables all interrupts until the text has completely left the serial port - so that debug messages are guaranteed to be seen even if the cpu crashes right afterwards.

The buttons send what looks like IR signals to the main board, which are interpreted on interrupts. No interrupts, no button press/release codes are seen.

Hugo