Skip to content

Commit e1da8eb

Browse files
committed
Merge tag 'soundwire-6.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire fixes from Vinod Koul: "This contains a couple of amd driver fixes to handle alerts when the link is down and the cmd status register clears up. Also a revert of the qualcomm driver channel map support due to a regression" * tag 'soundwire-6.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: Revert "soundwire: qcom: Add set_channel_map api support" soundwire: amd: fix for clearing command status register soundwire: amd: fix for handling slave alerts after link is down
2 parents fcc481f + 834bce6 commit e1da8eb

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

drivers/soundwire/amd_manager.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static u64 amd_sdw_send_cmd_get_resp(struct amd_sdw_manager *amd_manager, u32 lo
238238

239239
if (sts & AMD_SDW_IMM_RES_VALID) {
240240
dev_err(amd_manager->dev, "SDW%x manager is in bad state\n", amd_manager->instance);
241-
writel(0x00, amd_manager->mmio + ACP_SW_IMM_CMD_STS);
241+
writel(AMD_SDW_IMM_RES_VALID, amd_manager->mmio + ACP_SW_IMM_CMD_STS);
242242
}
243243
writel(upper_data, amd_manager->mmio + ACP_SW_IMM_CMD_UPPER_WORD);
244244
writel(lower_data, amd_manager->mmio + ACP_SW_IMM_CMD_LOWER_QWORD);
@@ -1209,6 +1209,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
12091209
}
12101210

12111211
if (amd_manager->power_mode_mask & AMD_SDW_CLK_STOP_MODE) {
1212+
cancel_work_sync(&amd_manager->amd_sdw_work);
12121213
amd_sdw_wake_enable(amd_manager, false);
12131214
if (amd_manager->acp_rev >= ACP70_PCI_REV_ID) {
12141215
ret = amd_sdw_host_wake_enable(amd_manager, false);
@@ -1219,6 +1220,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
12191220
if (ret)
12201221
return ret;
12211222
} else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
1223+
cancel_work_sync(&amd_manager->amd_sdw_work);
12221224
amd_sdw_wake_enable(amd_manager, false);
12231225
if (amd_manager->acp_rev >= ACP70_PCI_REV_ID) {
12241226
ret = amd_sdw_host_wake_enable(amd_manager, false);

drivers/soundwire/qcom.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ struct qcom_swrm_port_config {
156156
u8 word_length;
157157
u8 blk_group_count;
158158
u8 lane_control;
159-
u8 ch_mask;
160159
};
161160

162161
/*
@@ -1049,13 +1048,9 @@ static int qcom_swrm_port_enable(struct sdw_bus *bus,
10491048
{
10501049
u32 reg = SWRM_DP_PORT_CTRL_BANK(enable_ch->port_num, bank);
10511050
struct qcom_swrm_ctrl *ctrl = to_qcom_sdw(bus);
1052-
struct qcom_swrm_port_config *pcfg;
10531051
u32 val;
10541052

1055-
pcfg = &ctrl->pconfig[enable_ch->port_num];
10561053
ctrl->reg_read(ctrl, reg, &val);
1057-
if (pcfg->ch_mask != SWR_INVALID_PARAM && pcfg->ch_mask != 0)
1058-
enable_ch->ch_mask = pcfg->ch_mask;
10591054

10601055
if (enable_ch->enable)
10611056
val |= (enable_ch->ch_mask << SWRM_DP_PORT_CTRL_EN_CHAN_SHFT);
@@ -1275,26 +1270,6 @@ static void *qcom_swrm_get_sdw_stream(struct snd_soc_dai *dai, int direction)
12751270
return ctrl->sruntime[dai->id];
12761271
}
12771272

1278-
static int qcom_swrm_set_channel_map(struct snd_soc_dai *dai,
1279-
unsigned int tx_num, const unsigned int *tx_slot,
1280-
unsigned int rx_num, const unsigned int *rx_slot)
1281-
{
1282-
struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dai->dev);
1283-
int i;
1284-
1285-
if (tx_slot) {
1286-
for (i = 0; i < tx_num; i++)
1287-
ctrl->pconfig[i].ch_mask = tx_slot[i];
1288-
}
1289-
1290-
if (rx_slot) {
1291-
for (i = 0; i < rx_num; i++)
1292-
ctrl->pconfig[i].ch_mask = rx_slot[i];
1293-
}
1294-
1295-
return 0;
1296-
}
1297-
12981273
static int qcom_swrm_startup(struct snd_pcm_substream *substream,
12991274
struct snd_soc_dai *dai)
13001275
{
@@ -1331,7 +1306,6 @@ static const struct snd_soc_dai_ops qcom_swrm_pdm_dai_ops = {
13311306
.shutdown = qcom_swrm_shutdown,
13321307
.set_stream = qcom_swrm_set_sdw_stream,
13331308
.get_stream = qcom_swrm_get_sdw_stream,
1334-
.set_channel_map = qcom_swrm_set_channel_map,
13351309
};
13361310

13371311
static const struct snd_soc_component_driver qcom_swrm_dai_component = {

0 commit comments

Comments
 (0)