From a1d3ed25346ab4174cb7fd066158cebc8e29fc79 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 24 Dec 2011 17:59:43 +0000 Subject: 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 --- firmware/target/hosted/pcm-alsa.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'firmware/target/hosted/pcm-alsa.c') 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 @@ #include "pcm-internal.h" #include "pcm_mixer.h" #include "pcm_sampr.h" +#include "audiohw.h" #include #include @@ -320,7 +321,7 @@ void cleanup(void) void pcm_play_dma_init(void) { int err; - + audiohw_preinit(); if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) { @@ -343,6 +344,8 @@ void pcm_play_dma_init(void) exit(EXIT_FAILURE); } + pcm_dma_apply_settings(); + #ifdef USE_ASYNC_CALLBACK pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); @@ -352,7 +355,6 @@ void pcm_play_dma_init(void) tick_add_task(pcm_tick); #endif - atexit(cleanup); return; } @@ -469,6 +471,7 @@ const void * pcm_play_dma_get_peak_buffer(int *count) void pcm_play_dma_postinit(void) { + audiohw_postinit(); } -- cgit v1.2.3