diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pcmbuf.c | 5 | ||||
-rw-r--r-- | apps/recorder/pcm_record.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 99e56d160d..6e2234880e 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c | |||
@@ -1001,6 +1001,11 @@ void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude) | |||
1001 | /* Give 5ms clearance. */ | 1001 | /* Give 5ms clearance. */ |
1002 | bufstart += NATIVE_FREQUENCY * 4 / 200; | 1002 | bufstart += NATIVE_FREQUENCY * 4 / 200; |
1003 | 1003 | ||
1004 | #ifdef HAVE_PCM_DMA_ADDRESS | ||
1005 | /* Returned peak addresses are DMA addresses */ | ||
1006 | bufend = pcm_dma_addr(bufend); | ||
1007 | #endif | ||
1008 | |||
1004 | /* Wrapped above? */ | 1009 | /* Wrapped above? */ |
1005 | if (bufstart >= bufend) | 1010 | if (bufstart >= bufend) |
1006 | bufstart -= pcmbuf_size; | 1011 | bufstart -= pcmbuf_size; |
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 8642150b18..8657aee1ba 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -1148,8 +1148,8 @@ static void pcmrec_init(void) | |||
1148 | 1148 | ||
1149 | buffer = audio_get_recording_buffer(&rec_buffer_size); | 1149 | buffer = audio_get_recording_buffer(&rec_buffer_size); |
1150 | 1150 | ||
1151 | /* Line align pcm_buffer 2^4=16 bytes */ | 1151 | /* Line align pcm_buffer 2^5=32 bytes */ |
1152 | pcm_buffer = (unsigned char *)ALIGN_UP_P2((uintptr_t)buffer, 4); | 1152 | pcm_buffer = (unsigned char *)ALIGN_UP_P2((uintptr_t)buffer, 5); |
1153 | enc_buffer = pcm_buffer + ALIGN_UP_P2(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE + | 1153 | enc_buffer = pcm_buffer + ALIGN_UP_P2(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE + |
1154 | PCM_MAX_FEED_SIZE, 2); | 1154 | PCM_MAX_FEED_SIZE, 2); |
1155 | /* Adjust available buffer for possible align advancement */ | 1155 | /* Adjust available buffer for possible align advancement */ |