Enabled echo cancellation on the Openmoko Freerunner (and fixing the audio)

This commit is contained in:
Pierre Pronchery 2010-05-20 17:00:10 +00:00
parent 630568968e
commit 10b45a2014

View File

@ -15,8 +15,7 @@
/* TODO: /* TODO:
* - implement notification light * - implement notification light
* - implement vibrator * - implement vibrator
* - prevent deep sleep * - prevent deep sleep */
* - enable echo cancellation */
@ -67,13 +66,22 @@ static int _openmoko_event(PhonePlugin * plugin, PhoneEvent event, ...)
switch(event) switch(event)
{ {
case PHONE_EVENT_CALL_ESTABLISHED: case PHONE_EVENT_CALL_ESTABLISHED:
/* let us hear the call */
_event_mixer_set("gsmhandset.state"); _event_mixer_set("gsmhandset.state");
/* enable echo cancellation */
plugin->helper->queue(plugin->helper->phone,
"AT%N0187");
break; break;
case PHONE_EVENT_CALL_INCOMING: case PHONE_EVENT_CALL_INCOMING:
/* let us hear the ringtone */
_event_mixer_set("stereoout.state");
break;
case PHONE_EVENT_CALL_OUTGOING: case PHONE_EVENT_CALL_OUTGOING:
/* FIXME is there anything to do? */ /* let us hear the connection */
_event_mixer_set("gsmhandset.state");
break; break;
case PHONE_EVENT_CALL_TERMINATED: case PHONE_EVENT_CALL_TERMINATED:
/* restore regular audio */
_event_mixer_set("stereoout.state"); _event_mixer_set("stereoout.state");
break; break;
case PHONE_EVENT_NOTIFICATION_OFF: case PHONE_EVENT_NOTIFICATION_OFF: