summaryrefslogtreecommitdiff
path: root/cesar/ce
diff options
context:
space:
mode:
authordufour2009-10-14 09:06:47 +0000
committerdufour2009-10-14 09:06:47 +0000
commit099a66fd15d4f3073c8ba4dd6bf00bee9d21a88b (patch)
tree452e6a29f859d35f0e56573afb47b6013b6a4cb7 /cesar/ce
parent7e4571c9dd7979a53fedd63e9989546e4f56e0cc (diff)
cesar/ce/rx: handle as much measures as available
When the CE wakes up, there is a flag to let it knows there are some measures to handle. But it only handled one measure, even if they are more. This leads to not reading the last measure which contains the sound complete flag and the bit loading is not started. This fix try to read as much measure as available in the mail box. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6109 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/ce')
-rw-r--r--cesar/ce/rx/src/rx.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/cesar/ce/rx/src/rx.c b/cesar/ce/rx/src/rx.c
index 53d830fe84..62c15d611a 100644
--- a/cesar/ce/rx/src/rx.c
+++ b/cesar/ce/rx/src/rx.c
@@ -169,33 +169,37 @@ ce_rx_process_work_measure (ce_rx_t *ce_rx)
dbg_assert (ce_rx);
/* Get measure. */
- mbox_node_t *node = mbox_get (&ce_rx->measure_mbox);
- ce_rx_measure_mbox_t * measure = PARENT_OF (ce_rx_measure_mbox_t,
- mbox_node, node);
+ mbox_node_t *node;
+ while ((node = mbox_get (&ce_rx->measure_mbox)))
+ {
+ dbg_assert (node);
+ ce_rx_measure_mbox_t * measure = PARENT_OF (ce_rx_measure_mbox_t,
+ mbox_node, node);
- CE_RX_TRACE (CHAN_DATA_HANDLING, measure->rx_params.tei);
+ CE_RX_TRACE (CHAN_DATA_HANDLING, measure->rx_params.tei);
- if (TONEMAP_INDEX_IS_NEGOTIATED (measure->rx_params.tmi_av))
- CE_RX_TRACE (USING_TONEMAP, measure->rx_params.tmi_av);
+ if (TONEMAP_INDEX_IS_NEGOTIATED (measure->rx_params.tmi_av))
+ CE_RX_TRACE (USING_TONEMAP, measure->rx_params.tmi_av);
- /* Ensure STA is created. */
- mac_store_sta_add (ce_rx->mac_store,
- measure->rx_params.tei);
- /* Get the STA. */
- sta_t *sta = mac_store_sta_get (ce_rx->mac_store, measure->rx_params.tei);
- /* STA must exists. */
- dbg_assert (sta);
+ /* Ensure STA is created. */
+ mac_store_sta_add (ce_rx->mac_store,
+ measure->rx_params.tei);
+ /* Get the STA. */
+ sta_t *sta = mac_store_sta_get (ce_rx->mac_store, measure->rx_params.tei);
+ /* STA must exists. */
+ dbg_assert (sta);
- /* Give measure to bit loading. */
- ce_rx_bl_fsm_handle_event (ce_rx, sta,
- CE_RX_BL_FSM_EVENT_TYPE_channel_data_received,
- (ce_rx_bitloading_fsm_event_param_t) measure);
+ /* Give measure to bit loading. */
+ ce_rx_bl_fsm_handle_event (ce_rx, sta,
+ CE_RX_BL_FSM_EVENT_TYPE_channel_data_received,
+ (ce_rx_bitloading_fsm_event_param_t) measure);
- /* Release station. */
- blk_release (sta);
+ /* Release station. */
+ blk_release (sta);
- /* Delete. */
- slab_release (measure);
+ /* Delete. */
+ slab_release (measure);
+ }
}
void