alsa: do the wakeup differently

Directly write from the process thread, reduces potential latency.
This commit is contained in:
Wim Taymans 2018-04-19 22:00:20 +02:00
parent 57cbc5e503
commit 64d1307684
3 changed files with 81 additions and 88 deletions

View file

@ -33,7 +33,7 @@
#define CHECK_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) == 0)
static const char default_device[] = "hw:0";
static const uint32_t default_min_latency = 128;
static const uint32_t default_min_latency = 1024;
static const uint32_t default_max_latency = 1024;
static void reset_props(struct props *props)
@ -600,6 +600,8 @@ static int impl_node_process(struct spa_node *node)
spa_list_append(&this->ready, &b->link);
SPA_FLAG_UNSET(b->flags, BUFFER_FLAG_OUT);
spa_alsa_write(this, 0);
input->status = SPA_STATUS_OK;
}
return SPA_STATUS_HAVE_BUFFER;