Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c1b28f2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: sps: support using cached write pointer for BAM-to-Sys mode"

parents 019a3016 999a633c
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2402,7 +2402,16 @@ int sps_bam_pipe_get_unused_desc_num(struct sps_bam *dev, u32 pipe_index,
	fifo_size = pipe->desc_size;

	sw_offset = bam_pipe_get_desc_read_offset(&dev->base, pipe_index);
	peer_offset = bam_pipe_get_desc_write_offset(&dev->base, pipe_index);
	if ((dev->props.options & SPS_BAM_CACHED_WP) &&
		!(pipe->state & BAM_STATE_BAM2BAM)) {
		peer_offset = pipe->sys.desc_offset;
		SPS_DBG(dev,
			"sps:BAM %pa pipe %d: peer offset in cache:0x%x\n",
			BAM_ID(dev), pipe_index, peer_offset);
	} else {
		peer_offset = bam_pipe_get_desc_write_offset(&dev->base,
				pipe_index);
	}

	if (sw_offset <= peer_offset)
		*desc_num = (peer_offset - sw_offset) / desc_size;
+2 −0
Original line number Diff line number Diff line
@@ -115,6 +115,8 @@
#define SPS_BAM_RES_CONFIRM         (1UL << 7)
/* Hold memory for BAM DMUX */
#define SPS_BAM_HOLD_MEM            (1UL << 8)
/* Use cached write pointer */
#define SPS_BAM_CACHED_WP           (1UL << 10)

/* BAM device management flags */