[PATCH 5/5] soundwire: bus: only clear valid DPN interrupts

2020-11-24 Thread Bard Liao
From: Pierre-Louis Bossart Mirror the changes made for DP0 and don't modify reserved fields. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH 3/5] soundwire: registers: add definitions for clearable interrupt fields

2020-11-24 Thread Bard Liao
interrupts as well. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- include/linux/soundwire/sdw_registers.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/soundwire/sdw_registers.h b/include/linux/soundwire

[PATCH 2/5] soundwire: bus: reset slave_notify status at each loop

2020-11-24 Thread Bard Liao
From: Pierre-Louis Bossart The code loops multiple times to deal with pending interrupts, but we never reset the slave_notify status. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 4 +++- 1 file changed, 3

[PATCH 1/5] soundwire: bus: add comments to explain interrupt loop filter

2020-11-24 Thread Bard Liao
in the first read. This strategy helps meet SoundWire requirements without remaining forever in an interrupt handler. Add a couple of comments to document this design. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 7

[PATCH 0/5] soundwire: only clear valid interrupts

2020-11-24 Thread Bard Liao
We wrote 1 to the handled interrupts bits along with 0 to all other bits to the SoundWire DPx interrupt register. However, DP0 has reserved fields and the read-only SDCA_CASCADE bit. DPN also has reserved fields. We should not try to write values in these fields. Besides, we deal with pending

[PATCH] soundwire: SDCA: detect sdca_cascade interrupt

2020-11-04 Thread Bard Liao
the status of the sdca_cascade bit. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 28 +++- include/linux/soundwire/sdw.h | 4 2 files changed, 31 insertions(+), 1 deletio

[PATCH 5/5] ASoC/SoundWire: rt711-sdca: Add RT711 SDCA vendor-specific driver

2020-11-03 Thread Bard Liao
From: Shuming Fan This is the initial codec driver for rt711 SDCA version. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/codecs/Kconfig |7 + sound/soc/codecs/Makefile |2 + sound/soc/codecs/rt711-sdca-sdw.c

[PATCH 4/5] ASoC/SoundWire: rt1316: Add RT1316 SDCA vendor-specific driver

2020-11-03 Thread Bard Liao
From: Shuming Fan This is the initial amplifier driver for rt1316 SDCA version. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt1316-sdw.c | 756

[PATCH 0/5] regmap/SoundWire/ASoC: Add SoundWire SDCA support

2020-11-03 Thread Bard Liao
The MIPI SoundWire Device Class standard will define audio functionality beyond the scope of the existing SoundWire 1.2 standard, which is limited to the bus and interface. The description is inspired by the USB Audio Class, with "functions", "entities", "control selectors", "audio clusters". The

[PATCH 1/5] soundwire: SDCA: add helper macro to access controls

2020-11-03 Thread Bard Liao
-Louis Bossart Signed-off-by: Bard Liao --- include/linux/soundwire/sdw_registers.h | 32 + 1 file changed, 32 insertions(+) diff --git a/include/linux/soundwire/sdw_registers.h b/include/linux/soundwire/sdw_registers.h index f420e8059779..e14dff9a9c7f 100644 --- a/include

[PATCH 2/5] regmap/SoundWire: sdw: add support for SoundWire 1.2 MBQ

2020-11-03 Thread Bard Liao
ander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-sdw-mbq.c | 101 ++

[PATCH 3/5] ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec driver

2020-11-03 Thread Bard Liao
From: Jack Yu First version of rt715 sdw sdca codec driver. Signed-off-by: Jack Yu Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/codecs/Kconfig | 7 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt715-sdca-sdw.c | 278 + sound

[PATCH v3] soundwire: SDCA: add helper macro to access controls

2020-10-30 Thread Bard Liao
-Louis Bossart Signed-off-by: Bard Liao --- Changelog: v2: - add SDW_SDCA_MBQ_CTL v3: - add SDW_SDCA_NEXT_CTL --- include/linux/soundwire/sdw_registers.h | 32 + 1 file changed, 32 insertions(+) diff --git a/include/linux/soundwire/sdw_registers.h b/include/linux

[PATCH 2/3] soundwire: intel: enable test modes

2020-09-21 Thread Bard Liao
to test capture paths. In this case the input generated by a Slave source port is replaced by a fixed or cyclical patterns. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 42

[PATCH 0/3] soundwire: enable Data Port test modes

2020-09-21 Thread Bard Liao
Test modes are required for all SoundWire IP, and help debug integration issues. This series adds debugfs support and data port test fail interrupt to enable data port test mode feature on Intel platforms. Pierre-Louis Bossart (3): soundwire: enable Data Port test modes soundwire: intel:

[PATCH v2 7/7] soundwire: cadence: add parity error injection through debugfs

2020-09-08 Thread Bard Liao
nen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index ecf503fb23e1..13e565f93166 100

[PATCH v2 4/7] soundwire: bus: use quirk to filter out invalid parity errors

2020-09-08 Thread Bard Liao
From: Pierre-Louis Bossart If a Slave device reports with a quirk that its initial parity check may be incorrect, filter it but keep the parity checks active in steady state. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[PATCH v2 2/7] soundwire: bus: filter-out unwanted interrupt reports

2020-09-08 Thread Bard Liao
interrupt sources. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c

[PATCH v2 0/7] ASoC/soundwire: filter out invalid PARITY errors

2020-09-08 Thread Bard Liao
Some codecs may report fake PARITY errors in the initial state. This series will filter them out. Pierre-Louis Bossart (7): ASoC/soundwire: bus: use property to set interrupt masks soundwire: bus: filter-out unwanted interrupt reports soundwire: slave: add first_interrupt_done status

[PATCH] soundwire: Add generic bandwidth allocation algorithm

2020-09-08 Thread Bard Liao
sdw_add_bus_master() Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. All hard-coded values were removed from the initial contribution to use BIOS information instead. Signed-off-by: Bard Liao --- drivers/soundwire/Kconfig

[PATCH v3 0/3] ASoC: Add sdw stream operations to dailink ops.

2020-09-05 Thread Bard Liao
Sdw stream operation APIs can be called once per stream. Move these operations to dailink ops. The linked series is "soundwire: Remove sdw stream operations from Intel soundwire dai". Reviewed-by: Vinod Koul Changes in v3: - s/ASOC/ASoC Pierre-Louis Bossart (3): ASoC: soc-dai: clarify

[PATCH v3 2/3] ASoC: Intel: sof_sdw: add dailink .trigger callback

2020-09-05 Thread Bard Liao
-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 41 1 file changed, 41 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 2463d432bf4d..f251e046d74d 100644

[PATCH v3 1/3] ASoC: soc-dai: clarify return value for get_sdw_stream()

2020-09-05 Thread Bard Liao
: return proper error for get_sdw_stream()') Cc: Srinivas Kandagatla Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- include/sound/soc-dai.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sound/soc

[PATCH v3 3/3] ASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback

2020-09-05 Thread Bard Liao
Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 40 1 file changed, 40 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index f251e046d74d..16503772965c 100644 --- a/sound/soc/intel/boards/sof_sdw.c

[PATCH v2 1/4] soundwire: stream: fix NULL/IS_ERR confusion

2020-09-04 Thread Bard Liao
From: Pierre-Louis Bossart snd_soc_dai_get_sdw_stream() can only return -ENOTSUPP or the stream, NULL is not a possible value. Fixes: 4550569bd779f ('soundwire: stream: add helper to startup/shutdown streams') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander

[PATCH v2 2/4] soundwire: intel: fix NULL/ERR_PTR confusion

2020-09-04 Thread Bard Liao
From: Pierre-Louis Bossart snd_soc_dai_get_sdw_stream() can only return the pointer to stream or an ERR_PTR value, NULL is not a possible value. Fixes: 09553140c8d7b ('soundwire: intel: implement get_sdw_stream() operations') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed

[PATCH v2 4/4] soundwire: intel: remove stream handling from .prepare and .hw_free

2020-09-04 Thread Bard Liao
Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index d208c49b157a..a254f271acf2 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire

[PATCH v2 0/4] soundwire: Remove sdw stream operations from Intel

2020-09-04 Thread Bard Liao
Sdw stream operation APIs can be called once per stream. Move these operations to dailink ops. The linked series is "ASoC: Add sdw stream operations to dailink ops". Pierre-Louis Bossart (4): soundwire: stream: fix NULL/IS_ERR confusion soundwire: intel: fix NULL/ERR_PTR confusion

[PATCH v2 3/4] soundwire: intel: remove .trigger operation

2020-09-04 Thread Bard Liao
From: Pierre-Louis Bossart Now that the stream trigger is handled at the dai-link level, there is no need for a dai-level trigger any longer. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 39 --- 1 file

[PATCH v2 3/3] ASOC: Intel: sof_sdw: add dailink .prepare and .hw_free callback

2020-09-04 Thread Bard Liao
Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 40 1 file changed, 40 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index f251e046d74d..16503772965c 100644 --- a/sound/soc/intel/boards/sof_sdw.c

[PATCH v2 0/3] ASoC: Add sdw stream operations to dailink ops.

2020-09-04 Thread Bard Liao
Sdw stream operation APIs can be called once per stream. Move these operations to dailink ops. The linked series is "soundwire: Remove sdw stream operations from Intel soundwire dai". Pierre-Louis Bossart (3): ASoC: soc-dai: clarify return value for get_sdw_stream() ASOC: Intel: sof_sdw: add

[PATCH v2 2/3] ASOC: Intel: sof_sdw: add dailink .trigger callback

2020-09-04 Thread Bard Liao
-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 41 1 file changed, 41 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 2463d432bf4d..f251e046d74d 100644

[PATCH v2 1/3] ASoC: soc-dai: clarify return value for get_sdw_stream()

2020-09-04 Thread Bard Liao
: return proper error for get_sdw_stream()') Cc: Srinivas Kandagatla Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- include/sound/soc-dai.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sound/soc

[PATCH v2 08/10] soundwire: intel: add error log for clock-stop invalid configs

2020-09-01 Thread Bard Liao
-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 272826973426..97c8cfc54ddd 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1931,6 +1931,11 @@ static int

[PATCH v2 10/10] soundwire: intel: don't manage link power individually

2020-09-01 Thread Bard Liao
powered a link can be in clock-stopped mode. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 70 +-- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire

[PATCH v2 05/10] soundwire: bus: update multi-link definition with hw sync details

2020-09-01 Thread Bard Liao
rre-Louis Bossart Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 76052f12c9f7..9adbe4fd7980 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/li

[PATCH v2 01/10] soundwire: intel: disable shim wake on suspend

2020-09-01 Thread Bard Liao
Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index ebca8ced59ec..aa8484366c95 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1532,6

[PATCH v2 02/10] soundwire: intel: ignore software command retries

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart with multiple links synchronized in hardware, retrying commands in software is not recommended. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire

[PATCH v2 03/10] soundwire: intel: add multi-link support

2020-09-01 Thread Bard Liao
-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 120 ++ 1 file changed, 110 insertions(+), 10 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 94a659e65f86..259e3da98e42 100644 --- a/drivers/soundwire

[PATCH v2 06/10] soundwire: intel: add multi-link hw_synchronization information

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart set the flags as required by hardware implementation Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index

[PATCH v2 04/10] soundwire: intel: add missing support for all clock stop modes

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart Deal with the BUS_RESET case, which is the default. The only change is to add support for the exit sequence using the syncArm/syncGo mode for the exit reset sequence. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 49

[PATCH v2 07/10] soundwire: stream: enable hw_sync as needed by hardware

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart Use platform-specific information to decide when to use hw_sync, not only a number of links > 1. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) d

[PATCH v2 09/10] soundwire: intel: pass link_mask information to each master

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart While the hardware exposes independent bits to power-up each master, the recommended sequence is to power all links or none. Idle links can still use the clock stop mode while the master is powered. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao

[PATCH v2 00/10] soundwire: intel: add multi-link support

2020-09-01 Thread Bard Liao
This series enables multi-link support for Intel platforms. Changes in v2: - Remove the "soundwire: intel: Only call sdw stream APIs for the first cpu_dai" patch form this series. We will move the sounwdire stream operations to machine driver in another series. - Update the commit message and

[PATCH 6/7] soundwire: intel: remove .trigger operation

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart Now that the stream trigger is handled at the dai-link level, there is no need for a dai-level trigger any longer. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 39 --- 1 file

[PATCH 7/7] soundwire: intel: remove stream handling from .prepare and .hw_free

2020-09-01 Thread Bard Liao
Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 39d3186335ac..631c425ba430 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire

[PATCH 5/7] ASOC: Intel: sof_sdw: add dailink .prepare and .hw_free callback

2020-09-01 Thread Bard Liao
Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 40 1 file changed, 40 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index f251e046d74d..16503772965c 100644 --- a/sound/soc/intel/boards/sof_sdw.c

[PATCH 0/7] ASoC: soundwire: Move sdw stream operations to

2020-09-01 Thread Bard Liao
sdw stream operation APIs can be called once per stream. dailink callbacks are good places to call these APIs. Pierre-Louis Bossart (7): ASoC: soc-dai: clarify return value for get_sdw_stream() soundwire: stream: fix NULL/IS_ERR confusion soundwire: intel: fix NULL/ERR_PTR confusion ASOC:

[PATCH 1/7] ASoC: soc-dai: clarify return value for get_sdw_stream()

2020-09-01 Thread Bard Liao
: return proper error for get_sdw_stream()') Cc: Srinivas Kandagatla Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- include/sound/soc-dai.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/sound/soc

[PATCH 3/7] soundwire: intel: fix NULL/ERR_PTR confusion

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart snd_soc_dai_get_sdw_stream() can only return the pointer to stream or an ERR_PTR value, NULL is not a possible value. Fixes: 09553140c8d7b ('soundwire: intel: implement get_sdw_stream() operations') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed

[PATCH 4/7] ASOC: Intel: sof_sdw: add dailink .trigger callback

2020-09-01 Thread Bard Liao
-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 41 1 file changed, 41 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 2463d432bf4d..f251e046d74d 100644

[PATCH 2/7] soundwire: stream: fix NULL/IS_ERR confusion

2020-09-01 Thread Bard Liao
From: Pierre-Louis Bossart snd_soc_dai_get_sdw_stream() can only return -ENOTSUPP or the stream, NULL is not a possible value. Fixes: 4550569bd779f ('soundwire: stream: add helper to startup/shutdown streams') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander

[PATCH v4 2/3] soundwire: add definition for maximum number of ports

2020-08-31 Thread Bard Liao
From: Pierre-Louis Bossart A Device may have at most 15 physical ports (DP0, DP1..DP14). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v4 3/3] soundwire: fix port_ready[] dynamic allocation in mipi_disco

2020-08-31 Thread Bard Liao
Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/mipi_disco.c | 18 +- drivers/soundwire/slave.c | 4 include/linux/soundwire/sdw.h | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH v4 0/3] ASoC: soundwire: fix port_ready[] dynamic allocation

2020-08-31 Thread Bard Liao
The existing code allocates memory for the total number of ports. This only works if the ports are contiguous, but will break if e.g. a Devices uses port0, 1, and 14. The port_ready[] array would contain 3 elements, which would lead to an out-of-bounds access. Conversely in other cases, the wrong

[PATCH v4 1/3] ASoC: codecs: soundwire: remove port_ready[] usage from codecs.

