summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/pcm-alsa.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-12-24 17:59:43 +0000
committerThomas Martitz <kugel@rockbox.org>2011-12-24 17:59:43 +0000
commita1d3ed25346ab4174cb7fd066158cebc8e29fc79 (patch)
tree9418cafbf4dbbc9b34ab31f1fc5123446204f645 /firmware/target/hosted/pcm-alsa.c
parent2ec443df12cda09bd5fee6f9857bca17b7e6aa3f (diff)
downloadrockbox-a1d3ed25346ab4174cb7fd066158cebc8e29fc79.tar.gz
rockbox-a1d3ed25346ab4174cb7fd066158cebc8e29fc79.zip
ypr0: Cleanup and simplify ascodec functions. Fix audiohw_{pre,post}init() not being called.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31423 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted/pcm-alsa.c')
-rw-r--r--firmware/target/hosted/pcm-alsa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/hosted/pcm-alsa.c b/firmware/target/hosted/pcm-alsa.c
index 928187993e..7daf485f18 100644
--- a/firmware/target/hosted/pcm-alsa.c
+++ b/firmware/target/hosted/pcm-alsa.c
@@ -50,6 +50,7 @@
50#include "pcm-internal.h" 50#include "pcm-internal.h"
51#include "pcm_mixer.h" 51#include "pcm_mixer.h"
52#include "pcm_sampr.h" 52#include "pcm_sampr.h"
53#include "audiohw.h"
53 54
54#include <pthread.h> 55#include <pthread.h>
55#include <signal.h> 56#include <signal.h>
@@ -320,7 +321,7 @@ void cleanup(void)
320void pcm_play_dma_init(void) 321void pcm_play_dma_init(void)
321{ 322{
322 int err; 323 int err;
323 324 audiohw_preinit();
324 325
325 if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) 326 if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0)
326 { 327 {
@@ -343,6 +344,8 @@ void pcm_play_dma_init(void)
343 exit(EXIT_FAILURE); 344 exit(EXIT_FAILURE);
344 } 345 }
345 346
347 pcm_dma_apply_settings();
348
346#ifdef USE_ASYNC_CALLBACK 349#ifdef USE_ASYNC_CALLBACK
347 pthread_mutexattr_t attr; 350 pthread_mutexattr_t attr;
348 pthread_mutexattr_init(&attr); 351 pthread_mutexattr_init(&attr);
@@ -352,7 +355,6 @@ void pcm_play_dma_init(void)
352 tick_add_task(pcm_tick); 355 tick_add_task(pcm_tick);
353#endif 356#endif
354 357
355
356 atexit(cleanup); 358 atexit(cleanup);
357 return; 359 return;
358} 360}
@@ -469,6 +471,7 @@ const void * pcm_play_dma_get_peak_buffer(int *count)
469 471
470void pcm_play_dma_postinit(void) 472void pcm_play_dma_postinit(void)
471{ 473{
474 audiohw_postinit();
472} 475}
473 476
474 477