Skip to content

Commit 5a838e0

Browse files
bardliaovinodkoul
authored andcommitted
soundwire: cadence_master: set data_per_frame as frame capability
data_per_frame will be used for preparing the TX buffer and we may add some fake frames to ensure the data in the buffer will be flushed. So that it should indicate the frame capability even if the required data bytes are less than the frame capability. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20251014031450.3781789-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 43b2a39 commit 5a838e0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/soundwire/cadence_master.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,9 +2114,6 @@ int sdw_cdns_bpt_find_buffer_sizes(int command, /* 0: write, 1: read */
21142114
if (!actual_bpt_bytes)
21152115
return -EINVAL;
21162116

2117-
if (data_bytes < actual_bpt_bytes)
2118-
actual_bpt_bytes = data_bytes;
2119-
21202117
/*
21212118
* the caller may want to set the number of bytes per frame,
21222119
* allow when possible
@@ -2126,6 +2123,9 @@ int sdw_cdns_bpt_find_buffer_sizes(int command, /* 0: write, 1: read */
21262123

21272124
*data_per_frame = actual_bpt_bytes;
21282125

2126+
if (data_bytes < actual_bpt_bytes)
2127+
actual_bpt_bytes = data_bytes;
2128+
21292129
if (command == 0) {
21302130
/*
21312131
* for writes we need to send all the data_bytes per frame,

0 commit comments

Comments
 (0)