RE: a question about range_map_cfg

2013-05-29 Thread Bard Liao
> -Original Message- > From: Mark Brown [mailto:broo...@sirena.org.uk] > Sent: Wednesday, May 29, 2013 10:56 PM > To: Bard Liao > Cc: Stephen Warren > Subject: Re: a question about range_map_cfg > > On Wed, May 29, 2013 at 08:46:40PM +0800, Bard Liao wrote: &g

RE: [alsa-devel] [PATCH 1/2] ASoC: rt5651: Enable jack detection on JD1_1

2017-10-19 Thread Bard Liao
> -Original Message- > From: Carlo Caione [mailto:ca...@endlessm.com] > Sent: Thursday, October 19, 2017 11:55 PM > To: Pierre-Louis Bossart > Cc: Carlo Caione; Linux Upstreaming Team; Bard Liao; Oder Chiou; Mark > Brown; alsa-de...@alsa-project.org; linux-kernel@vge

RE: [PATCH 1/2] ASoC: rt5651: Enable jack detection on JD1_1

2017-10-19 Thread Bard Liao
> -Original Message- > From: Carlo Caione [mailto:carlo.cai...@gmail.com] On Behalf Of Carlo > Caione > Sent: Thursday, October 19, 2017 7:03 PM > To: li...@endlessm.com; Bard Liao; Oder Chiou; > pierre-louis.boss...@linux.intel.com; broo...@kernel.org; > alsa-de...@al

RE: linux-next: build failure after merge of the sound-asoc tree

2015-04-29 Thread Bard Liao
Dear All, I will send a patch to fix it immediately. Thanks. Bard Liao Computer Peripherals Business Unit Realtek Semiconductor Corp. 886-3-578-0211 ext. 3334 bardl...@realtek.com > -Original Message- > From: Stephen Rothwell [mailto:s...@canb.auug.org.au] > Sent: Thursday,

[PATCH] soundwire: bus: clock_stop: don't deal with UNATTACHED Slave devices

2020-05-31 Thread Bard Liao
We don't need to do anything for the slave if it is unattached during clock stop prepare and exit sequences. Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/soundwire/bus.c b/dr

[PATCH] soundwire: clarify SPDX use of GPL-2.0

2020-05-31 Thread Bard Liao
Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 2 +- drivers/soundwire/bus.h | 2 +- drivers/soundwire/bus_type.c| 2 +- drivers/soundwire/cadence_master.c | 2 +- drivers/soundwire/cadence_master.h | 2

[PATCH v2 2/6] soundwire: intel: clarify drvdata and remove more indirections

2020-05-31 Thread Bard Liao
'dev' and 'cdns' to make the code more readable. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/soundwire/intel.

[PATCH v2 3/6] soundwire: intel_init: remove useless test

2020-05-31 Thread Bard Liao
From: Pierre-Louis Bossart No need to test link_mask twice Suggested-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/intel_init.c b/drivers

[PATCH v2 0/6] soundwire: intel: transition to 3 steps initialization

2020-05-31 Thread Bard Liao
This series is to split the original "soundwire: intel: transition to 3 steps initialization" patch into different patches for better review. It also address comments from Vinod. Pierre-Louis Bossart (6): soundwire: intel: cleanups for indirections/logs soundwire: intel: clarify drvdata and re

[PATCH v2 1/6] soundwire: intel: cleanups for indirections/logs

2020-05-31 Thread Bard Liao
From: Pierre-Louis Bossart The code can be simplified a bit to have a more consistent use of 'dev' and 'bus', as well as move definitions around. This will help make the major changes in follow-up patches easier to review. Signed-off-by: Pierre-Louis Bossart Sign

[PATCH v2 6/6] soundwire: intel: transition to 3 steps initialization

2020-05-31 Thread Bard Liao
enumerated. This step is only done during the card creation stage, after the DSP is powered to account for internal power rail dependencies. These 3 steps are already supported in the Sound Open firmware drivers and upstream. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao

[PATCH v2 5/6] soundwire: intel_init: pass link information as platform data

