This is actually a question from Jon, which he sent to me via private / hidden email. I'm answering it here, so that any information won't get lost in the way that emails do.

Originally Posted By: Jon
Do you have any example for controlling the mark1 and mark2 empeg
tuners.

I know the MK2 one is serial but I don't know what it all looks like to
user space. I seem to remember the MK1 tuner is I2C ?

Anything you have would be useful. I've added support for a tea5767
tuner to my raspberry pi board and code, this works ok. I was hoping to
add tuner support to my software for both mk1 and mk2 players. I have
some hardware into from Patrick but he has nothing code wise relating to
the host.


The player app communicates directly with the tuner, through the serial_sa1100.c kernel driver. Within that driver code, are two routines that get called: transmit_chars() for sending stuff to the tuner, and receive_chars() for handling bytes receive from the tuner. These routines are shared with the non-tuner serial port, so anything one does there has to first check which port is being accessed.

If you dig into there, you'll notice that Hijack already has its grubby little fingers into those functions, so that it can implement the fake_tuner=1 option from the config.ini file. This flag, when set, allows one to explore the player's tuner "GUI" without a tuner installed. You may find that useful. To do this, the code has to recognize, intercept, and fake responses to a few of the tuner commands.

That's about all I know. But were one armed with the tuner chip datasheet, it should be straightforward to add code to remap commands/responses intended for the factory tuner chip, into appropriate format for the teac5767 chip. There are only a handful of commands used, so not as bad perhaps as it first sounds.

Cheers