From f9491483bcceb94dc6ca493e06546cb5e2cadb36 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 11 Oct 2010 09:58:05 -0700 Subject: Fix audio record broken Audio input stream can not be opened because function snd_pcm_hw_params_get_period_size() now returns an error. Probably due to one of the recent kernel commits. The result of this call was not used anyway with current patch so removed it. Change-Id: I36f2dbdc94e6ec726d9c0df063d0ec3702c1b94a --- libaudio/AudioHardwareALSA.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libaudio') diff --git a/libaudio/AudioHardwareALSA.cpp b/libaudio/AudioHardwareALSA.cpp index 98ad027..b3d05d2 100755 --- a/libaudio/AudioHardwareALSA.cpp +++ b/libaudio/AudioHardwareALSA.cpp @@ -1156,6 +1156,7 @@ status_t ALSAStreamOps::setDevice(int mode, uint32_t device, uint audio_mode) return NO_INIT; } + // // Some devices do not have the default two channels. Force an error to // prevent AudioMixer from crashing and taking the whole system down. @@ -1202,11 +1203,11 @@ status_t ALSAStreamOps::setDevice(int mode, uint32_t device, uint audio_mode) return NO_INIT; } } - err = snd_pcm_hw_params_get_period_size (mHardwareParams, &periodSize, NULL); - if (err < 0) { - LOGE("Unable to get the period size for latency: %s", snd_strerror(err)); - return NO_INIT; - } +// err = snd_pcm_hw_params_get_period_size (mHardwareParams, &periodSize, NULL); +// if (err < 0) { +// LOGE("Unable to get the period size for latency: %s", snd_strerror(err)); +// return NO_INIT; +// } // // Setup buffers for latency // err = snd_pcm_hw_params_set_buffer_time_near (mHandle, mHardwareParams, -- cgit v1.1