summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2014-07-18 21:38:00 +0200
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-08-14 23:33:18 -0300
commit85e7f9c918a1242df4e0e9a6d308fec77c5a26e8 (patch)
tree20ac34435ecf49dd5b48f4a285d6b71d05435c3e /src
parentba9cd7016346ab81390f5ca09ad99d832e26b106 (diff)
alsa: lets call the ready_cb and disconnect_cb
Diffstat (limited to 'src')
-rw-r--r--src/lib/backends/alsa/alsa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/backends/alsa/alsa.c b/src/lib/backends/alsa/alsa.c
index af100d9..3616bca 100644
--- a/src/lib/backends/alsa/alsa.c
+++ b/src/lib/backends/alsa/alsa.c
@@ -12,6 +12,7 @@ typedef struct _Context {
12 sink_input_event_cb sink_input_cb; 12 sink_input_event_cb sink_input_cb;
13 source_event_cb source_cb; 13 source_event_cb source_cb;
14 disconnect_event_cb disconnect_cb; 14 disconnect_event_cb disconnect_cb;
15 ready_event_cb ready_cb;
15 Eina_List *sinks; /*list of sinks*/ 16 Eina_List *sinks; /*list of sinks*/
16 Eina_List *sources; /*list of sources*/ 17 Eina_List *sources; /*list of sources*/
17 Eina_List *cards; /*list of names which are recognized*/ 18 Eina_List *cards; /*list of names which are recognized*/
@@ -207,6 +208,7 @@ _alsa_device_sink_create(snd_mixer_t *mixer, const char *name, const char* hw_na
207 ctx->sink_cb((Emix_Sink*) sink, EMIX_EVENT_ADDED); 208 ctx->sink_cb((Emix_Sink*) sink, EMIX_EVENT_ADDED);
208 ctx->sinks = eina_list_append(ctx->sinks, sink); 209 ctx->sinks = eina_list_append(ctx->sinks, sink);
209 //TODO set mute 210 //TODO set mute
211 ctx->ready_cb();
210 return sink; 212 return sink;
211} 213}
212 214
@@ -425,12 +427,14 @@ _alsa_init(sink_event_cb sink_cb, sink_input_event_cb input_cb,
425 ctx->sink_input_cb = input_cb; 427 ctx->sink_input_cb = input_cb;
426 ctx->source_cb = source_cb; 428 ctx->source_cb = source_cb;
427 ctx->disconnect_cb = disconnect_cb; 429 ctx->disconnect_cb = disconnect_cb;
430 ctx->ready_cb = ready_cb;
428 _alsa_cards_refresh(); 431 _alsa_cards_refresh();
429} 432}
430 433
431static void 434static void
432_alsa_shutdown(void) 435_alsa_shutdown(void)
433{ 436{
437 ctx->disconnect_cb();
434 free(ctx); 438 free(ctx);
435 ctx = NULL; 439 ctx = NULL;
436} 440}