diff options
Diffstat (limited to 'firmware/pcm_mixer.c')
-rw-r--r-- | firmware/pcm_mixer.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/firmware/pcm_mixer.c b/firmware/pcm_mixer.c index 817b9a6a3c..25c41c2586 100644 --- a/firmware/pcm_mixer.c +++ b/firmware/pcm_mixer.c | |||
@@ -70,11 +70,6 @@ static struct mixer_channel * active_channels[PCM_MIXER_NUM_CHANNELS+1] IBSS_ATT | |||
70 | #define MAX_IDLE_FRAMES (NATIVE_FREQUENCY*3 / MIX_FRAME_SAMPLES) | 70 | #define MAX_IDLE_FRAMES (NATIVE_FREQUENCY*3 / MIX_FRAME_SAMPLES) |
71 | static unsigned int idle_counter = 0; | 71 | static unsigned int idle_counter = 0; |
72 | 72 | ||
73 | /* Cheapo buffer align macro to align to the 16-16 PCM size */ | ||
74 | #define ALIGN_CHANNEL(start, size) \ | ||
75 | ({ start = (void *)(((uintptr_t)start + 3) & ~3); \ | ||
76 | size &= ~3; }) | ||
77 | |||
78 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 73 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
79 | 74 | ||
80 | /* Include any implemented CPU-optimized mixdown routines */ | 75 | /* Include any implemented CPU-optimized mixdown routines */ |
@@ -244,7 +239,7 @@ fill_frame: | |||
244 | if (chan->get_more) | 239 | if (chan->get_more) |
245 | { | 240 | { |
246 | chan->get_more(&chan->start, &chan->size); | 241 | chan->get_more(&chan->start, &chan->size); |
247 | ALIGN_CHANNEL(chan->start, chan->size); | 242 | ALIGN_AUDIOBUF(chan->start, chan->size); |
248 | } | 243 | } |
249 | 244 | ||
250 | if (!(chan->start && chan->size)) | 245 | if (!(chan->start && chan->size)) |
@@ -368,7 +363,7 @@ static void mixer_channel_play_start(struct mixer_channel *chan, | |||
368 | { | 363 | { |
369 | pcm_play_unlock(); /* Allow playback while doing any callback */ | 364 | pcm_play_unlock(); /* Allow playback while doing any callback */ |
370 | 365 | ||
371 | ALIGN_CHANNEL(start, size); | 366 | ALIGN_AUDIOBUF(start, size); |
372 | 367 | ||
373 | if (!(start && size)) | 368 | if (!(start && size)) |
374 | { | 369 | { |
@@ -377,7 +372,7 @@ static void mixer_channel_play_start(struct mixer_channel *chan, | |||
377 | if (get_more) | 372 | if (get_more) |
378 | { | 373 | { |
379 | get_more(&start, &size); | 374 | get_more(&start, &size); |
380 | ALIGN_CHANNEL(start, size); | 375 | ALIGN_AUDIOBUF(start, size); |
381 | } | 376 | } |
382 | } | 377 | } |
383 | 378 | ||