#include "sample-util.h"
#include "endianmacros.h"
-#if defined (__arm__)
+#if defined (__arm__) && defined (HAVE_ARMV6)
#define MOD_INC() \
" subs r0, r6, %2 \n\t" \
{
int32_t *ve;
- channels = PA_MAX (4U, channels);
+ /* Channels must be at least 4, and always a multiple of the original number.
+ * This is also the max amount we overread the volume array, which should
+ * have enough padding. */
+ channels = channels == 3 ? 6 : PA_MAX (4U, channels);
ve = volumes + channels;
__asm__ __volatile__ (
}
#endif
-#endif /* defined (__arm__) */
+#endif /* defined (__arm__) && defined (HAVE_ARMV6) */
void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) {
-#if defined (__arm__)
+#if defined (__arm__) && defined (HAVE_ARMV6)
pa_log_info("Initialising ARM optimized functions.");
#ifdef RUN_TEST
#endif
pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_arm);
-#endif /* defined (__arm__) */
+#endif /* defined (__arm__) && defined (HAVE_ARMV6) */
}