diff options
author | Robin Gareus <robin@gareus.org> | 2019-06-04 19:20:26 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-06-04 19:20:26 +0200 |
commit | 34b671911c875ab98bc7681c3f3e1270114522f2 (patch) | |
tree | c29d2aab0ff9e29e4ddbf0e02904f58390c11d07 /libs/ardouralsautil | |
parent | 09030336ce9eaf6c3d42c2c4046cbe9706e36eff (diff) |
Skip name-suffix for first ALSA sub-device
This fixes an issue when a device has more than one
playback sub-device, but only a single capture sub-device (or vice
versa).
Diffstat (limited to 'libs/ardouralsautil')
-rw-r--r-- | libs/ardouralsautil/devicelist.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libs/ardouralsautil/devicelist.cc b/libs/ardouralsautil/devicelist.cc index 3c1d5af16f..5092525ccb 100644 --- a/libs/ardouralsautil/devicelist.cc +++ b/libs/ardouralsautil/devicelist.cc @@ -107,7 +107,19 @@ ARDOUR::get_alsa_audio_device_names (std::map<std::string, std::string>& devices uniq_name += " (" + PBD::to_string (device) + ")"; devices.insert (std::make_pair (uniq_name, hwname)); - +#if 0 // disabled (blame the_CLA's laptop) + /* It may happen that the soundcard has multiple sub-devices for playback + * but none for recording. + * + * In that case the playback device-name has a suffix "(0)" while + * the capture device has none. + * + * This causes issues for backends that use + * ::match_input_output_devices_or_none() + * + * (the alternative would be to always add a suffix, + * and the proper solution would be to compare the hw:name) + */ /* remname the previous entry */ hwname = devices[card_name]; devices.erase (devices.find (card_name)); @@ -116,6 +128,7 @@ ARDOUR::get_alsa_audio_device_names (std::map<std::string, std::string>& devices uniq_name = card_name + " (" + hwname.substr (se + 1) + ")"; devices.insert (std::make_pair (uniq_name, hwname)); +#endif } } |