From: Rander Wang
Make sure all calls to the SoundWire stream API are done and involve
callback
Signed-off-by: Rander Wang
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers
unless we have to remove the smarts.
This patch requires a topology change to use PDIs starting at offset 2
explicitly.
Note that there is a known discrepancy between hardware documentation
and what ALH stream works in practice, future fixes are likely.
Signed-off-by: Pierre-Louis Bossart
in the code that
can be improved, hence the RFC state.
Bard Liao (3):
soundwire: intel: fix intel_register_dai PDI offsets and numbers
soundwire: intel: remove playback/capture stream_name
soundwire: cadence_master: improve PDI allocation
Pierre-Louis Bossart (3):
soundwire: remove DAI_ID_RANGE
DIs. Again this was not detected since PDM was not supported earlier.
Reported-by: Ranjani Sridharan
Signed-off-by: Bard Liao
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/intel.c b/driv
From: Rander Wang
Sdw stream is enabled and disabled in trigger function.
Signed-off-by: Rander Wang
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/drivers/soundwire/intel.c b
From: Rander Wang
The sdw stream is allocated and stored in dai to share
the sdw runtime information.
Signed-off-by: Rander Wang
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 57 ++-
1 file changed, 56 insertions(+), 1 deletion
From: Rander Wang
We need the link_id as a parameter for the config callback, and we
also need a matching free callback in case any resources need to be
released.
Signed-off-by: Rander Wang
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 19
There is no reason to reserve a range of DAI IDs for SoundWire. This
is not scalable and it's better to let the ASoC core allocate the
dai->id when registering a component.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 2 --
include/linux/soundwire/sdw.h | 3 ---
On 8/13/19 4:32 PM, Pierre-Louis Bossart wrote:
This is an update on the RFC, to be applied after the '[PATCH v2 0/3]
soundwire: debugfs support for 5.4' and '[PATCH 00/17] soundwire:
fixes for 5.4' series.
Total that makes 28 patches submitted for review, broken in 3 sets.
I double
Add debugfs file to dump the Cadence master registers.
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Reviewed-by: Greg Kroah-Hartman
Acked-by: Sanyog Kale
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire
to the OS with an
Intel-specific _DSD property. The same capability will be added to
revisions of the MIPI DisCo specification.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 26 ++
include/linux/soundwire/sdw.h | 2 ++
2 files changed, 24 insertions
capabilities)
squashed patch 3
Pierre-Louis Bossart (4):
soundwire: add debugfs support
soundwire: cadence_master: add debugfs register dump
soundwire: intel: add debugfs register dump
soundwire: intel: handle disabled links
drivers/soundwire/Makefile | 4 +
drivers/soundwire/bus.c
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Reviewed-by: Greg Kroah-Hartman
Acked-by: Sanyog Kale
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/Makefile| 4 +
drivers/soundwire/bus.c | 6 ++
drivers/soundwire/bus.h | 16
drivers/soundwire/bus_typ
Add debugfs file to dump the Intel SoundWire registers
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Reviewed-by: Greg Kroah-Hartman
Acked-by: Sanyog Kale
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire
From: Daniel Baluta
Add support for device tree based SOF DSP devices.
Signed-off-by: Daniel Baluta
Signed-off-by: Pierre-Louis Bossart
---
sound/soc/sof/Kconfig | 10 +++
sound/soc/sof/Makefile | 3 +
sound/soc/sof/sof-of-dev.c | 143 +
3
From: Daniel Baluta
This describes the DSP device tree node.
Signed-off-by: Daniel Baluta
Reviewed-by: Rob Herring
Signed-off-by: Pierre-Louis Bossart
---
.../devicetree/bindings/dsp/fsl,dsp.yaml | 88 +++
1 file changed, 88 insertions(+)
create mode 100644
From: Daniel Baluta
Add support for the audio DSP hardware found on NXP i.MX8 platform.
Signed-off-by: Daniel Baluta
Signed-off-by: Pierre-Louis Bossart
---
sound/soc/sof/Kconfig | 1 +
sound/soc/sof/Makefile | 1 +
sound/soc/sof/imx/Kconfig | 22 +++
sound/soc/sof/imx
The reviews for these patches took place already on mailing lists and
GitHub, and the code is already integrated in the SOF tree (along with
dependencies already accepted in the i.MX tree)
Changes since v1:
As agreed with Daniel and Mark, this v2 series includes the DT
bindings (Fixed
On 8/21/19 4:07 AM, Vinod Koul wrote:
On 05-08-19, 19:55, Pierre-Louis Bossart wrote:
This series provides an update on the initial RFC. Debugfs and Intel
updates will be provided in follow-up patches. The order of patches
was changed since the RFC so detailed change logs are provided below
On 8/16/19 4:43 AM, Vinod Koul wrote:
On 12-08-19, 18:59, Pierre-Louis Bossart wrote:
This patchset enables debugfs support and corrects all the feedback
provided on an earlier RFC ('soundwire: updates for 5.4')
There is one remaining hard-coded value in intel.c that will need to
be fixed
+void intel_shutdown(struct snd_pcm_substream *substream,
+ struct snd_soc_dai *dai)
+{
+ struct sdw_cdns_dma_data *dma;
+
+ dma = snd_soc_dai_get_dma_data(dai, substream);
+ if (!dma)
+ return;
+
+ snd_soc_dai_set_dma_data(dai, substream, NULL);
+ kfree(dma);
On 8/13/19 11:11 PM, Vinod Koul wrote:
On 13-08-19, 20:58, Mark Brown wrote:
On Tue, Aug 13, 2019 at 02:38:53PM -0500, Pierre-Louis Bossart wrote:
Indeed. I don't have a full understanding of that part to be honest, nor why
we need something SoundWire-specific. We already abused
+static u32 cdns_set_initial_frame_shape(int n_rows, int n_cols)
+{
+ u32 val;
+ int c;
+ int r;
+
+ r = sdw_find_row_index(n_rows);
+ c = sdw_find_col_index(n_cols) & CDNS_MCP_FRAME_SHAPE_COL_MASK;
+
+ val = (r << CDNS_MCP_FRAME_SHAPE_ROW_OFFSET) | c;
+
+ return val;
+}
+
Move code to helper for reuse in power management routines
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 5f14c6acce80
Provide debugfs capability to kick link and devices into hard-reset
(as defined by MIPI). This capability is really useful when some
devices are no longer responsive and/or to check the software handling
of resynchronization.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire
Clarified commit messages
Pierre-Louis Bossart (6):
soundwire: fix startup sequence for Intel/Cadence
soundwire: cadence_master: add hw_reset capability in debugfs
soundwire: intel: add helper for initialization
soundwire: intel: Add basic power management support
soundwire: cadence_master: make
Add basic hooks in DAI .startup and .shutdown callbacks. The SoundWire
IP should be powered between those two calls.
By default the platform_device is in SUSPENDED mode, it is required to
call pm_runtime_set_active() before _enable()
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire
Implement suspend/resume capabilities (not runtime_pm for now)
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 18 ++--
drivers/soundwire
-Louis Bossart
---
drivers/soundwire/cadence_master.c | 15 ---
drivers/soundwire/cadence_master.h | 2 +-
drivers/soundwire/intel.c | 2 +-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 84 +-
drivers/soundwire/cadence_master.h | 1 +
drivers/soundwire/intel.c | 14 -
3 files changed, 73 insertions(+), 26 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers
ncies and align with other serial
links")
Link: https://github.com/ClangBuiltLinux/linux/issues/637
Signed-off-by: Nathan Chancellor
Sounds good, thanks for the fix.
Acked-by: Pierre-Louis Bossart
---
v1 -> v2:
* Rename slave.o to acpi_slave.o
* Reword commit message to reflect th
On 8/13/19 2:18 PM, Mark Brown wrote:
On Tue, Aug 13, 2019 at 02:15:18PM -0500, Pierre-Louis Bossart wrote:
On 8/13/19 1:06 PM, Srinivas Kandagatla wrote:
sorry for the confusion. It was too quick reply. :-)
I was suppose to say sdw_stream_add_slave() instead of set_sdw_stream().
ok, so
On 8/13/19 1:06 PM, Srinivas Kandagatla wrote:
On 13/08/2019 18:51, Pierre-Louis Bossart wrote:
On 8/13/19 11:50 AM, Srinivas Kandagatla wrote:
Thanks for the review,
On 13/08/2019 15:44, Pierre-Louis Bossart wrote:
On 8/13/19 3:35 AM, Srinivas Kandagatla wrote:
On platforms which have
On 8/13/19 1:17 PM, Srinivas Kandagatla wrote:
On 13/08/2019 15:34, Pierre-Louis Bossart wrote:
On 8/13/19 3:35 AM, Srinivas Kandagatla wrote:
From: Vinod Koul
This callback allows masters to compute the bus parameters required.
This looks like a partial use of the patch ('soundwire: Add
On 8/13/19 11:50 AM, Srinivas Kandagatla wrote:
Thanks for the review,
On 13/08/2019 15:44, Pierre-Louis Bossart wrote:
On 8/13/19 3:35 AM, Srinivas Kandagatla wrote:
On platforms which have smart speaker amplifiers connected via
soundwire and modeled as aux devices in ASoC, in such usecases
On 8/13/19 3:35 AM, Srinivas Kandagatla wrote:
From: Vinod Koul
This callback allows masters to compute the bus parameters required.
This looks like a partial use of the patch ('soundwire: Add Intel
resource management algorithm')? see comments below
Signed-off-by: Vinod Koul
On 8/13/19 3:35 AM, Srinivas Kandagatla wrote:
On platforms which have smart speaker amplifiers connected via
soundwire and modeled as aux devices in ASoC, in such usecases machine
driver should be able to get sdw master stream from dai so that it can
use the runtime stream to setup slave
On 8/13/19 1:10 AM, Nathan Chancellor wrote:
clang warns when CONFIG_ACPI is unset:
../drivers/soundwire/slave.c:16:12: warning: unused function
'sdw_slave_add' [-Wunused-function]
static int sdw_slave_add(struct sdw_bus *bus,
^
1 warning generated.
Before commit 8676b3ca4673
On 8/13/19 6:29 AM, Mark Brown wrote:
On Tue, Aug 13, 2019 at 03:24:51AM -0700, Tony Lindgren wrote:
* Takashi Iwai [190809 08:24]:
... and it was already fixed in the later commit 0e36f36b04e7
"ASoC: soc-core: fix module_put() warning in soc_cleanup_component".
Mark, looks like this
Looks like the merge resolution is not quite right.
I have used the sound-asoc tree from next-20190808 for today.
I am still getting this failure ...
Intel people, any thoughts?
I provided a solution on alsa-devel yesterday, see 'ASoC: SOF: fix HDA
direct MMIO access'
Add debugfs file to dump the Cadence master registers.
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 107
Add debugfs file to dump the Intel SoundWire registers
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 121 ++
1 file
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/Makefile| 4 +
drivers/soundwire/bus.c | 6 ++
drivers/soundwire/bus.h | 16
drivers/soundwire/bus_type.c | 3 +
drivers/soundwire/debugfs
compilation
removed intermediate variables
removed hard-coded constants in loops (used registers offsets and
hardware capabilities)
squashed patch 3
Pierre-Louis Bossart (3):
soundwire: add debugfs support
soundwire: cadence_master: add debugfs register dump
soundwire: intel: add debugfs
On 8/10/19 2:03 AM, Greg KH wrote:
On Fri, Aug 09, 2019 at 05:43:40PM -0500, Pierre-Louis Bossart wrote:
+/**
+ * sdw_cdns_debugfs_init() - Cadence debugfs init
+ * @cdns: Cadence instance
+ * @root: debugfs root
+ */
+void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root
#Cadence Objs
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 49f64b2115b9..89d5f1537d9b 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -49,6 +49,8 @@ int sdw_add_bus_master(struct sdw_bus *bus)
}
}
+ bus->debugfs =
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/Makefile| 5 ++
drivers/soundwire/bus.c | 6 ++
drivers/soundwire/bus.h | 24 ++
drivers/soundwire/bus_type.c | 3 +
drivers/soundwire/debugfs
Add debugfs file to dump the Cadence master registers
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 104 +
drivers
if CONFIG_DEBUG_FS is selected
used static inlines for fallback compilation
removed intermediate variables
removed hard-coded constants in loops (used registers offsets and
hardware capabilities)
squashed patch 3
Pierre-Louis Bossart (3):
soundwire: add debugfs support
soundwire: cadence_master: add
Add debugfs file to dump the Intel SoundWire registers
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 114 ++
1 file
+/* 4 ports */
+static struct sdw_dpn_prop wsa_sink_dpn_prop[WSA881X_MAX_SWR_PORTS] = {
+ {
+ /* DAC */
+ .num = 1,
+ .type = SDW_DPN_SIMPLE,
IIRC we added the REDUCED type in SoundWire 1.1 to cover the PDM case
with channel packing (or was it grouping) used by
+++ b/Documentation/devicetree/bindings/soundwire/slave.txt
@@ -0,0 +1,46 @@
+SoundWire slave device bindings.
+
+SoundWire is a 2-pin multi-drop interface with data and clock line.
+It facilitates development of low cost, efficient, high performance systems.
+
+SoundWire slave devices:
+Every
+/* 4 ports */
+static struct sdw_dpn_prop wsa_sink_dpn_prop[WSA881X_MAX_SWR_PORTS] = {
+ {
+ /* DAC */
+ .num = 1,
+ .type = SDW_DPN_SIMPLE,
IIRC we added the REDUCED type in SoundWire 1.1 to cover the PDM case
with channel packing (or was it
@@ -35,6 +36,7 @@ static int sdw_slave_add(struct sdw_bus *bus,
slave->dev.release = sdw_slave_release;
slave->dev.bus = _bus_type;
+ slave->dev.of_node = of_node_get(to_of_node(fwnode));
shouldn't this protected by
#if IS_ENABLED(CONFIG_OF) ?
slave->bus = bus;
Hi Mark,
Vinod, Mark, any feedback?
There will be a set of SoundWire codec drivers provided upstream soonish and
we'll get a number of kbuild errors without this patch.
I think I'm missing context here, I've basically been zoning out all the
soundwire stuff - the patch series are huge
On 8/7/19 10:29 AM, Daniel Baluta wrote:
On Tue, Jul 23, 2019 at 6:19 PM Pierre-Louis Bossart
wrote:
diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig
index 61b97fc55bb2..2aa3a1cdf60c 100644
--- a/sound/soc/sof/Kconfig
+++ b/sound/soc/sof/Kconfig
@@ -36,6 +36,15 @@ config
+static int sof_dt_probe(struct platform_device *pdev)
+{
+ struct device *dev = >dev;
+ const struct sof_dev_desc *desc;
+ /*TODO: create a generic snd_soc_xxx_mach */
+ struct snd_soc_acpi_mach *mach;
I wonder if you really need to use the same structures. For Intel we get
On 7/19/19 4:04 AM, Rafael J. Wysocki wrote:
On Fri, Jul 19, 2019 at 1:02 AM Pierre-Louis Bossart
wrote:
The existing code has a mixed select/depend usage which makes no sense.
config SOUNDWIRE_BUS
tristate
select REGMAP_SOUNDWIRE
config REGMAP_SOUNDWIRE
tristate
On 8/6/19 10:31 AM, Cezary Rojewski wrote:
On 2019-08-06 02:55, Pierre-Louis Bossart wrote:
@@ -1493,6 +1493,11 @@ static int _sdw_prepare_stream(struct
sdw_stream_runtime *stream)
}
}
+ if (!bus) {
+ pr_err("Configuration error in %s\n", __func__);
+
On 8/6/19 10:27 AM, Cezary Rojewski wrote:
On 2019-08-06 02:55, Pierre-Louis Bossart wrote:
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 5d9729b4d634..89c55e4bb72c 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire
-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 6 --
include/linux/soundwire/sdw_intel.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 3d9ca6479e94..a906789c7f78 100644
--- a/drivers
ice_id *id);
^
Fix by adding the relevant include
Reported-by: kbuild test robot
Signed-off-by: Bard liao
Signed-off-by: Pierre-Louis Bossart
---
include/linux/soundwire/sdw.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/soundwire/sdw.h b/i
and alternate banks.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/stream.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 53f5e790fcd7..75b9ad1fb1a6 100644
--- a/drivers/soundwire/stream.c
is
typically tied to the oscillator frequency and does not change between
platforms. The max_clk_freq value is linked to the maximum bandwidth
needed and topology/trace length.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 14 ++
1 file changed, 10
Remove hard-coding and use firmware (BIOS/DT) values. If they are
wrong use default 48x2 frame shape.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 26 +++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/soundwire
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 049ecfad2c00..fb198a806efd 100644
--- a/drivers/soundwire/cadence_master.c
To help pass platform-specific values, add a new field that can either
be set by the Master driver or read from firmware (BIOS/DT).
Signed-off-by: Pierre-Louis Bossart
---
include/linux/soundwire/sdw.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/soundwire/sdw.h b/include
Adding missing interrupt masks (parity, etc) and missing checks.
Clarify which masks are for which usage.
Signed-off-by: Bard Liao
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 29 +
1 file changed, 25 insertions(+), 4 deletions
to the OS with an
Intel-specific _DSD property. The same capability will be added to
revisions of the MIPI DisCo specification.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 26 ++
include/linux/soundwire/sdw.h | 2 ++
2 files changed, 24 insertions
in the following patch.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.h| 7 +--
drivers/soundwire/stream.c | 14 --
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
index 648436a995a3..89e74adf96fa 100644
The code has a set of defaults which may not be relevant in all cases,
add kernel parameter as a helper - mostly for early board bring-up.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire
will select the second
and third links only.
options soundwire_intel_init sdw_link_mask=0x6
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel_init.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
All DAI callbacks are in intel.c except for shutdown. Move and remove
export symbol
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 14 --
drivers/soundwire/cadence_master.h | 2 --
drivers/soundwire/intel.c | 17 +++--
3 files
A number of variables don't need to be initialized.
In a couple of cases where we loop on a list of runtimes, the code
handling of the 'bus' variable leads to warnings that it may not be
initialized. Add a specific error case to trap such cases.
Signed-off-by: Pierre-Louis Bossart
---
drivers
update comments to provide better understanding of enumeration flows.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 89d5f1537d9b..40f7d0dc59a6 100644
On all released Intel controllers (CNL/CML/ICL), PDI2 reports an
invalid count, force the correct hardware-supported value
This may have to be revisited with platform-specific values if the
hardware changes, but for now this is good enough.
Signed-off-by: Pierre-Louis Bossart
---
drivers
Pierre-Louis Bossart (15):
soundwire: intel: prevent possible dereference in hw_params
soundwire: intel: fix channel number reported by hardware
soundwire: cadence_master: revisit interrupt settings
soundwire: bus: improve dynamic debug comments for enumeration
soundwire: export helpers
On 8/5/19 11:57 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:20PM -0500, Pierre-Louis Bossart wrote:
On most hardware platforms, SoundWire interfaces are pin-muxed with
other interfaces (typically DMIC or I2S) and the status of each link
needs to be checked at boot time.
For Intel
On 8/5/19 11:32 AM, Sanyog Kale wrote:
On Mon, Aug 05, 2019 at 10:33:25AM -0500, Pierre-Louis Bossart wrote:
On 8/5/19 4:56 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:15PM -0500, Pierre-Louis Bossart wrote:
When we disable the stream and then call hw_free, two bank switches
+static int sdw_select_row_col(struct sdw_bus *bus, int clk_freq)
+{
+ struct sdw_master_prop *prop = >prop;
+ int frame_int, frame_freq;
+ int r, c;
+
+ for (c = 0; c < SDW_FRAME_COLS; c++) {
+ for (r = 0; r < SDW_FRAME_ROWS; r++) {
+
@@ -988,9 +989,11 @@ int sdw_cdns_init(struct sdw_cdns *cdns)
/* Set clock divider */
divider = (prop->mclk_freq / prop->max_clk_freq) - 1;
val = cdns_readl(cdns, CDNS_MCP_CLK_CTRL0);
reg read of CLK_CTRL0 can be removed.
yes for both comments. Thanks for the review
On 8/5/19 5:28 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:17PM -0500, Pierre-Louis Bossart wrote:
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 26
On 8/5/19 4:56 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:15PM -0500, Pierre-Louis Bossart wrote:
When we disable the stream and then call hw_free, two bank switches
will be handled and as a result we re-enable the stream on hw_free.
I didnt quite get why there will be two bank
On 8/5/19 4:39 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:13PM -0500, Pierre-Louis Bossart wrote:
Add a prefix for common tables and export 2 helpers to set the frame
shapes based on row/col values.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.h| 7
+static ssize_t cdns_reg_read(struct file *file, char __user *user_buf,
+size_t count, loff_t *ppos)
+{
+ struct sdw_cdns *cdns = file->private_data;
+ char *buf;
+ ssize_t ret;
+ int i, j;
+
+ buf = kzalloc(RD_BUF, GFP_KERNEL);
+
On 8/2/19 12:31 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Here as well
I squashed this with earlier patches to fix the init sequence in one shot
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 9 +++--
drivers/soundwire
On 8/2/19 12:30 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Please add explanation why..
yes missed this
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/soundwire
On 8/2/19 12:28 PM, Vinod Koul wrote:
On 26-07-19, 09:46, Pierre-Louis Bossart wrote:
On 7/26/19 5:38 AM, Cezary Rojewski wrote:
On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
+void intel_shutdown(struct snd_pcm_substream *substream,
+ struct snd_soc_dai *dai)
+{
+ struct
On 8/2/19 12:19 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
From: Rander Wang
The existing code uses an OR operation which would mix the original
divider setting with the new one, resulting in an invalid
configuration that can make codecs hang.
This looked fine
On 8/2/19 12:17 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 26
On 8/2/19 12:10 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Remove hard-coding and use BIOS values. If they are wrong use default
BIOS :) this is cadence, am sure this can be used outside BIOS :D
It would be better to say firmware (ACPI/DT)
yes
48x2 frame
On 8/2/19 12:03 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Please do provide the changelog on why this change is needed.
not needed for now, will remove.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.h | 3 +++
1 file changed, 3
On 8/2/19 12:00 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
update comments to provide better understanding of enumeration flows.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
On 8/2/19 11:58 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Not all platforms support runtime_pm for now, let's use runtime_pm
only when enabled.
We discussed this with Ulf sometime back and it was a consensus the core
should handle it, but that may take a while.
So
On 8/2/19 10:57 AM, Vinod Koul wrote:
On 02-08-19, 10:16, Pierre-Louis Bossart wrote:
On 8/2/19 6:55 AM, Vinod Koul wrote:
On 25-07-19, 18:39, Pierre-Louis Bossart wrote:
This should not happen in production systems but we should test for
all callback arguments before invoking
On 8/2/19 11:01 AM, Vinod Koul wrote:
On 02-08-19, 10:29, Pierre-Louis Bossart wrote:
On 8/2/19 7:20 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
+ status[i] = SDW_SLAVE_UNATTACHED;
+ break
On 8/2/19 7:20 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
When a Slave reports multiple status in the sticky bits, find the
latest configuration from the mirror of the PING frame status and
update the status directly.
Signed-off-by: Pierre-Louis Bossart
@@ -761,10 +769,21 @@ int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns)
cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK1,
CDNS_MCP_SLAVE_INTMASK1_MASK);
+ /* enable detection of slave state changes */
mask = CDNS_MCP_INT_SLAVE_RSVD | CDNS_MCP_INT_SLAVE_ALERT
On 8/2/19 7:03 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns)
{
- int ret;
-
_cdns_enable_interrupt(cdns);
- ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE
601 - 700 of 1453 matches
Mail list logo