Skip to content

Commit 11b00c7

Browse files
committed
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 the frame capability even if the required data bytes are less than the frame capability. Signed-off-by: Bard Liao <[email protected]>
1 parent 39e04d6 commit 11b00c7

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
@@ -2118,9 +2118,6 @@ int sdw_cdns_bpt_find_buffer_sizes(int command, /* 0: write, 1: read */
21182118
if (!actual_bpt_bytes)
21192119
return -EINVAL;
21202120

2121-
if (data_bytes < actual_bpt_bytes)
2122-
actual_bpt_bytes = data_bytes;
2123-
21242121
/*
21252122
* the caller may want to set the number of bytes per frame,
21262123
* allow when possible
@@ -2130,6 +2127,9 @@ int sdw_cdns_bpt_find_buffer_sizes(int command, /* 0: write, 1: read */
21302127

21312128
*data_per_frame = actual_bpt_bytes;
21322129

2130+
if (data_bytes < actual_bpt_bytes)
2131+
actual_bpt_bytes = data_bytes;
2132+
21332133
if (command == 0) {
21342134
/*
21352135
* for writes we need to send all the data_bytes per frame,

0 commit comments

Comments
 (0)