2020-05-31 Thread Bard Liao
From: Pierre-Louis Bossart It's not clear how this code ever worked, the link information is used in intel.c but never passed as platform_data. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel_init.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v2 4/6] soundwire: intel_init: use devm_ allocation

2020-05-31 Thread Bard Liao
From: Pierre-Louis Bossart Make error handling simpler with devm_ allocation. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel_init.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/soundwire/intel_init.c b

[PATCH v2 0/5] soundwire: bus_type: add sdw_master_device support

2020-05-18 Thread Bard Liao
This series adds sdw master devices support. changes in v2: - Allocate sdw_master_device dynamically - Use unique bus id as master id - Keep checking parent devices - Enable runtime_pm on Master device Bard Liao (2): soundwire: bus: add unique bus id soundwire: master: add runtime pm

[PATCH v2 2/5] soundwire: bus_type: introduce sdw_slave_type and sdw_master_type

2020-05-18 Thread Bard Liao
hange other than moving code around. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/bus_type.c | 19 +-- drivers/soundwire/slave.c | 8 +++- include/linux/soundwire/sdw_type.h | 9 - 3 files changed, 28 insertions(

[PATCH v2 5/5] soundwire: master: add runtime pm support

2020-05-18 Thread Bard Liao
We need to enable runtime_pm on master device with generic helpers, so that a Slave-initiated wake is propagated to the bus parent. Signed-off-by: Bard Liao --- drivers/soundwire/master.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/soundwire/master.c b/drivers/soundwire

[PATCH v2 4/5] soundwire: bus_type: add sdw_master_device support

2020-05-18 Thread Bard Liao
uis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/Makefile| 2 +- drivers/soundwire/bus.c | 14 -- drivers/soundwire/bus.h | 3 ++ drivers/soundwire/intel.c | 1 - drivers/soundwire/master.c| 81 +++ drivers/soundwire/qco

[PATCH v2 1/5] soundwire: bus: rename sdw_bus_master_add/delete, add arguments

2020-05-18 Thread Bard Liao
Intel code is currently unused, the two additional arguments are only needed for compilation. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- Documentation/driver-api/soundwire/summary.rst | 7 --- drivers/soundwire/bus.c| 15 +-- drivers

[PATCH v2 3/5] soundwire: bus: add unique bus id

2020-05-18 Thread Bard Liao
Adding an unique id for each bus. Suggested-by: Vinod Koul Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 20 include/linux/soundwire/sdw.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index

[PATCH 0/3] soundwire: add sysfs support

2020-05-19 Thread Bard Liao
Add soundwire sysfs support. Pierre-Louis Bossart (3): soundwire: disco: s/ch/channels/ soundwire: master: add sysfs support soundwire: add Slave sysfs support .../ABI/testing/sysfs-bus-soundwire-master| 23 ++ .../ABI/testing/sysfs-bus-soundwire-slave | 91 ++ drivers/soundw

[PATCH 2/3] soundwire: master: add sysfs support

2020-05-19 Thread Bard Liao
Bossart Signed-off-by: Bard Liao --- .../ABI/testing/sysfs-bus-soundwire-master| 23 + drivers/soundwire/master.c| 84 +++ 2 files changed, 107 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-soundwire-master diff --git a/Documentation

[PATCH 1/3] soundwire: disco: s/ch/channels/

2020-05-19 Thread Bard Liao
From: Pierre-Louis Bossart Use more meaningful member names in preparation for sysfs support. No functionality change. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/mipi_disco.c | 11 ++- include/linux/soundwire/sdw.h | 8 2 files

[PATCH 3/3] soundwire: add Slave sysfs support

2020-05-19 Thread Bard Liao
. Depending on the discussions the SoundWire Device Class, we may add it later as is or follow the new specification. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- .../ABI/testing/sysfs-bus-soundwire-slave | 91 ++ drivers/soundwire/Makefile| 3 +- drivers

[PATCH 2/2] soundwire: intel: transition to 3 steps initialization

2020-05-20 Thread Bard Liao
() callback lighter-weight with only hardware register setup. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 76 +- drivers/soundwire/intel.h | 15 ++ drivers/soundwire/intel_init.c | 249 ++--- 3 files

[PATCH 1/2] soundwire: intel: use a single module

2020-05-20 Thread Bard Liao
ff-by: Bard Liao --- drivers/soundwire/Makefile | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/soundwire/Makefile b/drivers/soundwire/Makefile index 7319918e0aec..4f6094767212 100644 --- a/drivers/soundwire/Makefile +++ b/drivers/soundwire/Makefile @@ -16,12

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

2020-08-20 Thread Bard Liao
when 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..a2f0026

[PATCH v2 00/12] soundwire: intel: add power management support

2020-08-17 Thread Bard Liao
This series adds power management support for Intel soundwire links. Changes in v2: - Move "#include " to the first required patch. - Fit debug log in single line. Bard Liao (1): soundwire: intel: reinitialize IP+DSP in .prepare(), but only when resuming Pierre-Louis

[PATCH v2 02/12] soundwire: intel: reset pm_runtime status during system resume

2020-08-17 Thread Bard Liao
conditionally disable, set_active and re-enable the device on system resume. Note that pm_runtime_suspended() is used instead of pm_runtime_status_suspended() so that we can deal with the case where pm_runtime is disabled. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH v2 08/12] soundwire: intel: add CLK_STOP_BUS_RESET support

2020-08-17 Thread Bard Liao
: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 68c1cdfb7999..ad476e9e4d25 100644 --- a/drivers/soundwire/intel.c

[PATCH v2 12/12] soundwire: intel: refine runtime pm for SDW_INTEL_CLK_STOP_BUS_RESET

2020-08-17 Thread Bard Liao
and the power rails will remain enabled. As a result, during the link resume step we can check if the context was preserved by verifying if the clock was stopped, and avoid doing a complete bus reset and re-enumeration. Signed-off-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH v2 05/12] soundwire: intel: reinitialize IP+DSP in .prepare(), but only when resuming

2020-08-17 Thread Bard Liao
es is handled via a simple boolean, updated when suspending, and tested for in the .prepare() case. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.h | 4 ++ drivers/soundwire/intel.c | 71 +- 2 files change

[PATCH v2 10/12] soundwire: intel_init: handle power rail dependencies for clock stop mode

2020-08-17 Thread Bard Liao
pm_runtime suspend routine. This choice of course has a power impact, and this mode should only be selected when latency requirements are critical or the parent device can enter D0ix modes. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel_init.c | 13

[PATCH v2 01/12] soundwire: intel: add pm_runtime support

2020-08-17 Thread Bard Liao
unregister, otherwise we will see "Failed to power up link: -11" error on module remove test. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 112 +++-- drivers/soundwire/intel_init.c | 5 +- 2 files changed, 112

[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
ition: 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:

[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
: 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

[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 p

[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] 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] soundwire: cadence: fix race condition between suspend and Slave device alerts

2020-08-18 Thread Bard Liao
s, we 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/soun

[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 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 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 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 05/11] soundwire: bus: update multi-link definition with hw sync details

2020-08-18 Thread Bard Liao
ff-by: Pierre-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/

[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 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 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 03/11] soundwire: intel: add multi-link support

2020-08-18 Thread Bard Liao
by: Pierre-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

[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 soundwire:

[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 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 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 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 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 7/7] soundwire: cadence: add parity error injection through debugfs

2020-08-18 Thread Bard Liao
Vehmanen 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 1006

[PATCH] soundwire: intel: don't return error when clock stop failed

2021-01-13 Thread Bard Liao
e-initiated interrupts may be lost, but at least audio function can still work after resume. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

[PATCH 2/5] soundwire: cadence: add status in dev_dbg 'State change' log

2021-01-14 Thread Bard Liao
92013] soundwire sdw-master-0: No more devices to enumerate [ 121.892200] intel-sdw intel-sdw.0: Slave status change: 0x21 << this shows the device now Attached as Device1 and Unattached as Device0, i.e. a successful enumeration. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao

[PATCH 1/5] soundwire: use consistent format for Slave devID logs

2021-01-14 Thread Bard Liao
ff-by: Bard Liao --- drivers/soundwire/bus.c | 5 ++--- drivers/soundwire/slave.c | 10 -- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index d1e8c3a54976..3cc006bfae71 100644 --- a/drivers/soundwire/bus.c +++ b/dr

[PATCH 0/5] soundwire: fix ACK/NAK handling and improve log

2021-01-14 Thread Bard Liao
debugging. Bard Liao (1): soundwire: bus: add more details to track failed transfers Pierre-Louis Bossart (4): soundwire: use consistent format for Slave devID logs soundwire: cadence: add status in dev_dbg 'State change' log soundwire: cadence: fix ACK/NAK handling soundwire: caden

[PATCH 5/5] soundwire: cadence: adjust verbosity in response handling

2021-01-14 Thread Bard Liao
devices to enumerate We can skip the 'Msg Ack not received' since it's typical of the enumeration end, and conversely add the information on which command fails. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 4 ++-- 1 file change

[PATCH 4/5] soundwire: cadence: fix ACK/NAK handling

2021-01-14 Thread Bard Liao
wire: cdns: Add sdw_master_ops and IO transfer support') Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/ca

[PATCH 3/5] soundwire: bus: add more details to track failed transfers

2021-01-14 Thread Bard Liao
-by: Bard Liao --- drivers/soundwire/bus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 3cc006bfae71..6e1c988f3845 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -267,8 +267,10 @@ static int

[PATCH 0/2] ASoC/SoundWire: fix timeout values

2021-01-14 Thread Bard Liao
The timeout for an individual transaction w/ the Cadence IP is the same as the entire resume operation for codecs. This doesn't make sense, we need to have at least one order of magnitude between individual transactions and the entire resume operation. Set the timeout on the Cadence side to 500ms

[PATCH 1/2] ASoC: codecs: soundwire: increase resume timeout

2021-01-14 Thread Bard Liao
Signed-off-by: Bard Liao --- sound/soc/codecs/max98373-sdw.c | 4 +++- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682.h | 2 +- sound/soc/codecs/rt700-sdw.c| 2 +- sound/soc/codecs/rt711-sdw.c| 2 +- sound/soc/codecs/rt715-sdw.c| 2 +- 6 files changed, 8

[PATCH 2/2] soundwire: cadence: reduce timeout on transactions

2021-01-14 Thread Bard Liao
than generous. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 9fa55164354a..f0b0ec173f8b 100644

[PATCH] soundwire: intel: move to auxiliary bus

2021-03-22 Thread Bard Liao
) and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated in prior iterations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- drivers/soundwire/Kc

[PATCH 0/5] soundwire: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Pierre-Louis Bossart (5): soundwire: intel: add missing \n in dev_err() soundwire: bandwidth_allocation: add missing \n in dev_err() soundwire: cadence: add missing \n in dev_err() soundwire: stream: ad

[PATCH 2/5] soundwire: bandwidth_allocation: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/generic_bandwidth_allocation.c

[PATCH 3/5] soundwire: cadence: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 2 +- 1 file

[PATCH 1/5] soundwire: intel: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 18

[PATCH 4/5] soundwire: stream: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 10 +- 1 file

[PATCH 5/5] soundwire: qcom: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/qcom.c | 2 +- 1 file changed, 1

[PATCH] soundwire: cadence: only prepare attached devices on clock stop

2021-03-22 Thread Bard Liao
linux/issues/2621 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/cadence_master

[PATCH] soundwire: add slave device to linked list after device_register()

2021-03-22 Thread Bard Liao
Keyon Jie Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/slave.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index 112b219

[PATCH] soundwire: stream: fix memory leak in stream config error path

2021-03-30 Thread Bard Liao
: Add support for SoundWire stream management") Signed-off-by: Rander Wang Reviewed-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) di

[PATCH] soundwire: intel_init: test link->cdns

2021-03-30 Thread Bard Liao
intel_link_probe() could return error and dev_get_drvdata() will return null in such case. So we have to test link->cdns after link->cdns = dev_get_drvdata(&ldev->auxdev.dev); Otherwise, we will meet the "kernel NULL pointer dereference" error. Signed-off-by: Bard Lia

[PATCH 0/2] soundwire: bus: handle errors in clock stop/start sequences

2021-03-30 Thread Bard Liao
If a device lost sync and can no longer ACK a command, it may not be able to enter a lower-power state but it will still be able to resync when the clock restarts. In those cases, we want to continue with the clock stop sequence. This patch modifies the behavior when -ENODATA is received, with the

[PATCH 2/2] soundwire: bus: handle errors in clock stop/start sequences

2021-03-30 Thread Bard Liao
Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 70 +++-- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 9bd83c91a873..ea54a1f02252 100644

[PATCH 1/2] soundwire: add macro to selectively change error levels

2021-03-30 Thread Bard Liao
From: Pierre-Louis Bossart We sometimes discard -ENODATA when reporting errors and lose all traces of issues in the console log, add a macro to add use dev_dbg() in such cases. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[PATCH v2] soundwire: intel: move to auxiliary bus

2021-03-30 Thread Bard Liao
) and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated in prior iterations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- v2: - add link_dev_register fo

