Skip to content

Commit 6fac113

Browse files
committed
Merge tag 'soundwire-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire updates from Vinod Koul: "A couple of small core changes and driver updates: - Core: handling of nesting irqs to outside the lock, stream parameters handing on port prep failures. - AMD driver support for ACP 7.2 platforms and improved handing of slave alerts and resume sequences - Qualcomm updating driver debug spew - Intel BPT message length limitations, rt721 codec as wake capable etc" * tag 'soundwire-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: amd: Add support for acp7.2 platform soundwire: stream: restore params when prepare ports fail soundwire: debugfs: move debug statement outside of error handling soundwire: amd: add check for status update registers soundwire: intel_auxdevice: add rt721 codec to wake_capable_list soundwire: Correct some property names soundwire: update Intel BPT message length limitation soundwire: intel_ace2.x: Use str_read_write() helper soundwire: amd: cancel pending slave status handling workqueue during remove sequence soundwire: amd: serialize amd manager resume sequence during pm_prepare soundwire: qcom: demote probe registration printk ASoC: cs42l43: Remove unnecessary work functions soundwire: Move handle_nested_irq outside of sdw_dev_lock MAINTAINERS: Remove Sanyog Kale as reviewer on SoundWire
2 parents d6f38c1 + 34b1cb4 commit 6fac113

File tree

14 files changed

+55
-74
lines changed

14 files changed

+55
-74
lines changed

Documentation/driver-api/soundwire/bra.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,4 @@ FIFO sizes to avoid xruns.
333333

334334
Alignment requirements are currently not enforced at the core level
335335
but at the platform-level, e.g. for Intel the data sizes must be
336-
multiples of 32 bytes.
336+
equal to or larger than 16 bytes.

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23637,7 +23637,6 @@ SOUNDWIRE SUBSYSTEM
2363723637
M: Vinod Koul <[email protected]>
2363823638
M: Bard Liao <[email protected]>
2363923639
R: Pierre-Louis Bossart <[email protected]>
23640-
R: Sanyog Kale <[email protected]>
2364123640
2364223641
S: Supported
2364323642
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git

