summaryrefslogtreecommitdiffstats
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.tar.bz2
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 @@
#include "pcm-internal.h"
#include "pcm_mixer.h"
#include "pcm_sampr.h"
+#include "audiohw.h"
#include <pthread.h>
#include <signal.h>
@@ -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();
}