From cd8e11b463bf57f832bf44d350238057db3e2d6d Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 4 Mar 2012 08:52:50 -0500 Subject: Tweak some PCM drivers for less typecasting with the data pointer. Yeah, sizeof (void) here with GCC is 1. If something has a problem with that, we'll set it straight. Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9 --- firmware/target/hosted/maemo/pcm-gstreamer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'firmware/target/hosted/maemo') diff --git a/firmware/target/hosted/maemo/pcm-gstreamer.c b/firmware/target/hosted/maemo/pcm-gstreamer.c index 61f33cbadd..10a9d77880 100644 --- a/firmware/target/hosted/maemo/pcm-gstreamer.c +++ b/firmware/target/hosted/maemo/pcm-gstreamer.c @@ -90,7 +90,7 @@ GstBus *gst_bus = NULL; static int bus_watch_id = 0; GMainLoop *pcm_loop = NULL; -static __u8* pcm_data = NULL; +static const void* pcm_data = NULL; static size_t pcm_data_size = 0; static int audio_locked = 0; @@ -128,7 +128,7 @@ void pcm_dma_apply_settings(void) void pcm_play_dma_start(const void *addr, size_t size) { - pcm_data = (__u8 *) addr; + pcm_data = addr; pcm_data_size = size; if (playback_granted) @@ -189,13 +189,12 @@ static void feed_data(GstElement * appsrc, guint size_hint, void *unused) from inside gstreamer's stream thread as it will deadlock */ inside_feed_data = 1; - if (pcm_play_dma_complete_callback(PCM_DMAST_OK, (const void **)&pcm_data, - &pcm_data_size)) + if (pcm_play_dma_complete_callback(PCM_DMAST_OK, &pcm_data, &pcm_data_size)) { GstBuffer *buffer = gst_buffer_new (); GstFlowReturn ret; - GST_BUFFER_DATA (buffer) = pcm_data; + GST_BUFFER_DATA (buffer) = (__u8 *)pcm_data; GST_BUFFER_SIZE (buffer) = pcm_data_size; g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret); -- cgit v1.2.3