#334459 - 25/06/2010 00:53
Tuner Interface
|
new poster
Registered: 07/01/2002
Posts: 22
|
After much searching through the forums / internet / etc., I couldn't find what I was looking for. Basically, just for kicks, I want to build things that use the tuner port on the EMpeg - various random devices that perhaps emulate a tuner. The only information that I could deduce from what I found on the web was that there is some serial communication between the empeg and the tuner module, and some of the radio stuff (RDS, for example) happens in the DSP. I'm not interested in any of that at this point, but a good starting place would be some sort of command documentation (code works for me) on what data is exchanged between the tuner module and the empeg, and a simple pin-out for the tuner interface (what's going over the wires). Any help is appreciated; hopefully I can make some cool stuff for my 10-year-old toy
|
Top
|
|
|
|
#334460 - 25/06/2010 02:06
Re: Tuner Interface
[Re: rcldesign]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Well, the tuner module had a kit available from PCA. He's the most qualified to give you tips and tricks (if he's got the time on his hands).
Curious what kinds of devices? The obvious ones, such as a digital satellite tuner, wouldn't be supported by the empeg's front-panel software ("98.5 FM" doesn't have a Sirius/XM equivalent), and besides that stuff would work better plugged into the empeg's Aux port anyway.
In fact, without control software running on the empeg's front panel, I can't offhand think of anything that would work better on the tuner plug than it would work on the Aux plugs. So, really curious what you've got in mind.
|
Top
|
|
|
|
#334475 - 25/06/2010 19:25
Re: Tuner Interface
[Re: tfabris]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
The empeg tuner is controlled over a simple 3-wire RS232-style serial port. Look into the kernel source file serial_sa1100.c for more info. With the Hijack kernel source tree, you'll see the CONFIG_HIJACK_TUNER code in there to "emulate" a tuner.
That oughta be a good starting point.
The tuner audio is transmitted to empeg over separate analog audio lines.
|
Top
|
|
|
|
#334481 - 25/06/2010 22:20
Re: Tuner Interface
[Re: tfabris]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
"98.5 FM" doesn't have a Sirius/XM equivalent No, but it's no less arbitrary than the Sirius and XM channel numbers. Of course, I don't think that there are enough FM "channels" to map 1:1 to Sirius/XM channels. Edit: Huh. They actually are called channels, and there are 101 of them in the US and Canada named 200(87.9MHz) through 300(107.9MHz). 116 more for AM.
Edited by wfaulk (25/06/2010 22:30)
_________________________
Bitt Faulk
|
Top
|
|
|
|
#334484 - 25/06/2010 23:19
Re: Tuner Interface
[Re: wfaulk]
|
new poster
Registered: 07/01/2002
Posts: 22
|
Does anyone have a signal pinout for the tuner connector? The riocar.org site didn't have signal descriptions (which pin is power, groung, Rx, Tx, Audio, etc.?)
For devices, I have an HD radio development kit that I was going to try to interface. Also, hooking up an iPod/iPhone would be pretty simple (they take RS232 signals to do things like next track, last track, etc., and obviously output audio)... and before someone flames me for wanting to hook an MP3 player up to an MP3 player, keep in mind that the empeg doesn't have Pandora like my iPhone does.
More devices could be CD changers that take serial data, garage door openers (though the practicality would be less than idea).. basically with a serial port, I can interface to almost anything.
I'll start looking at the source, but don't really want to try and scope signals to figure out the pinout for the connector.
|
Top
|
|
|
|
#334496 - 26/06/2010 10:58
Re: Tuner Interface
[Re: rcldesign]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
From my notes, originally posted by somebody else here. --- For ease of reference, the 8 way Molex 'tuner' connector is wired as follows:
1 - Pink - level (signal strength indicator) 2 - Grey - signal (FM MPX output) 3 - Blue - Power Ant (not connected on wiring harness) 4 - Black - 0v 5 - Brown - TX 6 - Red - RX 7 - Purple - no connection (not used in PCATS tuner nor in factory tuner) 8 - Blue - 12v
If you are unsure of the numbering of the Molex connector, please check Patrick's tuner manual.
The purple wire is probably one of the I2S lines. The other two I2S lines are actually shared with the AM/FM wires. No clue which wires are what though and from what I remember it's not even been tested. Hugo said that it was to support DAB tuners ("DABC" signal on mainboard schematics).
Edited by mlord (26/06/2010 11:07)
|
Top
|
|
|
|
#334497 - 26/06/2010 11:11
Re: Tuner Interface
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Since the FM "audio" arrives as "FM MPX" over the tuner port, you'll probably find it much simpler to use the AUX audio inputs instead, which are for conventional analog L/R stereo sound.
Could still use the tuner serial port for control, though. If you want to hijack the existing tuner software interface, _and_ use AUX-in for audio at the same time, then a minor kernel hack will be needed -- to change which "mixer" input gets selected when in "radio" mode.
Cheers
|
Top
|
|
|
|
#334501 - 26/06/2010 14:39
Re: Tuner Interface
[Re: mlord]
|
new poster
Registered: 07/01/2002
Posts: 22
|
Thanks, Mark! FM MPX output - ugh! That's a huge wrench in my project concepts! So, I guess the DSP is doing the demultiplexing of the FM data. That kinda rules out HD radio unless I hack the DSP code to do the ODFM demodulation... that'd be a LOT of work. Ok, moving on to the AUX input port Mark - can you point me to a place in the source to start looking for controlling the serial port and UI when the player is in AUX mode? In this instance, I'd prefer to keep my regular tuner working as is and just use the AUX port and the other serial port to control extra hardware. Getting an iPod/iPhone to spit out track information is really easy, if I can get the empeg to send serial commands to it.
|
Top
|
|
|
|
#334506 - 27/06/2010 01:06
Re: Tuner Interface
[Re: rcldesign]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Is there a built-in way to have hijack send pre-defined stuff out the serial port when buttons are pressed in Aux mode? If not, how can I integrate some code that does this so that it can intercept the button pushes and then output things to the serial port? The best way to approach this is probably to write a userspace app to talk to /dev/ttyS2 (?) normally (for Linux), and bind into Hijack to get buttons and draw a display UI of some sort. It has been a very long while since anyone did that here, and even longer since I implemented the means to do so. As a result you'll have to do some digging on your own, unless other people have better memories than mine (quite possible). Start here: http://empegbbs.com/ubbthreads.php/topics/44955/1Then dig around. There are example apps using this interface, which could be useful. Cheers
|
Top
|
|
|
|
#334530 - 28/06/2010 03:01
Re: Tuner Interface
[Re: mlord]
|
new poster
Registered: 07/01/2002
Posts: 22
|
Alrighty... I just sent my PCB to the PCB house to build me a nifty iPod/iPhone interface, now I just have to get the software working to control it. I think that writing an app for userspace would be the way to go... I should (in theory) be able to get track information from the iPhone and control it remotely via it's serial port. If anyone's interested, the PCB is available from http://www.batchpcb.com/product_info.php...2a36ecf77dbcbb7 for all of $7.44. I will provide schematics and a BOM if anyone wants them. The board hooks directly to an iPod/iPhone, has a switching power supply to charge the thing (1.5A @ 5V), RS-232 tranciever (iPod wants 3.3V), and audio pass-through with de-coupling capacitors... provides USB (for charging), 1/8" stereo jack and headers to wire up a custom build iPod/iPhone cable to charge, get audio, pass RS-232, and install resistors for accessory detection by the iPxx. Anyway, I've got ~2 weeks until my PCB comes, so it's time to start digging in to some code!
|
Top
|
|
|
|
#334617 - 29/06/2010 19:10
Re: Tuner Interface
[Re: rcldesign]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
It's very cool that you're going to be doing this. I don't have any use for this particular project myself, as I have a tuner and would prefer to keep it, but I am going to be working on integrating an XM interface (serial input from/output to the XM receiver, RCA output from the XM receiver into the Empeg AUX.)
Still, there might be some overlap for many of the software tasks of displaying track info, interpreting input commands for changing stations, etc., so maybe we can work together on the software end of things.
|
Top
|
|
|
|
|
|