NOTE: I sent this to the player-dev list earlier today, and just realized that it was sent to the wrong list
Description ---------------------------------- For some hardware configurations where ALSA is configured to use a stereo bluetooth headset, the snd_pcm_hw_params_any() function will return a 1 on success instead of zero. This patch will make the core helix alsa code start treating a 1 as success (i.e. check for a return value of >= zero instead of a return value of exactly one.) I also fixed a couple of indention oddities. https://bugs.helixcommunity.org/show_bug.cgi?id=8394 Files Modified ---------------------------------- audio/device/platform/unix/audlinux_alsa.cpp Branches --------------------------------- HEAD, Atlas310, Atlas341 --rusty -- --rusty
Description ---------------------------------- For some hardware configurations where ALSA is configured to use a stereo bluetooth headset, the snd_pcm_hw_params_any() function will return a 1 on success instead of zero. This patch will make the core helix alsa code start treating a 1 as success (i.e. check for a return value of >= zero instead of a return value of exactly one.) I also fix a couple of indention oddities. https://bugs.helixcommunity.org/show_bug.cgi?id=8394 Files Modified ---------------------------------- audio/device/platform/unix/audlinux_alsa.cpp Branches --------------------------------- HEAD, Atlas310, Atlas341 Index: platform/unix/audlinux_alsa.cpp =================================================================== RCS file: /cvsroot/audio/device/platform/unix/audlinux_alsa.cpp,v retrieving revision 1.9.2.1 diff -u -r1.9.2.1 audlinux_alsa.cpp --- platform/unix/audlinux_alsa.cpp 15 May 2008 01:30:09 -0000 1.9.2.1 +++ platform/unix/audlinux_alsa.cpp 18 Jun 2008 23:58:30 -0000 @@ -536,21 +536,21 @@ /* Apply to ALSA */ int err = 0; - snd_pcm_hw_params_t *hwparams; - snd_pcm_sw_params_t *swparams; + snd_pcm_hw_params_t *hwparams; + snd_pcm_sw_params_t *swparams; - snd_pcm_hw_params_alloca(&hwparams); - snd_pcm_sw_params_alloca(&swparams); + snd_pcm_hw_params_alloca(&hwparams); + snd_pcm_sw_params_alloca(&swparams); /* Hardware parameters */ - err = snd_pcm_hw_params_any(m_pAlsaPCMHandle, hwparams); - if (err < 0) + err = snd_pcm_hw_params_any(m_pAlsaPCMHandle, hwparams); + if (err < 0) { HXLOGL1 ( HXLOG_ADEV, "snd_pcm_hw_params_any: %s", snd_strerror(err)); m_wLastError = RA_AOE_NOTENABLED; - } + } - if (err == 0) + if (err >= 0) { err = snd_pcm_hw_params_set_access(m_pAlsaPCMHandle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0)
_______________________________________________ Audio-dev mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/audio-dev
