mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 17:16:30 +01:00
Remove device, stream, subdevice selection and incorporated in info structs
This commit is contained in:
parent
217417698c
commit
2c3d1a0639
1 changed files with 4 additions and 2 deletions
|
@ -363,7 +363,8 @@ static int soundcard_setup_collect_switches1(int cardno)
|
|||
}
|
||||
bzero(pcm, sizeof(struct pcm));
|
||||
pcm->no = device;
|
||||
if ((err = snd_ctl_pcm_info(handle, device, &pcm->info)) < 0) {
|
||||
pcm->info.device = device;
|
||||
if ((err = snd_ctl_pcm_info(handle, &pcm->info)) < 0) {
|
||||
snd_ctl_close(handle);
|
||||
error("PCM info error: %s", snd_strerror(err));
|
||||
return 1;
|
||||
|
@ -393,7 +394,8 @@ static int soundcard_setup_collect_switches1(int cardno)
|
|||
}
|
||||
bzero(rawmidi, sizeof(struct rawmidi));
|
||||
rawmidi->no = device;
|
||||
if ((err = snd_ctl_rawmidi_info(handle, device, &rawmidi->info)) < 0) {
|
||||
rawmidi->info.device = device;
|
||||
if ((err = snd_ctl_rawmidi_info(handle, &rawmidi->info)) < 0) {
|
||||
snd_ctl_close(handle);
|
||||
error("RAWMIDI info error: %s", snd_strerror(err));
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue