summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/maemo
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-03-04 08:52:50 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-04 08:52:50 -0500
commitcd8e11b463bf57f832bf44d350238057db3e2d6d (patch)
tree91b7511ec5a6fa47c99d84518608cd3b90f4d680 /firmware/target/hosted/maemo
parentf6e17e86fed65cb503199691d69973e83c45ddbf (diff)
downloadrockbox-cd8e11b463bf57f832bf44d350238057db3e2d6d.tar.gz
rockbox-cd8e11b463bf57f832bf44d350238057db3e2d6d.zip
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
Diffstat (limited to 'firmware/target/hosted/maemo')
-rw-r--r--firmware/target/hosted/maemo/pcm-gstreamer.c9
1 files changed, 4 insertions, 5 deletions
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;
90static int bus_watch_id = 0; 90static int bus_watch_id = 0;
91GMainLoop *pcm_loop = NULL; 91GMainLoop *pcm_loop = NULL;
92 92
93static __u8* pcm_data = NULL; 93static const void* pcm_data = NULL;
94static size_t pcm_data_size = 0; 94static size_t pcm_data_size = 0;
95 95
96static int audio_locked = 0; 96static int audio_locked = 0;
@@ -128,7 +128,7 @@ void pcm_dma_apply_settings(void)
128 128
129void pcm_play_dma_start(const void *addr, size_t size) 129void pcm_play_dma_start(const void *addr, size_t size)
130{ 130{
131 pcm_data = (__u8 *) addr; 131 pcm_data = addr;
132 pcm_data_size = size; 132 pcm_data_size = size;
133 133
134 if (playback_granted) 134 if (playback_granted)
@@ -189,13 +189,12 @@ static void feed_data(GstElement * appsrc, guint size_hint, void *unused)
189 from inside gstreamer's stream thread as it will deadlock */ 189 from inside gstreamer's stream thread as it will deadlock */
190 inside_feed_data = 1; 190 inside_feed_data = 1;
191 191
192 if (pcm_play_dma_complete_callback(PCM_DMAST_OK, (const void **)&pcm_data, 192 if (pcm_play_dma_complete_callback(PCM_DMAST_OK, &pcm_data, &pcm_data_size))
193 &pcm_data_size))
194 { 193 {
195 GstBuffer *buffer = gst_buffer_new (); 194 GstBuffer *buffer = gst_buffer_new ();
196 GstFlowReturn ret; 195 GstFlowReturn ret;
197 196
198 GST_BUFFER_DATA (buffer) = pcm_data; 197 GST_BUFFER_DATA (buffer) = (__u8 *)pcm_data;
199 GST_BUFFER_SIZE (buffer) = pcm_data_size; 198 GST_BUFFER_SIZE (buffer) = pcm_data_size;
200 199
201 g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret); 200 g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);