Skip to content

Commit accc98a

Browse files
committed
Merge tag 'soundwire-6.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire fixes from Vinod Koul: - Null pointer dereference for mult link in core - AC timing fix in intel driver * tag 'soundwire-6.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel_ace2x: fix AC timing setting for ACE2.x soundwire: stream: fix NULL pointer dereference for multi_link
2 parents 7f499ec + 393cae5 commit accc98a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

drivers/soundwire/intel_ace2x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
static void intel_shim_vs_init(struct sdw_intel *sdw)
2424
{
2525
void __iomem *shim_vs = sdw->link_res->shim_vs;
26-
u16 act = 0;
26+
u16 act;
2727

28+
act = intel_readw(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL);
2829
u16p_replace_bits(&act, 0x1, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);
2930
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DACTQE;
3031
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DODS;

drivers/soundwire/stream.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,14 +742,15 @@ static int sdw_bank_switch(struct sdw_bus *bus, int m_rt_count)
742742
* sdw_ml_sync_bank_switch: Multilink register bank switch
743743
*
744744
* @bus: SDW bus instance
745+
* @multi_link: whether this is a multi-link stream with hardware-based sync
745746
*
746747
* Caller function should free the buffers on error
747748
*/
748-
static int sdw_ml_sync_bank_switch(struct sdw_bus *bus)
749+
static int sdw_ml_sync_bank_switch(struct sdw_bus *bus, bool multi_link)
749750
{
750751
unsigned long time_left;
751752

752-
if (!bus->multi_link)
753+
if (!multi_link)
753754
return 0;
754755

755756
/* Wait for completion of transfer */
@@ -847,7 +848,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
847848
bus->bank_switch_timeout = DEFAULT_BANK_SWITCH_TIMEOUT;
848849

849850
/* Check if bank switch was successful */
850-
ret = sdw_ml_sync_bank_switch(bus);
851+
ret = sdw_ml_sync_bank_switch(bus, multi_link);
851852
if (ret < 0) {
852853
dev_err(bus->dev,
853854
"multi link bank switch failed: %d\n", ret);

0 commit comments

Comments
 (0)