Re: [RFC PATCH 0/3] Separate BE DAI HW constraints from FE ones

2021-04-16 Thread Pierre-Louis Bossart
On 4/16/21 1:55 PM, Mark Brown wrote: On Fri, Apr 16, 2021 at 11:47:01AM -0500, Pierre-Louis Bossart wrote: On 4/16/21 11:31 AM, Mark Brown wrote: Not really written down that I can think of. I think the next steps that I can think of right now are unfortunately bigger and harder ones

Re: [RFC PATCH 0/3] Separate BE DAI HW constraints from FE ones

2021-04-16 Thread Pierre-Louis Bossart
On 4/16/21 11:31 AM, Mark Brown wrote: On Fri, Apr 16, 2021 at 04:03:05PM +, codrin.ciubota...@microchip.com wrote: Thank you for the links! So basically the machine driver disappears and all the components will be visible in user-space. Not entirely - you still need something to say

Re: [PATCH v1] ASoC: Intel: kbl_da7219_max98927: Fix kabylake_ssp_fixup function

2021-04-15 Thread Pierre-Louis Bossart
+ Signed-off-by: Lukasz Majczak --- Hi, This is basically a cherry-pick of this change: https://patchwork.kernel.org/project/alsa-devel/patch/1595432147-11166-1-git-send-email-harshapriy...@intel.com/ just applied to the kbl_da7219_max98927. Best regards, Lukasz Acked-by: Pierre-Louis Bossart

Re: [PATCH v2 2/3] soundwire: Intel: introduce DMI quirks for HP Spectre x360 Convertible

2021-04-14 Thread Pierre-Louis Bossart
On 4/13/21 11:08 PM, Vinod Koul wrote: On 12-04-21, 14:37, Dave Hansen wrote: On 3/1/21 11:51 PM, Bard Liao wrote: +++ b/drivers/soundwire/dmi-quirks.c @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) +// Copyright(c) 2021 Intel Corporation. It looks like this is

Re: [PATCH] ASoC: Intel: Handle device properties with software node API

2021-04-13 Thread Pierre-Louis Bossart
On 4/13/21 9:05 AM, Heikki Krogerus wrote: On Tue, Apr 13, 2021 at 03:20:45PM +0300, Heikki Krogerus wrote: On Mon, Apr 12, 2021 at 03:36:20PM -0500, Pierre-Louis Bossart wrote: I took the code and split it in two for BYT/CHT (modified to remove devm_) and SoundWire parts (added

Re: [PATCH] ASoC: Intel: Handle device properties with software node API

2021-04-12 Thread Pierre-Louis Bossart
Hi Heikki, diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index 06df2d46d910b..4a9817a95928c 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -544,7 +544,7 @@ static int

Re: [PATCH] ASoC: Intel: bytcr_wm5102: remove useless variable

2021-04-09 Thread Pierre-Louis Bossart
On 4/9/21 1:08 AM, Jiapeng Chong wrote: Fix the following gcc warning: sound/soc/intel/boards/bytcr_wm5102.c:216:40: warning: ‘byt_wm5102_dai_params’ defined but not used. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Thanks for the patch. Acked-by: Pierre-Louis Bossart

Re: [PATCH] ASoC: amd: Add support for ALC1015P codec in acp3x machine driver

2021-04-05 Thread Pierre-Louis Bossart
   static const struct acpi_device_id acp3x_audio_acpi_match[] = {    { "AMDI5682", (unsigned long)_5682},    { "AMDI1015", (unsigned long)_1015}, +    { "AMDP1015", (unsigned long)_1015p}, This isn't a valid ACPI ID. AMDP does not exist in ... There was a similar issue with

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

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 3:56 PM, Greg KH wrote: On Thu, Apr 01, 2021 at 01:43:53PM -0500, Pierre-Louis Bossart wrote: My bigger issue with this is that this macro is crazy. Why do you need debugging here at all for this type of thing? That's what ftrace is for, do not sprinkle code with "w

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

2021-04-01 Thread Pierre-Louis Bossart
My bigger issue with this is that this macro is crazy. Why do you need debugging here at all for this type of thing? That's what ftrace is for, do not sprinkle code with "we got this return value from here!" all over the place like what this does. We are not sprinkling the code all over

Re: [PATCH 3/7] PM: runtime: remove kernel-doc warnings

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 8:40 AM, Rafael J. Wysocki wrote: On Thu, Apr 1, 2021 at 1:26 AM Pierre-Louis Bossart wrote: remove make W=1 warnings drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn' drivers/base/power/runtime.c:926: warning

Re: [PATCH v2] soundwire: qcom: wait for fifo space to be available before read/write

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 4:00 AM, Srinivas Kandagatla wrote: If we write registers very fast we can endup in a situation where some of the writes will be dropped without any notice. So wait for the fifo space to be available before reading/writing the soundwire registers. Out of curiosity, do you

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

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 2:21 AM, Vinod Koul wrote: On 31-03-21, 09:02, Bard Liao wrote: 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(>auxdev.dev); Otherwise, we will meet the "kernel NULL pointer

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

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 2:24 AM, Vinod Koul wrote: On 31-03-21, 09:13, Bard Liao wrote: 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

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

2021-04-01 Thread Pierre-Louis Bossart
+#define sdw_dev_dbg_or_err(dev, is_err, fmt, ...) \ + do {\ + if (is_err) \ + dev_err(dev, fmt, __VA_ARGS__);

[PATCH 7/7] devcoredump: fix kernel-doc warning

2021-03-31 Thread Pierre-Louis Bossart
: expecting prototype for devcd_read_from_table(). Prototype was for devcd_read_from_sgtable() instead Signed-off-by: Pierre-Louis Bossart --- drivers/base/devcoredump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c

[PATCH 6/7] platform-msi: fix kernel-doc warnings

2021-03-31 Thread Pierre-Louis Bossart
was for __platform_msi_create_device_domain() instead Signed-off-by: Pierre-Louis Bossart --- drivers/base/platform-msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c index 2c1e2e0c1a59..0b72b134a304 100644 --- a/drivers/base/platform

[PATCH 3/7] PM: runtime: remove kernel-doc warnings

2021-03-31 Thread Pierre-Louis Bossart
remove make W=1 warnings drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn' drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn' Signed-off-by: Pierre-Louis Bossart

[PATCH 4/7] PM: wakeup: fix kernel-doc warnings and fix typos

2021-03-31 Thread Pierre-Louis Bossart
-by: Pierre-Louis Bossart --- drivers/base/power/wakeup.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 92073ac68473..f0b37c188514 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power

[PATCH 5/7] PM: clk: remove kernel-doc warning

2021-03-31 Thread Pierre-Louis Bossart
Remove make W=1 warning: drivers/base/power/clock_ops.c:148: warning: expecting prototype for pm_clk_enable(). Prototype was for __pm_clk_enable() instead Signed-off-by: Pierre-Louis Bossart --- drivers/base/power/clock_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/7] driver core: attribute_container: remove kernel-doc warnings

2021-03-31 Thread Pierre-Louis Bossart
in 'attribute_container_add_class_device_adapter' drivers/base/attribute_container.c:471: warning: Function parameter or member 'classdev' not described in 'attribute_container_add_class_device_adapter' Signed-off-by: Pierre-Louis Bossart --- drivers/base/attribute_container.c | 4 1 file changed, 4 insertions

[PATCH 1/7] driver core: remove kernel-doc warnings

2021-03-31 Thread Pierre-Louis Bossart
in '__fw_devlink_link_to_consumers' drivers/base/core.c:1844: warning: Function parameter or member 'dev' not described in '__fw_devlink_link_to_suppliers' drivers/base/core.c:1844: warning: Function parameter or member 'fwnode' not described in '__fw_devlink_link_to_suppliers' Signed-off-by: Pierre-Louis

[PATCH 0/7] drivers/base: remove kernel-doc warnings

2021-03-31 Thread Pierre-Louis Bossart
in 'attribute_container_device_trigger' drivers/base/module.c: In function ‘module_add_driver’: drivers/base/module.c:36:6: warning: variable ‘no_warn’ set but not used [-Wunused-but-set-variable] 36 | int no_warn; | ^~~ Pierre-Louis Bossart (7): driver core: remove kernel-doc warnings driver

Re: [PATCH] soundwire: qcom: wait for fifo space to be available before read/write

2021-03-31 Thread Pierre-Louis Bossart
+static int swrm_wait_for_rd_fifo_avail(struct qcom_swrm_ctrl *swrm) +{ + u32 fifo_outstanding_cmd, value; + u8 fifo_retry_count = SWR_OVERFLOW_RETRY_COUNT; + + /* Check for fifo underflow during read */ + swrm->reg_read(swrm, SWRM_CMD_FIFO_STATUS, ); +

Re: [PATCH V2] soundwire: qcom: use signed variable for error return

2021-03-31 Thread Pierre-Louis Bossart
the superfluous initialization as well drivers/soundwire/qcom.c: qcom_swrm_irq_handler() warn: impossible condition '(devnum < 0) => (0-255 < 0)' Reported-by: kernel test robot Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/qcom.c | 2 +- 1 file c

Re: [PATCH] soundwire: qcom: use signed variable for error return

2021-03-31 Thread Pierre-Louis Bossart
On 3/31/21 2:21 AM, Vinod Koul wrote: We get warning for using a unsigned variable being compared to less than zero. The comparison is correct as it checks for errors from previous call to qcom_swrm_get_alert_slave_dev_num(), so we should use a signed variable instead.

Re: [PATCH] ASoC: amd: Add support for ALC1015P codec in acp3x machine driver

2021-03-30 Thread Pierre-Louis Bossart
On 3/30/21 10:35 AM, Mark Brown wrote: On Tue, Mar 30, 2021 at 09:12:11PM +0530, Mukunda,Vijendar wrote: On 3/30/21 7:52 PM, Pierre-Louis Bossart wrote:   static const struct acpi_device_id acp3x_audio_acpi_match[] = {   { "AMDI5682", (unsigned long)_5682},   {

Re: [PATCH] ASoC: amd: Add support for ALC1015P codec in acp3x machine driver

2021-03-30 Thread Pierre-Louis Bossart
static const struct acpi_device_id acp3x_audio_acpi_match[] = { { "AMDI5682", (unsigned long)_5682}, { "AMDI1015", (unsigned long)_1015}, + { "AMDP1015", (unsigned long)_1015p}, This isn't a valid ACPI ID. AMDP does not exist in https://uefi.org/acpi_id_list There

[RFC PATCH 0/2] ASoC: remove cppchecks warnings on lm49453 and da732x

2021-03-26 Thread Pierre-Louis Bossart
There are the last two patches in the cleanups, this time I am not sure what the code does and what the proper fix might be. Feedback welcome. Pierre-Louis Bossart (2): ASoC: lm49453: fix useless assignment before return ASoC: da732x: simplify code sound/soc/codecs/da732x.c | 17

[RFC PATCH 2/2] ASoC: da732x: simplify code

2021-03-26 Thread Pierre-Louis Bossart
ro. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/da732x.c | 17 ++--- sound/soc/codecs/da732x.h | 12 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c index d43ee7159ae0..42d6a3fc3af5 100644

[RFC PATCH 1/2] ASoC: lm49453: fix useless assignment before return

2021-03-26 Thread Pierre-Louis Bossart
redundant or the 'return 0' a mistake? Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/lm49453.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c index eb3dd0bd80d9..fb0fb23537e7 100644 --- a/sound/soc/codecs/lm49453.c +++ b

[PATCH 17/17] ASoC: ux500: mop500: align function prototype

2021-03-26 Thread Pierre-Louis Bossart
) ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/ux500/mop500_ab8500.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/ux500/mop500_ab8500.h b/sound/soc/ux500/mop500_ab8500.h index 99cfd972ea7a..8138a4e9aaf5 100644 --- a/sound/soc/ux500/mop500_ab8500.h +++ b/sound/soc

[PATCH 15/17] ASoC: ti: omap-mcsp: remove duplicate test

2021-03-26 Thread Pierre-Louis Bossart
: note: Second condition if (mcbsp->irq) { ^ Keeping two separate tests was probably intentional for clarity, but since this generates warnings we might as well make cppcheck happy so that we have fewer warnings. Signed-off-by: Pierre-Louis Bossart --- sound/soc/ti/omap-mcbsp.c | 3 +-

[PATCH 16/17] ASoC: ux500: mop500: rename shadowing variable

2021-03-26 Thread Pierre-Louis Bossart
snd_soc_card mop500_card = { ^ sound/soc/ux500/mop500.c:143:23: note: Shadow variable struct snd_soc_card *mop500_card = platform_get_drvdata(pdev); ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/ux500/mop500.c | 6 +++--- 1 file changed, 3

[PATCH 13/17] ASoC: tegra: tegra20_das: align function prototypes

2021-03-26 Thread Pierre-Louis Bossart
:75:49: note: Function 'tegra20_das_connect_dac_to_dap' argument 2 names different: declaration 'dap_sel' definition 'dap'. int tegra20_das_connect_dac_to_dap(int dac, int dap) ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/tegra/tegra20_das.h

[PATCH 14/17] ASoC: ti: omap-abe-twl6040: remove useless assignment

2021-03-26 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/ti/omap-abe-twl6040.c:173:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/ti/omap-abe-twl6040.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 12/17] ASoC: tegra: tegra20_das: clarify expression

2021-03-26 Thread Pierre-Louis Bossart
66:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] !!sdata1rx << TEGRA20_DAS_DAP_CTRL_SEL_DAP_SDATA1_TX_RX_P | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/t

[PATCH 10/17] ASoC: stm: stm32_adfsdm: fix snprintf format string

2021-03-26 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/stm/stm32_adfsdm.c:120:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] snprintf(str_freq, sizeof(str_freq), "%d\n", freq); ^ Signed-off-by: Pierre-Louis Bossart --- sou

[PATCH 11/17] ASoC: sunxi: sun8i-codec: clarify expression

2021-03-26 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/sunxi/sun8i-codec.c:488:28: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] return sample_rate % 4000 ? 22579200 : 24576000; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/sunxi/sun8i-codec.c | 2 +- 1

[PATCH 07/17] ASoC: pxa: remove useless assignment

2021-03-26 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/pxa/mmp-pcm.c:207:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0, stream; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/pxa/mmp-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/17] ASoC: sti: sti_uniperif: add missing error check

2021-03-26 Thread Pierre-Louis Bossart
_of(node, priv); ^ sound/soc/sti/sti_uniperif.c:490:6: note: ret is overwritten ret = devm_snd_soc_register_component(>dev, ^ sti_uniperiph_cpu_dai_of() can return -EINVAL which seems like a good-enough reason to bail. Signed-off-by: Pierre-Louis Bossart --- sound/soc/sti/sti_unip

[PATCH 09/17] ASoC: sti: uniperif: align function prototypes

2021-03-26 Thread Pierre-Louis Bossart
names different: declaration 'uni_reader' definition 'reader'. struct uniperif *reader) ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/sti/uniperif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti

[PATCH 04/17] ASoC: bcm: cygnus_ssp: remove useless initialization

2021-03-26 Thread Pierre-Louis Bossart
is initialized int err = -EINVAL; ^ sound/soc/bcm/cygnus-ssp.c:1364:6: note: err is overwritten err = devm_snd_soc_register_component(dev, _ssp_component, ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/bcm/cygnus-ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 02/17] ASoC: atmel: fix shadowed variable

2021-03-26 Thread Pierre-Louis Bossart
[] = { ^ sound/soc/atmel/atmel-classd.c:51:14: note: Shadow variable const char *pwm_type; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/atmel/atmel-classd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc

[PATCH 00/17] ASoC: remove cppcheck warnings for multiple SOCs

2021-03-26 Thread Pierre-Louis Bossart
Trivial cleanups to make cppcheck less verbose. There should be no functionality change, except for the 'sti_uniperif' patch where an error check was added. Pierre-Louis Bossart (17): ASoC: amd: renoir: acp3x-pdm-dma: remove unnecessary assignments ASoC: atmel: fix shadowed variable ASoC

[PATCH 06/17] ASoC: meson: axg-tdmout: remove useless assignment

2021-03-26 Thread Pierre-Louis Bossart
cppcheck complains about potential null pointer dereference but it's rather an unnecessary assignment to NULL before walking through a list. Signed-off-by: Pierre-Louis Bossart --- sound/soc/meson/axg-tdmout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/meson

[PATCH 05/17] ASoC: meson: axg-tdmin: remove useless assignment

2021-03-26 Thread Pierre-Louis Bossart
cppcheck complains about potential null pointer dereference but it's rather an unnecessary assignment to NULL before walking through a list. Signed-off-by: Pierre-Louis Bossart --- sound/soc/meson/axg-tdmin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/meson

[PATCH 03/17] ASoC: atmel: atmel-i2s: remove useless initialization

2021-03-26 Thread Pierre-Louis Bossart
err is initialized int err = -ENXIO; ^ sound/soc/atmel/atmel-i2s.c:628:6: note: err is overwritten err = devm_request_irq(>dev, irq, atmel_i2s_interrupt, 0, ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/atmel/atmel-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 01/17] ASoC: amd: renoir: acp3x-pdm-dma: remove unnecessary assignments

2021-03-26 Thread Pierre-Louis Bossart
that is never used. [unreadVariable] pdm_dma_enable = 0x00; ^ indeed those values are never used because the timeout is reset. Signed-off-by: Pierre-Louis Bossart --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/amd/renoir

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

2021-03-26 Thread Pierre-Louis Bossart
On 3/24/21 10:36 AM, Greg KH wrote: On Wed, Mar 24, 2021 at 09:55:01AM -0500, Pierre-Louis Bossart wrote: Note at this point it would mean an API change and impact the existing Nvidia/Mellanox code, we are using the same sequence as them THere is no "stable api" in the

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

2021-03-24 Thread Pierre-Louis Bossart
On 3/24/21 5:50 AM, Vinod Koul wrote: On 23-03-21, 12:29, Pierre-Louis Bossart wrote: Thanks Greg and Vinod for the reviews -static int intel_master_probe(struct platform_device *pdev) +static int intel_link_probe(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id

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

2021-03-24 Thread Pierre-Louis Bossart
Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated

Re: [RFC PATCH 0/3] Separate BE DAI HW constraints from FE ones

2021-03-24 Thread Pierre-Louis Bossart
I am using hw_params_fixup, but it's not enough. The first thing I do is to not add the BE HW constraint rules in runtime->hw_constraints, because this will potentially affect the FE HW params. If the FE does sampling rate conversion, for example, applying the sampling rate constrain rules

Re: [RFC PATCH 0/3] Separate BE DAI HW constraints from FE ones

2021-03-23 Thread Pierre-Louis Bossart
On 3/23/21 6:43 AM, Codrin Ciubotariu wrote: HW constraints are needed to set limitations for HW parameters used to configure the DAIs. All DAIs on the same link must agree upon the HW parameters, so the parameters are affected by the DAIs' features and their limitations. In case of DPCM, the

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

2021-03-23 Thread Pierre-Louis Bossart
On 3/23/21 1:32 PM, Greg KH wrote: On Tue, Mar 23, 2021 at 01:04:49PM -0500, Pierre-Louis Bossart wrote: Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree

Re: [PATCH v5 1/2] platform/x86: dell-privacy: Add support for Dell hardware privacy

2021-03-23 Thread Pierre-Louis Bossart
Minor comments below. On 3/22/21 4:38 AM, Perry Yuan wrote: From: Perry Yuan add support for Dell privacy driver for the Dell units equipped hardware privacy design, which protect users privacy of audio and camera from hardware level. Once the audio or camera privacy mode activated, any

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

2021-03-23 Thread Pierre-Louis Bossart
Hi Vinod, We currently add the slave device to a linked list before device_register(), and then remove it if device_register() fails. It's not clear why this sequence was necessary, this patch moves the linked list management to after the device_register(). Maybe add a comment :-) The

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

2021-03-23 Thread Pierre-Louis Bossart
Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated

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

2021-03-23 Thread Pierre-Louis Bossart
Thanks Greg and Vinod for the reviews -static int intel_master_probe(struct platform_device *pdev) +static int intel_link_probe(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id) { - struct device *dev = >dev; + struct device *dev = >dev; + struct

Re: [PATCH v4 1/2] platform/x86: dell-privacy: Add support for Dell hardware privacy

2021-03-22 Thread Pierre-Louis Bossart
As you suggested,I should add the alignment change in another patch. But if i keep the old alignment, the code will be very odd. Seems like that I have to change the below code to new alignment in this patch. if (dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE) &&    

Re: [PATCH] ASoC: Intel: Handle device properties with software node API

2021-03-22 Thread Pierre-Louis Bossart
On 3/22/21 6:06 AM, Heikki Krogerus wrote: The function device_add_properties() is going to be removed. Replacing it with software node API equivalents. Signed-off-by: Heikki Krogerus --- Hi, This patch depends on a fix from mainline, available in v5.12-rc4: 2a92c90f2ecc

Re: [PATCH v3 4/7] ASoC: codecs: wcd938x: add basic controls

2021-03-19 Thread Pierre-Louis Bossart
+static int wcd938x_ear_pa_put_gain(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct wcd938x_sdw_priv *wcd =

Re: [PATCH v3 0/7] ASoC: codecs: add wcd938x support

2021-03-19 Thread Pierre-Louis Bossart
On 3/19/21 4:29 AM, Srinivas Kandagatla wrote: This patchset adds support for Qualcomm WCD938X codec. Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 4 x ADCs, ClassH, Ear,

Re: [PATCH v3 7/7] ASoC: codecs: wcd938x: add audio routing

2021-03-19 Thread Pierre-Louis Bossart
On 3/19/21 4:29 AM, Srinivas Kandagatla wrote: This patch adds audio routing for both playback and capture. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/wcd938x.c | 97 ++ 1 file changed, 97 insertions(+) diff --git

Re: [PATCH v3 3/7] ASoC: codecs: wcd938x: add basic driver

2021-03-19 Thread Pierre-Louis Bossart
On 3/19/21 4:29 AM, Srinivas Kandagatla wrote: This patch adds basic SoundWire codec driver to support for WCD938X TX and RX devices. It took me a while to figure out that you are adding support for a codec that has 2 Slave interfaces internally, one for TX and one for RX dais. Each of

Re: [PATCH v3 2/7] ASoC: codecs: wcd-clsh: add new version support

2021-03-19 Thread Pierre-Louis Bossart
+static void wcd_clsh_v3_set_hph_mode(struct snd_soc_component *component, + int mode) +{ + u8 val = 0; initialization not needed. + + switch (mode) { + case CLS_H_NORMAL: + val = 0x00; + break; + case

Re: [PATCH v3] ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support

2021-03-18 Thread Pierre-Louis Bossart
of adding a new driver for it. ok, that's fine. Acked-by: Pierre-Louis Bossart

Re: [PATCH v3] ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support

2021-03-17 Thread Pierre-Louis Bossart
On 3/17/21 6:08 AM, Brent Lu wrote: This patch adds jsl_rt5682_rt1015p which supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform. This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface

Re: [PATCH v3] ASoC: amd: add support for rt5682 codec in machine driver

2021-03-16 Thread Pierre-Louis Bossart
On 3/16/21 8:37 AM, Mukunda,Vijendar wrote: On 15/03/21 9:30 pm, Pierre-Louis Bossart wrote: +static int rt5682_clk_enable(struct snd_pcm_substream *substream) +{ +    int ret; +    struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + +    /* + * Set wclk to 48000

Re: [PATCH v2] ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support

2021-03-16 Thread Pierre-Louis Bossart
On 3/16/21 4:46 AM, Brent Lu wrote: This patch adds jsl_rt5682_rt1015p which supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform. This driver also applies for ALC1015Q-CG running in auto-mode. Signed-off-by: Brent Lu ---

Re: [PATCH v4 0/5] soundwire: add static port map support

2021-03-15 Thread Pierre-Louis Bossart
this patchset also adds new bindings for wsa881x smart speaker which has 4 ports which are statically mapped to the 3 output and 1 input port of the controller. Tested it on DB845c and SM8250 MTP. thanks, srini Reviewed-by: Pierre-Louis Bossart Changes since v3: - updated kernel doc

Re: [PATCH v3] ASoC: amd: add support for rt5682 codec in machine driver

2021-03-15 Thread Pierre-Louis Bossart
+static int rt5682_clk_enable(struct snd_pcm_substream *substream) +{ + int ret; + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + + /* +* Set wclk to 48000 because the rate constraint of this driver is +* 48000. ADAU7002 spec: "The

Re: [PATCH] ASoC: Intel: sof_rt5682: Add rt1015p speaker amp support

2021-03-15 Thread Pierre-Louis Bossart
I am not a big fan of the code partition you've selected. +void sof_rt1015p_set_share_en_spk(void) +{ + /* Two amps share one en pin so there is only one device in acpi +* table +*/ + rt1015p_quirk |= RT1015P_SHARE_EN_SPK; +} This is a function now used in the

[PATCH 21/23] ASoC: tas2770: remove useless initialization

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/tas2770.c:109:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tas2770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 20/23] ASoC: tas2562: remove warning on return value

2021-03-12 Thread Pierre-Louis Bossart
if (ret) ^ sound/soc/codecs/tas2562.c:530:9: note: Returning identical expression 'ret' return ret; ^ Fix with return 0 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tas2562.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tas2562.c b

[PATCH 23/23] ASoC: tscs454: remove useless test on PLL disable

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/tscs454.c:730:37: style: Same value in both branches of ternary operator. [duplicateValueTernary] val = pll1 ? FV_PLL1CLKEN_DISABLE : FV_PLL2CLKEN_DISABLE; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs

[PATCH 19/23] ASoC: tas2562: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
t's remove it. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tas2562.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c index 19965fabe949..ba23f9f07f04 100644 --- a/sound/soc/codecs/tas2562.c +++ b/sound/soc/codecs/tas2562.c

[PATCH 22/23] ASoC: tlv320dac33: clarify expression

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/tlv320dac33.c:1074:43: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] (dac33->alarm_threshold % period_size ? ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tlv320dac3

[PATCH 18/23] ASoC: sti-sas: remove unused struct members

2021-03-12 Thread Pierre-Louis Bossart
. [unusedStructMember] struct reset_control *rst; ^ sound/soc/codecs/sti-sas.c:61:25: style: struct member 'sti_spdif_audio::field' is never used. [unusedStructMember] struct regmap_field **field; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/sti

[PATCH 14/23] ASoC: mt6359: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/mt6359.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c index 6f4b1da52082..b909b36582b7 100644 --- a/sound/soc/codecs

[PATCH 13/23] ASoC: mt6358: remove useless initializations

2021-03-12 Thread Pierre-Louis Bossart
'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/mt6358.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358

[PATCH 12/23] ASoC: max98090: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/max98090.c:1835:16: style: Variable 'test_diff' is assigned a value that is never used. [unreadVariable] int test_diff = INT_MAX; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/max98090.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 15/23] ASoC: nau8825: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/nau8825.c:2113:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/nau8825.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 17/23] ASoC: sigmadsp: align function prototype

2021-03-12 Thread Pierre-Louis Bossart
); ^ sound/soc/codecs/sigmadsp.c:736:60: note: Function 'sigmadsp_setup' argument 2 names different: declaration 'rate' definition 'samplerate'. int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate) ^ Signed-off-by: Pierre-Louis

[PATCH 11/23] ASoC: hdmi-codec: remove unused spk_mask member

2021-03-12 Thread Pierre-Louis Bossart
fix cppcheck warning: sound/soc/codecs/hdmi-codec.c:25:16: style: struct member 'hdmi_codec_channel_map_table::spk_mask' is never used. [unusedStructMember] unsigned long spk_mask; /* speaker position bit mask */ ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/hdmi

[PATCH 16/23] ASoC: pcm1681: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/pcm1681.c:87:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, val = -1, enable = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/pcm1681.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 07/23] ASoC: da7219-aad: remove useless initialization

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/da7219-aad.c:118:22: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int report = 0, ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/da7219-aad.c | 2 +- 1 file changed, 1 insertion

[PATCH 10/23] ASoC: hdmi-codec: remove useless initialization

2021-03-12 Thread Pierre-Louis Bossart
uct hdmi_codec_daifmt *cf = dai->playback_dma_data; ^ sound/soc/codecs/hdmi-codec.c:745:5: note: cf is overwritten cf = dai->playback_dma_data; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/hdmi-codec.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 09/23] ASoC: hdac_hdmi: align function arguments

2021-03-12 Thread Pierre-Louis Bossart
, ^ sound/soc/codecs/hdac_hdmi.h:5:54: note: Function 'hdac_hdmi_jack_init' argument 2 names different: declaration 'pcm' definition 'device'. int hdac_hdmi_jack_init(struct snd_soc_dai *dai, int pcm, ^ Signed-off-by: Pierre-Louis

[PATCH 08/23] ASoC: hdac_hdmi: remove useless initializations

2021-03-12 Thread Pierre-Louis Bossart
Cppcheck complains a lot about possible null pointer dereferences but it's again a case of useless initializations to NULL. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/hdac_hdmi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs

[PATCH 06/23] ASoC: cx2070x: remove duplicate else branch

2021-03-12 Thread Pierre-Louis Bossart
decs/cx2072x.c:1436:10: note: Found duplicate branches for 'if' and 'else'. } else if (type & 0x4) { ^ The last two branches do the same thing and can be collapsed together. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/cx2072x.c | 8 1 file changed, 4 insertio

[PATCH 02/23] ASoC: ad1836: remove useless return

2021-03-12 Thread Pierre-Louis Bossart
if (ret) ^ sound/soc/codecs/ad1836.c:311:9: note: Returning identical expression 'ret' return ret; ^ Likely copy/paste between adc and dac cases. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/ad1836.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs

[PATCH 05/23] ASoC: cx2070x: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
.r.tx_data_one_line is overwritten reg1.r.tx_data_one_line = 1; ^ Likely copy/paste. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/cx2072x.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c index

[PATCH 03/23] ASoC: adau1977: remove useless return

2021-03-12 Thread Pierre-Louis Bossart
if (ret) ^ sound/soc/codecs/adau1977.c:242:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/adau1977.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c

[PATCH 04/23] ASoC: cros_ec_codec: remove null pointer dereference warning

2021-03-12 Thread Pierre-Louis Bossart
o fool other static analysis tools. Add a test to avoid doing the memcpy if the pointer is NULL or the size is zero. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/cros_ec_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cros_ec_codec.c b/sou

[PATCH 00/23] ASoC: codecs: remove cppcheck warnings

2021-03-12 Thread Pierre-Louis Bossart
Lots of small fixes in various codec drivers that should have no functional impact. Pierre-Louis Bossart (23): ASoC: ab8500-codec: remove useless structure ASoC: ad1836: remove useless return ASoC: adau1977: remove useless return ASoC: cros_ec_codec: remove null pointer dereference

[PATCH 01/23] ASoC: ab8500-codec: remove useless structure

2021-03-12 Thread Pierre-Louis Bossart
: style: struct member 'ab8500_codec_drvdata_dbg::vdmic' is never used. [unusedStructMember] struct regulator *vdmic; ^ The structure is never used, remove. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/ab8500-codec.c | 7 --- 1 file changed, 7 deletions

Re: [PATCH v4 0/9] soundwire: qcom: various improvements

2021-03-12 Thread Pierre-Louis Bossart
above issues. Tested it on SM8250 MTP with 2x WSA881x speakers, HeadPhones on WCD938x via lpass-rx-macro and Analog MICs via lpass-tx-macro. Also tested on DragonBoard DB845c with 2xWSA881x speakers. LGTM, for the series Reviewed-by: Pierre-Louis Bossart Changes since v3: - Fixed

Re: [PATCH v3 1/5] soundwire: add static port mapping support

2021-03-12 Thread Pierre-Louis Bossart
On 3/12/21 5:39 AM, Srinivas Kandagatla wrote: Some of the SoundWire device ports are statically mapped to Controller ports during design, however there is no way to expose this information to the controller. Controllers like Qualcomm ones use this info to setup static bandwidth parameters

[PATCH 3/4] ASoC: mediatek: mt2701: rename shadowed array

2021-03-10 Thread Pierre-Louis Bossart
mtk_base_memif_data memif_data[MT2701_MEMIF_NUM] = { ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:431:36: note: Shadow variable const struct mtk_base_memif_data *memif_data; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc

  1   2   3   4   5   6   7   8   9   10   >