mirror of git://git.sysmocom.de/ofono
handsfree-audio: Add card driver registration
This commit is contained in:
parent
46f95f0d4f
commit
d081e3d5ea
|
@ -66,6 +66,7 @@ static struct agent *agent = NULL;
|
|||
static int ref_count = 0;
|
||||
static GSList *card_list = 0;
|
||||
static guint sco_watch = 0;
|
||||
static GSList *drivers = 0;
|
||||
|
||||
static void send_new_connection(const char *card, int fd)
|
||||
{
|
||||
|
@ -534,6 +535,27 @@ static const GDBusSignalTable am_signals[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
int ofono_handsfree_card_driver_register(
|
||||
const struct ofono_handsfree_card_driver *d)
|
||||
{
|
||||
DBG("driver: %p", d);
|
||||
|
||||
if (d->probe == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
drivers = g_slist_prepend(drivers, (void *) d);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ofono_handsfree_card_driver_unregister(
|
||||
const struct ofono_handsfree_card_driver *d)
|
||||
{
|
||||
DBG("driver: %p", d);
|
||||
|
||||
drivers = g_slist_remove(drivers, (void *) d);
|
||||
}
|
||||
|
||||
void ofono_handsfree_audio_ref(void)
|
||||
{
|
||||
ref_count += 1;
|
||||
|
|
Loading…
Reference in New Issue