diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-04-09 10:49:37 +1000 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-04-09 10:53:00 +1000 |
commit | 9aaabade8674f8e87621512dfb5389cc3cdbda6e (patch) | |
tree | aee195a0d7fd476ca747d4bfffb8d80f09a7f090 /plugins/alsa/alsa-transaction.c | |
parent | 12b905077c0316055409fbdf7adef0d3f41cb45e (diff) |
Updates for latest libavirt, adds avirt cleanupguppy_7.0.1guppy/7.0.17.0.1
Cleanup for avirt is introduced. There are still some issues with this when invoked whilst a PCM is active,
This now allows 4A to be restarted without a reboot.
Loops must be deleted last to avoid any cleanup issues, so to enforce this a new transaction API is added: AlsaMixerTransactionObjectAddTail.
Change-Id: Ide4bbb319e8c6a2f4209ab957d80a54690f76de4
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'plugins/alsa/alsa-transaction.c')
-rw-r--r-- | plugins/alsa/alsa-transaction.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/alsa/alsa-transaction.c b/plugins/alsa/alsa-transaction.c index 1958c87..dcfd028 100644 --- a/plugins/alsa/alsa-transaction.c +++ b/plugins/alsa/alsa-transaction.c @@ -67,6 +67,27 @@ fail: } +bool AlsaMixerTransactionObjectAddTail(AlsaMixerTransaction* list, void* object, AlsaTransactionDestructor destructor) { + bool ret = false; + AlsaMixerTransactionDataItem * newItem = NULL; + if (!list) + goto fail; + + newItem = (AlsaMixerTransactionDataItem *) malloc(sizeof(AlsaMixerTransactionDataItem)); + if (newItem == NULL) + goto fail; + + CDS_INIT_LIST_HEAD(&newItem->list_entry); + newItem->object = object; + newItem->destructor = destructor; + cds_list_add_tail(&newItem->list_entry, &list->item_list); + + ret = true; +fail: + return ret; + +} + void AlsaMixerTransactionDoCleanup(AlsaMixerTransaction* transaction) { AlsaMixerTransactionDataItem * item, *sav; |