Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Bard Liao and committed by
Vinod Koul
5a838e01 43b2a391

+3 -3
+3 -3
drivers/soundwire/cadence_master.c
··· 2114 2114 if (!actual_bpt_bytes) 2115 2115 return -EINVAL; 2116 2116 2117 - if (data_bytes < actual_bpt_bytes) 2118 - actual_bpt_bytes = data_bytes; 2119 - 2120 2117 /* 2121 2118 * the caller may want to set the number of bytes per frame, 2122 2119 * allow when possible ··· 2122 2125 actual_bpt_bytes = requested_bytes_per_frame; 2123 2126 2124 2127 *data_per_frame = actual_bpt_bytes; 2128 + 2129 + if (data_bytes < actual_bpt_bytes) 2130 + actual_bpt_bytes = data_bytes; 2125 2131 2126 2132 if (command == 0) { 2127 2133 /*