[RESEND PATCH 00/11] soundwire: some cleanup patches

2021-03-26 Thread Bard Liao
To make soundwire driver more decent and less Cppcheck complaint. Pierre-Louis Bossart (11): soundwire: bus: use correct driver name in error messages soundwire: bus: test read status soundwire: bus: use consistent tests for return values soundwire: bus: demote clock stop prepare log to de

[RESEND PATCH 01/11] soundwire: bus: use correct driver name in error messages

2021-03-26 Thread Bard Liao
e any purpose. This patch only suggests using the proper indirection. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/bus_type.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-)

[RESEND PATCH 03/11] soundwire: bus: use consistent tests for return values

2021-03-26 Thread Bard Liao
Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 1c01cc192cbd..d39e5baa3e64 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/so

[RESEND PATCH 05/11] soundwire: bus: uniquify dev_err() for SCP_INT access

2021-03-26 Thread Bard Liao
Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 8b6d8fe934ae..a38b017f7a54 100644 --- a/drivers/soundwire/bus.c +++ b/drivers

[RESEND PATCH 04/11] soundwire: bus: demote clock stop prepare log to dev_dbg()

2021-03-26 Thread Bard Liao
From: Pierre-Louis Bossart There is no real reason to provide this information except for debug sessions, hence dev_dbg() is a better fit. Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[RESEND PATCH 06/11] soundwire: bus: remove useless initialization

2021-03-26 Thread Bard Liao
: Kai Vehmanen 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 index a38b017f7a54..1a9e307e6a4c 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -593,7 +

[RESEND PATCH 02/11] soundwire: bus: test read status

2021-03-26 Thread Bard Liao
-off-by: Bard Liao --- drivers/soundwire/bus.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 04eb879de145..1c01cc192cbd 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -875,8 +875,12

[RESEND PATCH 09/11] soundwire: qcom: check of_property_read status

2021-03-26 Thread Bard Liao
cases, not sure why it was missed here. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/qcom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soundw

[RESEND PATCH 11/11] soundwire: stream: remove useless bus initializations

2021-03-26 Thread Bard Liao
From: Pierre-Louis Bossart There is no need to assign a pointer to NULL if it's only used in a loop and assigned within that loop. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- dr

[RESEND PATCH 10/11] soundwire: stream: remove useless initialization

2021-03-26 Thread Bard Liao
: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 4915676c4ac2..6a682179cd05 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/str

[RESEND PATCH 08/11] soundwire: intel: remove useless readl

2021-03-26 Thread Bard Liao
ned-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index e2

  1   2   3   4   >