Lines Matching refs:ctl
25 static int pcm_device_list(snd_ctl_t *ctl, snd_pcm_stream_t stream, bool *first)
37 if ((err = snd_ctl_pcm_next_device(ctl, &dev)) < 0) {
46 if ((err = snd_ctl_pcm_info(ctl, pcminfo)) < 0) {
67 if ((err = snd_ctl_pcm_info(ctl, pcminfo)) < 0) {
68 error("control digital audio playback info (%s): %s", snd_ctl_name(ctl), snd_strerror(err));
92 static int rawmidi_device_list(snd_ctl_t *ctl, snd_rawmidi_stream_t stream, bool *first)
104 if ((err = snd_ctl_rawmidi_next_device(ctl, &dev)) < 0) {
113 if ((err = snd_ctl_rawmidi_info(ctl, info)) < 0) {
134 if ((err = snd_ctl_rawmidi_info(ctl, info)) < 0) {
135 error("control digital audio playback info (%s): %s", snd_ctl_name(ctl), snd_strerror(err));
150 static int hwdep_device_list(snd_ctl_t *ctl)
161 if ((err = snd_ctl_hwdep_next_device(ctl, &dev)) < 0) {
168 if ((err = snd_ctl_hwdep_info(ctl, info)) < 0) {
187 static int card_info(snd_ctl_t *ctl)
196 if ((err = snd_ctl_card_info(ctl, info)) < 0) {
197 error("Control device %s hw info error: %s", snd_ctl_name(ctl), snd_strerror(err));
209 if ((err = snd_ctl_elem_list(ctl, clist)) < 0) {
219 snd_ctl_t *ctl;
225 if ((err = snd_ctl_open(&ctl, dev, 0)) < 0) {
229 err = card_info(ctl);
233 err = pcm_device_list(ctl, SND_PCM_STREAM_PLAYBACK, &first);
235 err = pcm_device_list(ctl, SND_PCM_STREAM_CAPTURE, &first);
239 err = rawmidi_device_list(ctl, SND_RAWMIDI_STREAM_INPUT, &first);
241 err = rawmidi_device_list(ctl, SND_RAWMIDI_STREAM_OUTPUT, &first);
244 err = hwdep_device_list(ctl);
245 snd_ctl_close(ctl);