SR_PRIV void cv_send_block_to_session_bus(struct dev_context *devc, int block)
{
- int i;
- uint8_t sample, expected_sample;
+ int i, idx;
+ uint8_t sample, expected_sample, tmp8;
struct sr_datafeed_packet packet;
struct sr_datafeed_logic logic;
int trigger_point; /* Relative trigger point (in this block). */
}
}
+ /* Swap low and high bytes of the 16-bit LA16 samples. */
+ if (devc->prof->model == CHRONOVU_LA16) {
+ for (i = 0; i < BS; i += 2) {
+ idx = (block * BS) + i;
+ tmp8 = devc->final_buf[idx];
+ devc->final_buf[idx] = devc->final_buf[idx + 1];
+ devc->final_buf[idx + 1] = tmp8;
+ }
+ }
+
/* If no trigger was found, send one SR_DF_LOGIC packet. */
if (trigger_point == -1) {
/* Send an SR_DF_LOGIC packet to the session bus. */