summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/maemo
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-02-23 08:14:46 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:23:38 +0100
commit286a4c5caa1945c8d1cb365a3d90fb09d5700cb2 (patch)
tree4835f46d16ec78d035ec9f49333079fe618384c1 /firmware/target/hosted/maemo
parent3f82f3aca14eb954e55f761721ffdd2684f0e812 (diff)
downloadrockbox-286a4c5caa1945c8d1cb365a3d90fb09d5700cb2.tar.gz
rockbox-286a4c5caa1945c8d1cb365a3d90fb09d5700cb2.zip
Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'firmware/target/hosted/maemo')
-rw-r--r--firmware/target/hosted/maemo/pcm-gstreamer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/target/hosted/maemo/pcm-gstreamer.c b/firmware/target/hosted/maemo/pcm-gstreamer.c
index e5620d0702..61f33cbadd 100644
--- a/firmware/target/hosted/maemo/pcm-gstreamer.c
+++ b/firmware/target/hosted/maemo/pcm-gstreamer.c
@@ -189,9 +189,8 @@ 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 pcm_play_get_more_callback((void **)&pcm_data, &pcm_data_size); 192 if (pcm_play_dma_complete_callback(PCM_DMAST_OK, (const void **)&pcm_data,
193 193 &pcm_data_size))
194 if (pcm_data_size != 0)
195 { 194 {
196 GstBuffer *buffer = gst_buffer_new (); 195 GstBuffer *buffer = gst_buffer_new ();
197 GstFlowReturn ret; 196 GstFlowReturn ret;
@@ -205,7 +204,7 @@ static void feed_data(GstElement * appsrc, guint size_hint, void *unused)
205 if (ret != 0) 204 if (ret != 0)
206 DEBUGF("push-buffer error result: %d\n", ret); 205 DEBUGF("push-buffer error result: %d\n", ret);
207 206
208 pcm_play_dma_started_callback(); 207 pcm_play_dma_status_callback(PCM_DMAST_STARTED);
209 } else 208 } else
210 { 209 {
211 DEBUGF("feed_data: No Data.\n"); 210 DEBUGF("feed_data: No Data.\n");