Synopsis:
when we used Bluetooth earphone, snd_pcm_hw_params (an Alsa-lib API)
sometimes
gives an undefined value, it will cause helix engine crash. make a
work around here.
Overview:
try to fix bug #8040:
https://bugs.helixcommunity.org/show_bug.cgi?id=8040
"
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html
int snd_pcm_hw_params ( snd_pcm_t *
pcm,
snd_pcm_hw_params_t * params
)
Returns:
0 on success otherwise a negative error code
"
but when we use bluetooth earphone, sometimes we get a positive
value ("1")
from this function call, this will cause helix engine crash.
though there should be some issue inside Bluez stack, helix
engine should try to avoid crash here.
When we accept this positive value as success, it will be ok.
#8040 is reproduced on plugz(bluetooth-alsa) stack, it is out of
date.
when we switch to bluez-util stack, found the return value above.
Files Added:
No file added
Files Modified:
audlinux_alsa.cpp: (audio/device/platform/unix/audlinux_alsa.cpp)
accept the positive value return from snd_pcm_hw_params
Image Size and Heap Use impact (Client -Only):
little
Platforms and Profiles Affected:
platform: linux-2.2-libc6-gcc32-i586
profile: helix-client-all-defines
Distribution Libraries Affected:
<helix-dbus-server.bin>
Distribution library impact and planned action:
<None>
Platforms and Profiles Build Verified:
Set BIF branch -> hxdbus_3_1_0_atlas
Set Target(s) -> player_mid_all_installers
Set Profile -> helix-client-all-defines
System ID -> linux-2.2-libc6-gcc32-i586
Branch:
HEAD, hxclient_3_1_0_atlas
Copyright assignment: <MUST be one of the following statements >
2. Intel has signed and delivered a Joint Copyright Assignment
to RealNetworks, and received acknowledgment that the
agreement was received.
Files Attached:
alsa-audio.diff.txt
ZHAO, Halley (Aihua)
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tel: +86(21)61166476
iNet: 8821-6476
SSG/OTC/UMD
? alsa-audio.diff.txt
Index: platform/unix/audlinux_alsa.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audlinux_alsa.cpp,v
retrieving revision 1.9
diff -u -w -r1.9 audlinux_alsa.cpp
--- platform/unix/audlinux_alsa.cpp 6 Jul 2007 20:21:16 -0000 1.9
+++ platform/unix/audlinux_alsa.cpp 14 May 2008 02:29:50 -0000
@@ -657,7 +657,7 @@
snd_pcm_uframes_t buffer_size = 0;
snd_pcm_uframes_t period_size = 0;
- if (err == 0)
+ if (err >= 0)
{
err = snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size);
if (err < 0)
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev