Don't export alsa_cards from alsa.c

This commit is contained in:
Geoffrey D. Bennett
2024-02-17 00:38:27 +10:30
parent 05006284c6
commit e95cbff3d5
3 changed files with 12 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ const char *port_category_names[PC_COUNT] = {
};
// global array of cards
GArray *alsa_cards;
static GArray *alsa_cards;
// static fd and wd for ALSA inotify
static int inotify_fd, inotify_wd;
@@ -696,7 +696,7 @@ static void alsa_get_serial_number(struct alsa_card *card) {
card->serial = strdup(serial);
}
void alsa_scan_cards(void) {
static void alsa_scan_cards(void) {
snd_ctl_card_info_t *info;
snd_ctl_t *ctl;
int card_num = -1;
@@ -787,7 +787,7 @@ static gboolean inotify_callback(
return TRUE;
}
void alsa_inotify_init(void) {
static void alsa_inotify_init(void) {
GIOChannel *io_channel;
inotify_fd = inotify_init();
@@ -799,3 +799,9 @@ void alsa_inotify_init(void) {
inotify_callback, NULL, NULL
);
}
void alsa_init(void) {
alsa_cards = g_array_new(FALSE, TRUE, sizeof(struct alsa_card *));
alsa_inotify_init();
alsa_scan_cards();
}