summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorerin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2008-03-18 05:35:59 +0000
committererin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2008-03-18 05:35:59 +0000
commit98fd14b2b48c3387ca236d3a285158bef3597cd8 (patch)
tree2d15be103d5b36ae65c35e227b48cc60c46fbb0f /src
parent636e8ecfdf47c6441975e41ed3f39dace55485c6 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/gsmd/gsmd.c7
-rw-r--r--src/gsmd/machine_gta01.c14
2 files changed, 19 insertions, 2 deletions
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 = &gta01_power,
.ex_submit = &atcmd_wakeup_modem,
.detect = &gta01_detect,
.init = &gta01_init,
+ .initsettings = &gta01_initsettings,
};
personal git repositories of Harald Welte. Your mileage may vary