summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-08-09 13:03:21 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-08-09 13:03:21 -0400
commit5abeb799cf55194ce4b73ddab6d040a01c55f262 (patch)
tree67dbdb85030f9ea73bb3b8d16908860b44c97fc8 /libs
parenta34d7071753867b9aba3bca2f3436ed4a980c895 (diff)
try new code from rui/qjackctl for names of ALSA PCM devices
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/jack_utils.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/jack_utils.cc b/libs/ardour/jack_utils.cc
index ea1aea2623..0a7f4d73bf 100644
--- a/libs/ardour/jack_utils.cc
+++ b/libs/ardour/jack_utils.cc
@@ -313,6 +313,18 @@ ARDOUR::get_jack_alsa_device_names (device_map_t& devices)
if (snd_ctl_open (&handle, devname.c_str(), 0) >= 0 && snd_ctl_card_info (handle, info) >= 0) {
+ if (snd_ctl_card_info (handle, info) < 0) {
+ continue;
+ }
+
+ std::cerr << "Ctl card name is " << snd_ctl_card_info_get_name (info) << std::endl;
+ std::cerr << "Ctl ID is " << snd_ctl_card_info_get_id (info) << std::endl;
+
+ /* change devname to use ID, not number */
+
+ devname = "hw:";
+ devname += snd_ctl_card_info_get_id (info);
+
while (snd_ctl_pcm_next_device (handle, &device) >= 0 && device >= 0) {
snd_pcm_info_set_device (pcminfo, device);