drivers/soundwire/amd_manager.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ static int amd_sdw_port_params(struct sdw_bus *bus, struct sdw_port_params *p_pa
499499
break;
500500
case ACP70_PCI_REV_ID:
501501
case ACP71_PCI_REV_ID:
502+
case ACP72_PCI_REV_ID:
502503
frame_fmt_reg = acp70_sdw_dp_reg[p_params->num].frame_fmt_reg;
503504
break;
504505
default:
@@ -551,6 +552,7 @@ static int amd_sdw_transport_params(struct sdw_bus *bus,
551552
break;
552553
case ACP70_PCI_REV_ID:
553554
case ACP71_PCI_REV_ID:
555+
case ACP72_PCI_REV_ID:
554556
frame_fmt_reg = acp70_sdw_dp_reg[params->port_num].frame_fmt_reg;
555557
sample_int_reg = acp70_sdw_dp_reg[params->port_num].sample_int_reg;
556558
hctrl_dp0_reg = acp70_sdw_dp_reg[params->port_num].hctrl_dp0_reg;
@@ -614,6 +616,7 @@ static int amd_sdw_port_enable(struct sdw_bus *bus,
614616
break;
615617
case ACP70_PCI_REV_ID:
616618
case ACP71_PCI_REV_ID:
619+
case ACP72_PCI_REV_ID:
617620
lane_ctrl_ch_en_reg = acp70_sdw_dp_reg[enable_ch->port_num].lane_ctrl_ch_en_reg;
618621
break;
619622
default:
@@ -931,6 +934,9 @@ static void amd_sdw_irq_thread(struct work_struct *work)
931934

932935
status_change_8to11 = readl(amd_manager->mmio + ACP_SW_STATE_CHANGE_STATUS_8TO11);
933936
status_change_0to7 = readl(amd_manager->mmio + ACP_SW_STATE_CHANGE_STATUS_0TO7);
937+
if (!status_change_0to7 && !status_change_8to11)
938+
return;
939+
934940
dev_dbg(amd_manager->dev, "[SDW%d] SDW INT: 0to7=0x%x, 8to11=0x%x\n",
935941
amd_manager->instance, status_change_0to7, status_change_8to11);
936942
if (status_change_8to11 & AMD_SDW_WAKE_STAT_MASK)
@@ -1035,6 +1041,7 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
10351041
break;
10361042
case ACP70_PCI_REV_ID:
10371043
case ACP71_PCI_REV_ID:
1044+
case ACP72_PCI_REV_ID:
10381045
amd_manager->num_dout_ports = AMD_ACP70_SDW_MAX_TX_PORTS;
10391046
amd_manager->num_din_ports = AMD_ACP70_SDW_MAX_RX_PORTS;
10401047
break;
@@ -1074,6 +1081,7 @@ static void amd_sdw_manager_remove(struct platform_device *pdev)
10741081
int ret;
10751082

10761083
pm_runtime_disable(&pdev->dev);
1084+
cancel_work_sync(&amd_manager->amd_sdw_work);
10771085
amd_disable_sdw_interrupts(amd_manager);
10781086
sdw_bus_master_delete(&amd_manager->bus);
10791087
ret = amd_disable_sdw_manager(amd_manager);
@@ -1178,10 +1186,10 @@ static int __maybe_unused amd_pm_prepare(struct device *dev)
11781186
* device is not in runtime suspend state, observed that device alerts are missing
11791187
* without pm_prepare on AMD platforms in clockstop mode0.
11801188
*/
1181-
if (amd_manager->power_mode_mask & AMD_SDW_CLK_STOP_MODE) {
1182-
ret = pm_request_resume(dev);
1189+
if (amd_manager->power_mode_mask) {
1190+
ret = pm_runtime_resume(dev);
11831191
if (ret < 0) {
1184-
dev_err(bus->dev, "pm_request_resume failed: %d\n", ret);
1192+
dev_err(bus->dev, "pm_runtime_resume failed: %d\n", ret);
11851193
return 0;
11861194
}
11871195
}

drivers/soundwire/bus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,15 +1753,15 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
17531753

17541754
/* Update the Slave driver */
17551755
if (slave_notify) {
1756+
if (slave->prop.use_domain_irq && slave->irq)
1757+
handle_nested_irq(slave->irq);
1758+
17561759
mutex_lock(&slave->sdw_dev_lock);
17571760

17581761
if (slave->probed) {
17591762
struct device *dev = &slave->dev;
17601763
struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
17611764

1762-
if (slave->prop.use_domain_irq && slave->irq)
1763-
handle_nested_irq(slave->irq);
1764-
17651765
if (drv->ops && drv->ops->interrupt_callback) {
17661766
slave_intr.sdca_cascade = sdca_cascade;
17671767
slave_intr.control_port = clear;

drivers/soundwire/debugfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,16 @@ static int cmd_go(void *data, u64 value)
291291

292292
finish_t = ktime_get();
293293

294+
dev_dbg(&slave->dev, "command completed, num_byte %zu status %d, time %lld ms\n",
295+
num_bytes, ret, div_u64(finish_t - start_t, NSEC_PER_MSEC));
296+
294297
out:
295298
if (fw)
296299
release_firmware(fw);
297300

298301
pm_runtime_mark_last_busy(&slave->dev);
299302
pm_runtime_put(&slave->dev);
300303

301-
dev_dbg(&slave->dev, "command completed, num_byte %zu status %d, time %lld ms\n",
302-
num_bytes, ret, div_u64(finish_t - start_t, NSEC_PER_MSEC));
303-
304304
return ret;
305305
}
306306
DEFINE_DEBUGFS_ATTRIBUTE(cmd_go_fops, NULL,

drivers/soundwire/intel_ace2x.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/soundwire/sdw_registers.h>
1212
#include <linux/soundwire/sdw.h>
1313
#include <linux/soundwire/sdw_intel.h>
14+
#include <linux/string_choices.h>
1415
#include <sound/hdaudio.h>
1516
#include <sound/hda-mlink.h>
1617
#include <sound/hda-sdw-bpt.h>
@@ -183,7 +184,7 @@ static int intel_ace2x_bpt_open_stream(struct sdw_intel *sdw, struct sdw_slave *
183184
return 0;
184185

185186
dev_err(cdns->dev, "%s: sdw_prepare_%s_dma_buffer failed %d\n",
186-
__func__, command ? "read" : "write", ret);
187+
__func__, str_read_write(command), ret);
187188

188189
ret1 = hda_sdw_bpt_close(cdns->dev->parent, /* PCI device */
189190
sdw->bpt_ctx.bpt_tx_stream, &sdw->bpt_ctx.dmab_tx_bdl,
@@ -245,17 +246,17 @@ static void intel_ace2x_bpt_close_stream(struct sdw_intel *sdw, struct sdw_slave
245246
cdns->bus.bpt_stream = NULL;
246247
}
247248

248-
#define INTEL_BPT_MSG_BYTE_ALIGNMENT 32
249+
#define INTEL_BPT_MSG_BYTE_MIN 16
249250

250251
static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *slave,
251252
struct sdw_bpt_msg *msg)
252253
{
253254
struct sdw_cdns *cdns = &sdw->cdns;
254255
int ret;
255256

256-
if (msg->len % INTEL_BPT_MSG_BYTE_ALIGNMENT) {
257-
dev_err(cdns->dev, "BPT message length %d is not a multiple of %d bytes\n",
258-
msg->len, INTEL_BPT_MSG_BYTE_ALIGNMENT);
257+
if (msg->len < INTEL_BPT_MSG_BYTE_MIN) {
258+
dev_err(cdns->dev, "BPT message length %d is less than the minimum bytes %d\n",
259+
msg->len, INTEL_BPT_MSG_BYTE_MIN);
259260
return -EINVAL;
260261
}
261262

drivers/soundwire/intel_auxdevice.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ static struct wake_capable_part wake_capable_list[] = {
6565
{0x025d, 0x715},
6666
{0x025d, 0x716},
6767
{0x025d, 0x717},
68+
{0x025d, 0x721},
6869
{0x025d, 0x722},
6970
};
7071

drivers/soundwire/mipi_disco.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
451451
"mipi-sdw-highPHY-capable");
452452

453453
prop->paging_support = mipi_device_property_read_bool(dev,
454-
"mipi-sdw-paging-support");
454+
"mipi-sdw-paging-supported");
455455

456456
prop->bank_delay_support = mipi_device_property_read_bool(dev,
457-
"mipi-sdw-bank-delay-support");
457+
"mipi-sdw-bank-delay-supported");
458458

459459
device_property_read_u32(dev,
460460
"mipi-sdw-port15-read-behavior", &prop->p15_behave);

drivers/soundwire/qcom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,9 +1622,9 @@ static int qcom_swrm_probe(struct platform_device *pdev)
16221622
if (ret)
16231623
goto err_master_add;
16241624

1625-
dev_info(dev, "Qualcomm Soundwire controller v%x.%x.%x Registered\n",
1626-
(ctrl->version >> 24) & 0xff, (ctrl->version >> 16) & 0xff,
1627-
ctrl->version & 0xffff);
1625+
dev_dbg(dev, "Qualcomm Soundwire controller v%x.%x.%x registered\n",
1626+
(ctrl->version >> 24) & 0xff, (ctrl->version >> 16) & 0xff,
1627+
ctrl->version & 0xffff);
16281628

16291629
pm_runtime_set_autosuspend_delay(dev, 3000);
16301630
pm_runtime_use_autosuspend(dev);

drivers/soundwire/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream,
15101510
if (ret < 0) {
15111511
dev_err(bus->dev, "Prepare port(s) failed ret = %d\n",
15121512
ret);
1513-
return ret;
1513+
goto restore_params;
15141514
}
15151515
}
15161516

0 commit comments

Comments
 (0)