2020-08-31 Thread Bard Liao
Signed-off-by: Bard Liao --- sound/soc/codecs/max98373-sdw.c | 15 +-- sound/soc/codecs/rt1308-sdw.c | 14 +- sound/soc/codecs/rt5682-sdw.c | 15 +-- sound/soc/codecs/rt700-sdw.c| 15 +-- sound/soc/codecs/rt711-sdw.c| 15

Re: [PATCH v3 0/3] ASoC: soundwire: fix port_ready[] dynamic allocation

2020-08-31 Thread Bard liao
On 8/31/2020 11:12 PM, Pierre-Louis Bossart wrote: On 8/30/20 8:27 AM, Bard Liao wrote: The existing code allocates memory for the total number of ports. This only works if the ports are contiguous, but will break if e.g. a Devices uses port0, 1, and 14. The port_ready[] array would contain

[PATCH v3 3/3] ASoC: codecs: soundwire: remove port_ready[] usage from codecs.

2020-08-30 Thread Bard Liao
From: Pierre-Louis Bossart As port_ready is now changed to a fixed array in sdw.h, and all initialization work is done at soundwire side. So remove them from codec drivers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[PATCH v3 2/3] soundwire: fix port_ready[] dynamic allocation in mipi_disco

2020-08-30 Thread Bard Liao
Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/mipi_disco.c | 18 +- drivers/soundwire/slave.c | 4 include/linux/soundwire/sdw.h | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH v3 1/3] soundwire: add definition for maximum number of ports

2020-08-30 Thread Bard Liao
From: Pierre-Louis Bossart A Device may have at most 15 physical ports (DP0, DP1..DP14). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v3 0/3] ASoC: soundwire: fix port_ready[] dynamic allocation

2020-08-30 Thread Bard Liao
The existing code allocates memory for the total number of ports. This only works if the ports are contiguous, but will break if e.g. a Devices uses port0, 1, and 14. The port_ready[] array would contain 3 elements, which would lead to an out-of-bounds access. Conversely in other cases, the wrong

Re: [PATCH 3/4] soundwire: SDCA: add helper macro to access controls

2020-08-25 Thread Bard liao
Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Acked-by: Bard Liao

Re: [PATCH 4/4] regmap: sdw: add support for SoundWire 1.2 MBQ

2020-08-25 Thread Bard liao
separately. Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Acked-by: Bard Liao

[PATCH v2] soundwire: intel: fix intel_suspend/resume defined but not used warning

2020-08-24 Thread Bard Liao
: ‘intel_suspend’ defined but not used [-Wunused-function] static int intel_suspend(struct device *dev) ^ Fix by using __maybe_unused macro. Suggested-by: Vinod Koul Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- Changelog: v2: - use __maybe_unused macro instead

[PATCH v2 3/3] ASoC: codecs: fix port_ready[] dynamic allocation in ASoC codecs

2020-08-21 Thread Bard Liao
From: Pierre-Louis Bossart As port_ready is now changed to a fixed array in sdw.h, we can't dynamic allocate it in codec drivers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- sound/soc/codecs/max98373-sdw.c

[PATCH v2 2/3] soundwire: fix port_ready[] dynamic allocation in mipi_disco

2020-08-21 Thread Bard Liao
Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/mipi_disco.c | 18 +- drivers/soundwire/slave.c | 4 include/linux/soundwire/sdw.h | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers

[PATCH v2 1/3] soundwire: add definition for maximum number of ports

2020-08-21 Thread Bard Liao
From: Pierre-Louis Bossart A Device may have at most 15 physical ports (DP0, DP1..DP14). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 0/3] soundwire: fix port_ready[] dynamic allocation

2020-08-21 Thread Bard Liao
The existing code allocates memory for the total number of ports. This only works if the ports are contiguous, but will break if e.g. a Devices uses port0, 1, and 14. The port_ready[] array would contain 3 elements, which would lead to an out-of-bounds access. Conversely in other cases, the wrong

[PATCH] soundwire: intel: fix CONFIG_PM and CONFIG_PM_SLEEP confusion

2020-08-20 Thread Bard Liao
all the pm handling is merged. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index dbcbe2708563..a2f0026cb2c1

[PATCH 7/7] soundwire: cadence: add parity error injection through debugfs

2020-08-18 Thread Bard Liao
nen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 24eafe0aa1c3..807d70b82455 100

[PATCH 5/7] ASoC: codecs: realtek-soundwire: ignore initial PARITY errors

2020-08-18 Thread Bard Liao
-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- sound/soc/codecs/rt1308-sdw.c | 1 + sound/soc/codecs/rt5682-sdw.c | 1 + sound/soc/codecs/rt700-sdw.c | 1 + sound/soc/codecs/rt711-sdw.c | 1 + sound/soc/codecs/rt715-sdw.c | 1 + 5 files changed, 5 insertions

[PATCH 3/7] soundwire: slave: add first_interrupt_done status

2020-08-18 Thread Bard Liao
-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 7 ++- drivers/soundwire/slave.c | 1 + include/linux/soundwire/sdw.h | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff

[PATCH 6/7] soundwire: bus: export broadcast read/write capability for tests

2020-08-18 Thread Bard Liao
Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 56 +++-- drivers/soundwire/bus.h | 4 +++ 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 869290a8db40..2e08e8f8b9aa 100644 --- a/drivers

[PATCH 1/7] soundwire: bus: use property to set interrupt masks

2020-08-18 Thread Bard Liao
-defined interrupts are no longer set for amplifiers - those interrupts are typically for jack detection or acoustic event detection/hotwording. Tested-by: Srinivas Kandagatla Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao

[PATCH 2/7] soundwire: bus: filter-out unwanted interrupt reports

2020-08-18 Thread Bard Liao
interrupt sources. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c

[PATCH 4/7] soundwire: bus: use quirk to filter out invalid parity errors

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart If a Slave device reports with a quirk that its initial parity check may be incorrect, filter it but keep the parity checks active in steady state. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[PATCH 0/7] soundwire: filter out invalid PARITY errors

2020-08-18 Thread Bard Liao
Some codecs may report fake PARITY errors in the initial state. This series will filter them out. Pierre-Louis Bossart (7): soundwire: bus: use property to set interrupt masks soundwire: bus: filter-out unwanted interrupt reports soundwire: slave: add first_interrupt_done status

[PATCH 05/11] soundwire: bus: update multi-link definition with hw sync details

2020-08-18 Thread Bard Liao
rre-Louis Bossart Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 76052f12c9f7..9adbe4fd7980 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/li

[PATCH 11/11] soundwire: intel: don't manage link power individually

2020-08-18 Thread Bard Liao
powered a link can be in clock-stopped mode. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 70 +-- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire

[PATCH 02/11] soundwire: intel: ignore software command retries

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart with multiple links synchronized in hardware, retrying commands in software is not recommended. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire

[PATCH 10/11] soundwire: intel: pass link_mask information to each master

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart While the hardware exposes independent bits to power-up each master, the recommended sequence is to power all links or none. Idle links can still use the clock stop mode while the master is powered. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao

[PATCH 08/11] soundwire: stream: enable hw_sync as needed by hardware

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Use platform-specific information to decide when to use hw_sync, not only a number of links > 1. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) d

[PATCH 07/11] soundwire: intel: Only call sdw stream APIs for the first cpu_dai

2020-08-18 Thread Bard Liao
We should call these APIs once per stream. So we can only call it when the dai ops is invoked for the first cpu dai. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan --- drivers/soundwire/intel.c | 45 +-- 1 file

[PATCH 06/11] soundwire: intel: add multi-link hw_synchronization information

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart set the flags as required by hardware implementation Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index

