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

@ -92,6 +92,7 @@ struct state {
bool opened;
snd_pcm_t *hndl;
int card;
bool have_format;
struct spa_audio_info current_format;
@ -135,6 +136,7 @@ struct state {
unsigned int alsa_sync:1;
unsigned int alsa_recovering:1;
unsigned int slaved:1;
unsigned int matching:1;
int64_t sample_count;