summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorPaul McLean <pmclean@google.com>2014-08-12 13:57:10 -0700
committerPaul McLean <pmclean@google.com>2014-08-12 13:57:10 -0700
commitaf5187efbddfe7d47238ed28e48b13ca4b96b9fe (patch)
tree0f4e0e7e1e675096c8239dd0aa85dbf8ab85cffe /modules
parent9605e80e18c5361d867d70b6c4ee8efd22dee058 (diff)
downloadhardware_libhardware-af5187efbddfe7d47238ed28e48b13ca4b96b9fe.zip
hardware_libhardware-af5187efbddfe7d47238ed28e48b13ca4b96b9fe.tar.gz
hardware_libhardware-af5187efbddfe7d47238ed28e48b13ca4b96b9fe.tar.bz2
Fix problem with reloading config of new devices with same card/device numbers.
Bug 16981885 Change-Id: I65c6c418ee0d0f42c87379b614f64302d27f8e77
Diffstat (limited to 'modules')
-rw-r--r--modules/usbaudio/alsa_device_proxy.c2
-rw-r--r--modules/usbaudio/audio_hw.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/modules/usbaudio/alsa_device_proxy.c b/modules/usbaudio/alsa_device_proxy.c
index b887d1d..63a27e7 100644
--- a/modules/usbaudio/alsa_device_proxy.c
+++ b/modules/usbaudio/alsa_device_proxy.c
@@ -48,7 +48,7 @@ void proxy_prepare(alsa_device_proxy * proxy, alsa_device_profile* profile,
proxy->profile = profile;
-#if LOG_PCM_PARAMS
+#ifdef LOG_PCM_PARAMS
log_pcm_config(config, "proxy_setup()");
#endif
diff --git a/modules/usbaudio/audio_hw.c b/modules/usbaudio/audio_hw.c
index 22d5e0f..594f4bc 100644
--- a/modules/usbaudio/audio_hw.c
+++ b/modules/usbaudio/audio_hw.c
@@ -328,8 +328,7 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
if (param_val >= 0)
device = atoi(value);
- if ((card >= 0) && (card != out->profile->card) &&
- (device >= 0) && (device != out->profile->device)) {
+ if (card >= 0 && device >= 0) {
/* cannot read pcm device info if playback is active */
if (!out->standby)
ret_value = -ENOSYS;