msm: sps: support using cached write pointer for BAM-to-Sys mode
Support using the cached write pointer for a BAM-to-Sys mode BAM pipe when check if the desc FIFO of that pipe is full. Change-Id: Ie480ecca9eff76388c504665b496e01bbf3e009f Signed-off-by: Yan He <yanhe@codeaurora.org>
This commit is contained in:
parent
b12c7d2cd1
commit
fedf20a070
2 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue