summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/gsmd/machineplugin.h1
-rw-r--r--src/gsmd/gsmd.c7
-rw-r--r--src/gsmd/machine_gta01.c14
3 files changed, 20 insertions, 2 deletions
diff --git a/include/gsmd/machineplugin.h b/include/gsmd/machineplugin.h
index 8185fb6..73f834f 100644
--- a/include/gsmd/machineplugin.h
+++ b/include/gsmd/machineplugin.h
@@ -15,6 +15,7 @@ struct gsmd_machine_plugin {
int (*ex_submit)(struct gsmd *g);
int (*detect)(struct gsmd *g);
int (*init)(struct gsmd *g, int fd);
+ int (*initsettings)(struct gsmd *g);
};
extern int gsmd_machine_plugin_init(struct gsmd *g,
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