Skip to content

Commit

Permalink
Revert "soundwire: stream: Add specific prep/deprep commands to port_…
Browse files Browse the repository at this point in the history
…prep callback"

This reverts commit 43f1a7f.

While it does not make much sense, this commit (which is a NOP
for most devices) causes audio issues after suspend-resume.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi committed Feb 17, 2023
1 parent 8148a7f commit 85c6db0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions drivers/soundwire/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static int sdw_prep_deprep_slave_ports(struct sdw_bus *bus,
}

/* Inform slave about the impending port prepare */
sdw_do_port_prep(s_rt, prep_ch, prep ? SDW_OPS_PORT_PRE_PREP : SDW_OPS_PORT_PRE_DEPREP);
sdw_do_port_prep(s_rt, prep_ch, SDW_OPS_PORT_PRE_PREP);

/* Prepare Slave port implementing CP_SM */
if (!dpn_prop->simple_ch_prep_sm) {
Expand Down Expand Up @@ -501,7 +501,7 @@ static int sdw_prep_deprep_slave_ports(struct sdw_bus *bus,
}

/* Inform slaves about ports prepared */
sdw_do_port_prep(s_rt, prep_ch, prep ? SDW_OPS_PORT_POST_PREP : SDW_OPS_PORT_POST_DEPREP);
sdw_do_port_prep(s_rt, prep_ch, SDW_OPS_PORT_POST_PREP);

/* Disable interrupt after Port de-prepare */
if (!prep && intr)
Expand Down
8 changes: 3 additions & 5 deletions include/linux/soundwire/sdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,13 @@ struct sdw_prepare_ch {
* enum sdw_port_prep_ops: Prepare operations for Data Port
*
* @SDW_OPS_PORT_PRE_PREP: Pre prepare operation for the Port
* @SDW_OPS_PORT_PRE_DEPREP: Pre deprepare operation for the Port
* @SDW_OPS_PORT_PREP: Prepare operation for the Port
* @SDW_OPS_PORT_POST_PREP: Post prepare operation for the Port
* @SDW_OPS_PORT_POST_DEPREP: Post deprepare operation for the Port
*/
enum sdw_port_prep_ops {
SDW_OPS_PORT_PRE_PREP = 0,
SDW_OPS_PORT_PRE_DEPREP,
SDW_OPS_PORT_POST_PREP,
SDW_OPS_PORT_POST_DEPREP,
SDW_OPS_PORT_PREP = 1,
SDW_OPS_PORT_POST_PREP = 2,
};

/**
Expand Down

0 comments on commit 85c6db0

Please sign in to comment.