[PATCH 04/11] soundwire: intel: add missing support for all clock stop modes

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Deal with the BUS_RESET case, which is the default. The only change is to add support for the exit sequence using the syncArm/syncGo mode for the exit reset sequence. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 49

[PATCH 03/11] soundwire: intel: add multi-link support

2020-08-18 Thread Bard Liao
-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 120 ++ 1 file changed, 110 insertions(+), 10 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index c9ba706e20c6..a3aa8ab49285 100644 --- a/drivers/soundwire

[PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff

[PATCH 01/11] soundwire: intel: disable shim wake on suspend

2020-08-18 Thread Bard Liao
Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index dbcbe2708563..fe9b92fd48db 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1532,6

[PATCH 00/11] soundwire: intel: add multi-link support

2020-08-18 Thread Bard Liao
This series enables multi-link support for Intel platforms. Bard Liao (1): soundwire: intel: Only call sdw stream APIs for the first cpu_dai Pierre-Louis Bossart (10): soundwire: intel: disable shim wake on suspend soundwire: intel: ignore software command retries soundwire: intel: add

[PATCH] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-18 Thread Bard Liao
should make sure the current transaction can complete, and prevent new work from being queued. BugLink: https://github.com/thesofproject/linux/issues/2344 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH] soundwire: bus: fix typo in comment on INTSTAT registers

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart s/Instat/Intstat/ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c

[PATCH 2/2] soundwire: fix port_ready[] dynamic allocation in mipi_disco and ASoC codecs

2020-08-17 Thread Bard Liao
Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/mipi_disco.c | 18 +- drivers/soundwire/slave.c | 4 include/linux/soundwire/sdw.h | 2 +- sound/soc/codecs/max98373-sdw.c | 15 +-- sound/soc

[PATCH 1/2] soundwire: add definition for maximum number of ports

2020-08-17 Thread Bard Liao
From: Pierre-Louis Bossart A Device may have at most 15 physical ports (DP0, DP1..DP14). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH 0/2] soundwire: fix port_ready[] dynamic allocation in

2020-08-17 Thread Bard Liao
The existing code allocates memory for the total number of ports. This only works if the ports are contiguous, but will break if e.g. a Devices uses port0, 1, and 14. The port_ready[] array would contain 3 elements, which would lead to an out-of-bounds access. Conversely in other cases, the wrong

[PATCH v2 07/12] soundwire: intel: add CLK_STOP_TEARDOWN for pm_runtime suspend

2020-08-17 Thread Bard Liao
From: Pierre-Louis Bossart Now that we have options, add support for TEARDOWN mode (same functionality as existing code) All other modes will be added in follow-up patches. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 82

[PATCH v2 03/12] soundwire: intel: fix race condition on system resume

2020-08-17 Thread Bard Liao
: the pm_runtime suspend may conflict with the enumeration started by the system resume. This can be simply fixed by updating the status before exiting system resume. GitHub issue: https://github.com/thesofproject/linux/issues/1482 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao

[PATCH v2 11/12] soundwire: intel: support clock_stop mode without quirks

2020-08-17 Thread Bard Liao
From: Pierre-Louis Bossart In this mode, on restart the bus restarts immediately, the Slaves remain synchronized and all context is kept intact. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 21

[PATCH v2 06/12] soundwire: intel: pm_runtime idle scheduling

2020-08-17 Thread Bard Liao
connector. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 95a1d88a5bfb

[PATCH v2 09/12] soundwire: intel: add CLK_STOP_NOT_ALLOWED support

2020-08-17 Thread Bard Liao
From: Pierre-Louis Bossart In case the clock needs to keep running, we need to prevent the Master from entering pm_runtime suspend. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 20 1 file changed, 20 insertions(+) diff

[PATCH v2 04/12] soundwire: intel: call helper to reset Slave states on resume

2020-08-17 Thread Bard Liao
-by: Bard Liao --- drivers/soundwire/intel.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 00c5de1250ec..10dd0e208ce7 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1516,6 +1516,12 @@ static int

<    1   2   3   4   >