soundwire fixes for v6.16

This contains couple of amd driver fixes for handles alerts when link is
 down and cmd status register clear up. Also revert of qualcomm driver
 channel map support due to regression observed.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmh56SYACgkQfBQHDyUj
 g0exjg//fPab7Iw+VGWgzmGBi0U4mjlbdeuw4M12jl1iRaJiBhySEGLlMeYPY1Jl
 gWf4YblQ+UN2mOFCp0L+F7vsU/lWxb7iJle+oLbk3DSq4XjBhhPht9yP6Z9wVmAH
 P+phCVns0yFMSuJciYmRGcL3J6nzblCwdju8llfeSlo9y2Tij4N4um9IlEUFaYNe
 FIbX73y17SLbmWqVR6BLvwM04N7AX9QD0culNb3QFDC94M6MDfYCVvYRkcbesK1M
 j6do+pPE8pAR73tdptvcl3IYXyp2IKqGIwcbGrQQwn62o+9vp+iv73OPo3AZUIcd
 +he2Z7rmaAWx8MXYVMi3YDbNqn4L8Z6+iwtZw3mvyTJC7du5A9LZkWL0qg6MVil3
 h+A3JWjJ9n5EpK4EvMwmQn8n8DSqQDj1PAaAvo0DewIpTBuobAvAjDfncHPJu1Ej
 EjldKRNYSSZaw/KcW2QfkzAglOyEucURcJtwTiZKLWwLwoJLnsJA82wVgQvt/Vrl
 VFoRqXQCRMR4kPFtbadxsF5dtTLYpjT75ZdFSfkypA3FU8BdklaQeBrTAWgrjG7x
 GfkAZq2UEOm43vzPHQPhUbKScqTKqt7Mzxsi2zAY/+NBZc1ztppanu2BRsYmwbWf
 iBYoOwTQ5eiDnkggtzO9Wtd0W0nZ/REXDhXXbGNT6vQxWteIPy0=
 =8c7S
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2025-07-18 11:04:39 -07:00
commit e1da8eb20a
2 changed files with 3 additions and 27 deletions

View File

@ -238,7 +238,7 @@ static u64 amd_sdw_send_cmd_get_resp(struct amd_sdw_manager *amd_manager, u32 lo
if (sts & AMD_SDW_IMM_RES_VALID) {
dev_err(amd_manager->dev, "SDW%x manager is in bad state\n", amd_manager->instance);
writel(0x00, amd_manager->mmio + ACP_SW_IMM_CMD_STS);
writel(AMD_SDW_IMM_RES_VALID, amd_manager->mmio + ACP_SW_IMM_CMD_STS);
}
writel(upper_data, amd_manager->mmio + ACP_SW_IMM_CMD_UPPER_WORD);
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)
}
if (amd_manager->power_mode_mask & AMD_SDW_CLK_STOP_MODE) {
cancel_work_sync(&amd_manager->amd_sdw_work);
amd_sdw_wake_enable(amd_manager, false);
if (amd_manager->acp_rev >= ACP70_PCI_REV_ID) {
ret = amd_sdw_host_wake_enable(amd_manager, false);
@ -1219,6 +1220,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
if (ret)
return ret;
} else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
cancel_work_sync(&amd_manager->amd_sdw_work);
amd_sdw_wake_enable(amd_manager, false);
if (amd_manager->acp_rev >= ACP70_PCI_REV_ID) {
ret = amd_sdw_host_wake_enable(amd_manager, false);

View File

@ -156,7 +156,6 @@ struct qcom_swrm_port_config {
u8 word_length;
u8 blk_group_count;
u8 lane_control;
u8 ch_mask;
};
/*
@ -1049,13 +1048,9 @@ static int qcom_swrm_port_enable(struct sdw_bus *bus,
{
u32 reg = SWRM_DP_PORT_CTRL_BANK(enable_ch->port_num, bank);
struct qcom_swrm_ctrl *ctrl = to_qcom_sdw(bus);
struct qcom_swrm_port_config *pcfg;
u32 val;
pcfg = &ctrl->pconfig[enable_ch->port_num];
ctrl->reg_read(ctrl, reg, &val);
if (pcfg->ch_mask != SWR_INVALID_PARAM && pcfg->ch_mask != 0)
enable_ch->ch_mask = pcfg->ch_mask;
if (enable_ch->enable)
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)
return ctrl->sruntime[dai->id];
}
static int qcom_swrm_set_channel_map(struct snd_soc_dai *dai,
unsigned int tx_num, const unsigned int *tx_slot,
unsigned int rx_num, const unsigned int *rx_slot)
{
struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dai->dev);
int i;
if (tx_slot) {
for (i = 0; i < tx_num; i++)
ctrl->pconfig[i].ch_mask = tx_slot[i];
}
if (rx_slot) {
for (i = 0; i < rx_num; i++)
ctrl->pconfig[i].ch_mask = rx_slot[i];
}
return 0;
}
static int qcom_swrm_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
@ -1331,7 +1306,6 @@ static const struct snd_soc_dai_ops qcom_swrm_pdm_dai_ops = {
.shutdown = qcom_swrm_shutdown,
.set_stream = qcom_swrm_set_sdw_stream,
.get_stream = qcom_swrm_get_sdw_stream,
.set_channel_map = qcom_swrm_set_channel_map,
};
static const struct snd_soc_component_driver qcom_swrm_dai_component = {