From 98fd14b2b48c3387ca236d3a285158bef3597cd8 Mon Sep 17 00:00:00 2001 From: erin_yueh Date: Tue, 18 Mar 2008 05:35:59 +0000 Subject: gsmd: add AT commands for GTA01 devices (Erin Yueh) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4215 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/gsmd.c | 7 +++++-- src/gsmd/machine_gta01.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index 2373a06..44dac60 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -196,8 +196,11 @@ static int gsmd_initsettings2(struct gsmd *gsmd) sms_cb_init(gsmd); - if (gsmd->vendorpl && gsmd->vendorpl->initsettings) - return gsmd->vendorpl->initsettings(gsmd); + if (gsmd->vendorpl && gsmd->vendorpl->initsettings){ + rc |= gsmd->vendorpl->initsettings(gsmd); + rc |= gsmd->machinepl->initsettings(gsmd); + return rc; + } else return rc; } diff --git a/src/gsmd/machine_gta01.c b/src/gsmd/machine_gta01.c index c8a3681..85be9bf 100644 --- a/src/gsmd/machine_gta01.c +++ b/src/gsmd/machine_gta01.c @@ -171,10 +171,24 @@ static int gta01_init(struct gsmd *g, int fd) return 0; } +static int gta01_initsettings(struct gsmd *g) +{ + int rc = 0; + struct gsmd_atcmd *cmd; + + /* use @AUL: to load audio table */ + rc |= gsmd_simplecmd(g, "AT@AUL=\"0\""); + /* use @ST: configure the sidetone level */ + rc |= gsmd_simplecmd(g, "AT@ST=\"-26\""); + + return rc; +} + struct gsmd_machine_plugin gsmd_machine_plugin = { .name = "TI Calypso / FIC firmware", .power = >a01_power, .ex_submit = &atcmd_wakeup_modem, .detect = >a01_detect, .init = >a01_init, + .initsettings = >a01_initsettings, }; -- cgit v1.2.3