@@ -374,38 +374,28 @@ static int ipc_stream_position(uint32_t header)
374374int ipc_stream_send_position (struct comp_dev * cdev ,
375375 struct sof_ipc_stream_posn * posn )
376376{
377- struct sof_ipc_hdr hdr ;
378-
379377 tracev_ipc ("Pos" );
380- posn -> rhdr .hdr .cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_POSITION |
381- cdev -> comp .id ;
378+ posn -> rhdr .hdr .cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_POSITION |
379+ cdev -> comp .id ;
382380 posn -> rhdr .hdr .size = sizeof (* posn );
383381 posn -> comp_id = cdev -> comp .id ;
384382
385- hdr .cmd = posn -> rhdr .hdr .cmd ;
386- hdr .size = sizeof (hdr );
387-
388383 mailbox_stream_write (cdev -> pipeline -> posn_offset , posn , sizeof (* posn ));
389- return ipc_queue_host_message (_ipc , posn -> rhdr .hdr .cmd , & hdr ,
390- sizeof (hdr ), NULL , 0 , NULL , NULL , 0 );
384+ return ipc_queue_host_message (_ipc , posn -> rhdr .hdr .cmd , posn ,
385+ sizeof (* posn ) , 0 );
391386}
392387
393388/* send stream position TODO: send compound message */
394389int ipc_stream_send_xrun (struct comp_dev * cdev ,
395390 struct sof_ipc_stream_posn * posn )
396391{
397- struct sof_ipc_hdr hdr ;
398-
399392 posn -> rhdr .hdr .cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_TRIG_XRUN ;
400393 posn -> rhdr .hdr .size = sizeof (* posn );
401394 posn -> comp_id = cdev -> comp .id ;
402395
403- hdr .cmd = posn -> rhdr .hdr .cmd ;
404- hdr .size = sizeof (hdr );
405-
406396 mailbox_stream_write (cdev -> pipeline -> posn_offset , posn , sizeof (* posn ));
407- return ipc_queue_host_message (_ipc , posn -> rhdr .hdr .cmd , & hdr ,
408- sizeof (hdr ), NULL , 0 , NULL , NULL , 0 );
397+ return ipc_queue_host_message (_ipc , posn -> rhdr .hdr .cmd , posn ,
398+ sizeof (* posn ) , 0 );
409399}
410400
411401static int ipc_stream_trigger (uint32_t header )
@@ -746,7 +736,7 @@ int ipc_dma_trace_send_position(void)
746736 posn .rhdr .hdr .size = sizeof (posn );
747737
748738 return ipc_queue_host_message (_ipc , posn .rhdr .hdr .cmd , & posn ,
749- sizeof ( posn ), NULL , 0 , NULL , NULL , 1 );
739+ sizeof ( posn ) , 1 );
750740}
751741
752742static int ipc_glb_debug_message (uint32_t header )
@@ -1124,9 +1114,8 @@ static inline struct ipc_msg *msg_find(struct ipc *ipc, uint32_t header,
11241114 }
11251115}
11261116
1127- int ipc_queue_host_message (struct ipc * ipc , uint32_t header ,
1128- void * tx_data , size_t tx_bytes , void * rx_data ,
1129- size_t rx_bytes , void (* cb )(void * , void * ), void * cb_data , uint32_t replace )
1117+ int ipc_queue_host_message (struct ipc * ipc , uint32_t header , void * tx_data ,
1118+ size_t tx_bytes , uint32_t replace )
11301119{
11311120 struct ipc_msg * msg = NULL ;
11321121 uint32_t flags , found = 0 ;
@@ -1153,9 +1142,6 @@ int ipc_queue_host_message(struct ipc *ipc, uint32_t header,
11531142 /* prepare the message */
11541143 msg -> header = header ;
11551144 msg -> tx_size = tx_bytes ;
1156- msg -> rx_size = rx_bytes ;
1157- msg -> cb_data = cb_data ;
1158- msg -> cb = cb ;
11591145
11601146 /* copy mailbox data to message */
11611147 if (tx_bytes > 0 && tx_bytes < SOF_IPC_MSG_MAX_SIZE )
0 commit comments