alsa: Disable rate matching for the same card

Add a clock name to the clock, remove the old api/clock_id. This makes
it easier to add descriptive names

Place the alsa card number in the clock name.

Check the clock name of the master clock and if it matches our own
clock, disable rate matching.
This commit is contained in:
Wim Taymans 2019-10-23 16:04:03 +02:00
parent 54f6834de4
commit 5383782336
5 changed files with 33 additions and 8 deletions

View file

@ -177,6 +177,8 @@ static int impl_node_set_io(void *object, uint32_t id, void *data, size_t size)
switch (id) {
case SPA_IO_Clock:
if (size > 0 && size < sizeof(struct spa_io_clock))
return -EINVAL;
this->clock = data;
break;
case SPA_IO_Position: