summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-15 21:12:45 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-15 21:12:45 +0000
commit5980ca4f6fae1ba2da65c997a66b5447ade367b6 (patch)
tree08f092276734dca840a47300a01700207f4598a3 /media
parentc6725f412dddd9c307def8aedbf5db027b9e5908 (diff)
downloadchromium_src-5980ca4f6fae1ba2da65c997a66b5447ade367b6.zip
chromium_src-5980ca4f6fae1ba2da65c997a66b5447ade367b6.tar.gz
chromium_src-5980ca4f6fae1ba2da65c997a66b5447ade367b6.tar.bz2
When a new device is plugged in, the enumeration API will fail on detecting the new device because it can't open/close the new device while it is being initialized by the ALSA. This gives trouble to device monitor that the new device can't be shown in the new device list.
BUG=145495 TEST=manual test: apply patch http://codereview.chromium.org/11364048/, go to content setting media, plugin or unplug a device, the microphone device list should be updated for each action. Review URL: https://chromiumcodereview.appspot.com/11299006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/audio/linux/audio_manager_linux.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc
index fcbc2d4..48be0b7 100644
--- a/media/audio/linux/audio_manager_linux.cc
+++ b/media/audio/linux/audio_manager_linux.cc
@@ -213,16 +213,6 @@ bool AudioManagerLinux::IsAlsaDeviceAvailable(const char* device_name) {
strlen(kInvalidAudioInputDevices[i])) == 0)
return false;
}
- // The only way to check if the device is available is to open/close the
- // device. Return false if it fails either of operations.
- snd_pcm_t* device_handle = NULL;
- if (wrapper_->PcmOpen(&device_handle,
- device_name,
- SND_PCM_STREAM_CAPTURE,
- SND_PCM_NONBLOCK))
- return false;
- if (wrapper_->PcmClose(device_handle))
- return false;
return true;
}