BT, EMBEDDED, thread joining

Fix a few BT issues (detection & sink name)
End threads on any server missing for too long (except if server IP set
manually)
Still cannot end threads when BT active (works wit I2S)
Thread lokc-up still happens when switching tracks quickly
This commit is contained in:
philippe44
2019-06-30 23:29:34 -07:00
parent e492b57b3b
commit 83f9f3320e
9 changed files with 73 additions and 26 deletions

View File

@@ -167,6 +167,11 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
* Terminate DAC output
*/
void output_close_i2s(void) {
LOCK;
running = false;
UNLOCK;
pthread_join(thread, NULL);
pthread_join(stats_thread, NULL);
i2s_driver_uninstall(CONFIG_I2S_NUM);
free(obuf);
}