udev: Add support for setting IFX audio configuration

This adds three more extra configuration options for IFX specific
hardware setups. They are OFONO_IFX_MODEL, OFONO_IFX_AUDIO and also
OFONO_IFX_LOOPBACK.

An example usage would be like this:

ENV{OFONO_IFX_MODEL}="XMM6260", ENV{OFONO_IFX_AUDIO}="FULL_DUPLEX"

The actual supported values are not defined by the IFX modem
detection code. This is up to the modem plugin to change behavior
if needed.
This commit is contained in:
Marcel Holtmann
2010-09-29 07:34:22 +09:00
parent d70d422866
commit 5d1b9d5925

View File

@@ -224,12 +224,16 @@ static void add_ifx(struct ofono_modem *modem,
entry = udev_device_get_properties_list_entry(udev_device);
while (entry) {
const char *name = udev_list_entry_get_name(entry);
const char *value;
const char *value = udev_list_entry_get_value(entry);
if (g_str_equal(name, "OFONO_IFX_LDISC") == TRUE) {
value = udev_list_entry_get_value(entry);
if (g_str_equal(name, "OFONO_IFX_MODEL") == TRUE)
ofono_modem_set_string(modem, "Model", value);
else if (g_str_equal(name, "OFONO_IFX_LDISC") == TRUE)
ofono_modem_set_string(modem, "LineDiscipline", value);
}
else if (g_str_equal(name, "OFONO_IFX_AUDIO") == TRUE)
ofono_modem_set_string(modem, "AudioSetting", value);
else if (g_str_equal(name, "OFONO_IFX_LOOPBACK") == TRUE)
ofono_modem_set_string(modem, "AudioLoopback", value);
entry = udev_list_entry_get_next(entry);
}