diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c index b462be6..3c29428 100644 --- a/alsactl/alsactl.c +++ b/alsactl/alsactl.c @@ -425,7 +425,7 @@ static int get_controls(int cardno, snd_config_t *top) snd_ctl_elem_list_alloca(&list); sprintf(name, "hw:%d", cardno); - err = snd_ctl_open(&handle, name); + err = snd_ctl_open(&handle, name, 0); if (err < 0) { error("snd_ctl_open error: %s", snd_strerror(err)); return err; @@ -878,7 +878,7 @@ static int set_controls(int card, snd_config_t *top) snd_ctl_card_info_alloca(&info); sprintf(name, "hw:%d", card); - err = snd_ctl_open(&handle, name); + err = snd_ctl_open(&handle, name, 0); if (err < 0) { error("snd_ctl_open error: %s", snd_strerror(err)); return err; diff --git a/alsamixer/alsamixer.c b/alsamixer/alsamixer.c index 1ae1b54..476909d 100644 --- a/alsamixer/alsamixer.c +++ b/alsamixer/alsamixer.c @@ -1252,14 +1252,14 @@ mixer_init (void) int err; snd_ctl_card_info_alloca(&hw_info); - if ((err = snd_ctl_open (&ctl_handle, card_id)) < 0) + if ((err = snd_ctl_open (&ctl_handle, card_id, 0)) < 0) mixer_abort (ERR_OPEN, "snd_ctl_open", err); if ((err = snd_ctl_card_info (ctl_handle, hw_info)) < 0) mixer_abort (ERR_FCN, "snd_ctl_card_info", err); snd_ctl_close (ctl_handle); /* open mixer device */ - if ((err = snd_mixer_open (&mixer_handle)) < 0) + if ((err = snd_mixer_open (&mixer_handle, 0)) < 0) mixer_abort (ERR_FCN, "snd_mixer_open", err); if ((err = snd_mixer_attach (mixer_handle, card_id)) < 0) mixer_abort (ERR_FCN, "snd_mixer_attach", err); diff --git a/amixer/amixer.c b/amixer/amixer.c index 91a7af2..ec2b48b 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -82,7 +82,7 @@ static int info(void) snd_ctl_card_info_alloca(&info); snd_ctl_elem_list_alloca(&clist); - if ((err = snd_ctl_open(&handle, card)) < 0) { + if ((err = snd_ctl_open(&handle, card, 0)) < 0) { error("Control device %i open error: %s", card, snd_strerror(err)); return err; } @@ -100,7 +100,7 @@ static int info(void) printf(" Controls : %i\n", snd_ctl_elem_list_get_count(clist)); } snd_ctl_close(handle); - if ((err = snd_mixer_open(&mhandle)) < 0) { + if ((err = snd_mixer_open(&mhandle, 0)) < 0) { error("Mixer open error: %s", snd_strerror(err)); return err; } @@ -402,7 +402,7 @@ static int controls(int level) snd_ctl_elem_id_t *id; snd_ctl_elem_id_alloca(&id); - if ((err = snd_hctl_open(&handle, card)) < 0) { + if ((err = snd_hctl_open(&handle, card, 0)) < 0) { error("Control %s open error: %s", card, snd_strerror(err)); return err; } @@ -566,7 +566,7 @@ static int selems(int level) snd_mixer_elem_t *elem; snd_mixer_selem_id_alloca(&sid); - if ((err = snd_mixer_open(&handle)) < 0) { + if ((err = snd_mixer_open(&handle, 0)) < 0) { error("Mixer %s open error: %s", card, snd_strerror(err)); return err; } @@ -759,7 +759,7 @@ static int cset(int argc, char *argv[], int roflag) show_control_id(id); printf("\n"); } - if ((err = snd_ctl_open(&handle, card)) < 0) { + if ((err = snd_ctl_open(&handle, card, 0)) < 0) { error("Control %s open error: %s\n", card, snd_strerror(err)); return err; } @@ -823,7 +823,7 @@ static int cset(int argc, char *argv[], int roflag) if (!quiet) { snd_hctl_t *hctl; snd_hctl_elem_t *elem; - if ((err = snd_hctl_open(&hctl, card)) < 0) { + if ((err = snd_hctl_open(&hctl, card, 0)) < 0) { error("Control %s open error: %s\n", card, snd_strerror(err)); return err; } @@ -895,7 +895,7 @@ static int sset(unsigned int argc, char *argv[], int roflag) fprintf(stderr, "Specify what you want to set...\n"); return 1; } - if ((err = snd_mixer_open(&handle)) < 0) { + if ((err = snd_mixer_open(&handle, 0)) < 0) { error("Mixer %s open error: %s\n", card, snd_strerror(err)); return err; } @@ -1046,7 +1046,7 @@ static int events(int argc ATTRIBUTE_UNUSED, char *argv[] ATTRIBUTE_UNUSED) snd_hctl_elem_t *helem; int err; - if ((err = snd_hctl_open(&handle, card)) < 0) { + if ((err = snd_hctl_open(&handle, card, 0)) < 0) { error("Control %s open error: %s\n", card, snd_strerror(err)); return err; } @@ -1123,7 +1123,7 @@ static int sevents(int argc ATTRIBUTE_UNUSED, char *argv[] ATTRIBUTE_UNUSED) snd_mixer_t *handle; int err; - if ((err = snd_mixer_open(&handle)) < 0) { + if ((err = snd_mixer_open(&handle, 0)) < 0) { error("Mixer %s open error: %s", card, snd_strerror(err)); return err; } diff --git a/aplay/aplay.c b/aplay/aplay.c index c6f1ad9..bfc361c 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -186,7 +186,7 @@ static void device_list(void) while (card >= 0) { char name[32]; sprintf(name, "hw:%d", card); - if ((err = snd_ctl_open(&handle, name)) < 0) { + if ((err = snd_ctl_open(&handle, name, 0)) < 0) { error("control open (%i): %s", card, snd_strerror(err)); continue; } @@ -466,7 +466,7 @@ int main(int argc, char *argv[]) goto __diga_end; } sprintf(ctl_name, "hw:%d", ctl_card); - if ((err = snd_ctl_open(&ctl_handle, ctl_name)) < 0) { + if ((err = snd_ctl_open(&ctl_handle, ctl_name, 0)) < 0) { error("Unable to open the control interface '%s': %s", ctl_name, snd_strerror(err)); goto __diga_end; }