View Single Post
Posts: 22 | Thanked: 53 times | Joined on Apr 2010 @ Amsterdam
#38
Originally Posted by qwerty12 View Post
What?! You doubted Qwerty the Pimp?! I must get my revenge by coming up with a hack to this problem!

Prerequisite:
fmtxd patched: fmtxd, using http://maemo.org/api_refs/5.0/5.0-fi...5a46afdad43a94, checks to see if you're in a call. So open up /usr/sbin/fmtxd in a hex-editor (I used vi on the tablet itself) and replace "sig_call_state_ind" with "sig_call_sttte_ind". Make sure that the transmitter isn't on whilst doing this and that fmtxd is not running.

1. Install http://talk.maemo.org/showthread.php?t=43395 (the fm_boost variant may be better, depends) (not required but you'll find it easier)
2. Unzip the attached somewhere.
3. Make a call, hit Speaker and turn on the FM Transmitter (you'll see why 1. makes this easier...)
4. As root, run "alsactl -f /speaker_fmtx_on restore" with "/speaker_fmtx_on" being wherever you placed that file.

Oh, the interference is a *****. I may write a daemon to make this easier.
I was looking for exactly this, and based on the instructions above I created a small program to make this work while driving the car.

What is does:

1. Start the program (source attached)
2. If call state changes to active the fm transmitter is started
3. Enable your speaker manualy
4. Press the camera button, the sound is routed to fm-transmitter.
5. If the call is ended the sound is set to its original state: ("alsactl -f /var/lib/alsa/asound.state restore")

ATTENTION: The program is totally modified for my own phone and configuration, e.g. the paths in the file are hardcoded.

What should be nice:
- Store the original sound settings before routing the sound, this saved state file can be restored after ending the call.
- Nice desktop widget, or phone profile (silent, general, fm-carkit)
- dbus signal to check for enabled speaker (then the camera button signal is not needed anymore)

The code isn't great at all, but it works for me and maybe someone can use it or extend it.

Thanks to user Qwerty12, I found also some dbus integration of him in another topic.
Attached Files
File Type: gz fm-carkit.tar.gz (1.4 KB, 117 views)
 

The Following 3 Users Say Thank You to Roeland For This Useful Post: