diff options
Diffstat (limited to 'net-voip/wengophone/files/alsa-plughw-default.patch')
-rw-r--r-- | net-voip/wengophone/files/alsa-plughw-default.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/net-voip/wengophone/files/alsa-plughw-default.patch b/net-voip/wengophone/files/alsa-plughw-default.patch new file mode 100644 index 0000000..56ed94e --- /dev/null +++ b/net-voip/wengophone/files/alsa-plughw-default.patch @@ -0,0 +1,68 @@ +Index: libs/sound/src/linux/AudioDeviceManager.cpp +=================================================================== +--- libs/sound/src/linux/AudioDeviceManager.cpp (revision 12047) ++++ libs/sound/src/linux/AudioDeviceManager.cpp (working copy) +@@ -28,39 +28,19 @@ + std::list<AudioDevice> AudioDeviceManager::getInputDeviceList() { + RecursiveMutex::ScopedLock scopedLock(_mutex); + +- //HACK: always return the default one + plughw +- std::list<AudioDevice> deviceList; +- deviceList.push_back(getDefaultInputDevice()); ++ std::list<AudioDevice> deviceList = find_alsa_devices(1); ++ deviceList.push_front(getDefaultInputDevice()); + +- StringList data; +- data += String("ALSA: plughw"); +- data += String("plughw"); +- data += EnumDeviceType::toString(EnumDeviceType::DeviceTypeWaveIn); +- deviceList.push_back(AudioDevice(data)); +- + return deviceList; +- //// +- +- //return find_alsa_devices(1); + } + + std::list<AudioDevice> AudioDeviceManager::getOutputDeviceList() { + RecursiveMutex::ScopedLock scopedLock(_mutex); + +- //HACK: always return the default one + plughw +- std::list<AudioDevice> deviceList; +- deviceList.push_back(getDefaultOutputDevice()); ++ std::list<AudioDevice> deviceList = find_alsa_devices(0); ++ deviceList.push_front(getDefaultOutputDevice()); + +- StringList data; +- data += String("ALSA: plughw"); +- data += String("plughw"); +- data += EnumDeviceType::toString(EnumDeviceType::DeviceTypeWaveOut); +- deviceList.push_back(AudioDevice(data)); +- + return deviceList; +- //// +- +- //return find_alsa_devices(0); + } + + AudioDevice AudioDeviceManager::getDefaultOutputDevice() { +@@ -131,7 +111,7 @@ + //// + + // open the sound card +- if( snd_ctl_open(&snd_ctl, alsa_card_name, 0 ) < 0 ) ++ if ( snd_ctl_open(&snd_ctl, alsa_card_name, 0 ) < 0 ) + { + LOG_WARN("unable to open card: " + String(alsa_card_name)); + break; +@@ -165,8 +145,8 @@ + int has_playback = 0; + + // compute internal device name +- snprintf(alsa_device_name, sizeof(alsa_device_name), "%s:%d,%d", "hw", +- card_index, device_index); ++ snprintf(alsa_device_name, sizeof(alsa_device_name), "%s:%d,%d", ++ "plughw", card_index, device_index); + LOG_DEBUG("alsa_device_name: " + String(alsa_device_name)); + //// + |