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
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 h
+
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
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 alr
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 as is
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 snd_byt_cht_es8316_mc_probe(
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
static const struct acpi_device_id acp3x_audio_acpi_match[] = {
{ "AMDI5682", (unsigned long)&acp3x_5682},
{ "AMDI1015", (unsigned long)&acp3x_1015},
+ { "AMDP1015", (unsigned long)&acp3x_1015p},
This isn't a valid ACPI ID. AMDP does not exist in
...
There was a simi
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
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 the
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/ru
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 actually
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(&ldev->auxdev.dev);
Otherwise, we will meet the "kernel NULL po
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
+#define sdw_dev_dbg_or_err(dev, is_err, fmt, ...) \
+ do {\
+ if (is_err) \
+ dev_err(dev, fmt, __VA_ARGS__); \
). Prototype
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/d
drivers/base/devcoredump.c:225: warning:
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/de
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
ss function parameter
'enabled' description in 'pm_wakep_autosleep_enabled'
Signed-off-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/pow
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 a
x27;dev' not described 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/
s/base/core.c:1763: warning: Function parameter or member 'dev'
not described 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: warni
warning: Function parameter or
member 'fn' not described 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;
| ^~
+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, &value);
+ fifo_
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 +-
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.
drivers/soundwire/qcom.
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)&acp3x_5682},
static const struct acpi_device_id acp3x_audio_acpi_match[] = {
{ "AMDI5682", (unsigned long)&acp3x_5682},
{ "AMDI1015", (unsigned long)&acp3x_1015},
+ { "AMDP1015", (unsigned long)&acp3x_1015p},
This isn't a valid ACPI ID. AMDP does not exist in
https://uefi.org/acpi_
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
able and the BIT macro.
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..
assignment 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/co
definition 'rtd'.
int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
^
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
ind
: 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 +-
tic struct 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
dap_sel' definition 'dap'. [funcArgNamesDifferent]
int tegra20_das_connect_dac_to_dap(int dac, int dap)
^
sound/soc/tegra/tegra20_das.h:118:59: note: Function
'tegra20_das_connect_dac_to_dap' argument 2 names different:
declar
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 deletio
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
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-Lou
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/sun
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(-)
di
is assigned
ret = sti_uniperiph_cpu_dai_of(node, priv);
^
sound/soc/sti/sti_uniperif.c:490:6: note: ret is overwritten
ret = devm_snd_soc_register_component(&pdev->dev,
^
sti_uniperiph_cpu_dai_of() can return -EINVAL which seems like a
good-enough reason to bail.
Signed-off-by: Pierre-Louis Bos
x27;.
struct uniperif *uni_reader);
^
sound/soc/sti/uniperif_reader.c:411:24: note: Function
'uni_reader_init' argument 2 names different: declaration 'uni_reader'
definition 'reader'.
struct uniperif *reader)
^
:10: note: err is initialized
int err = -EINVAL;
^
sound/soc/bcm/cygnus-ssp.c:1364:6: note: err is overwritten
err = devm_snd_soc_register_component(dev, &cygnus_ssp_component,
^
Signed-off-by: Pierre-Louis Bossart
---
sound/soc/bcm/cygnus-ssp.c | 2 +-
1 file changed,
t pwm_type[] = {
^
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
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 varia
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/
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/
2s.c:598:10: note: err is initialized
int err = -ENXIO;
^
sound/soc/atmel/atmel-i2s.c:628:6: note: err is overwritten
err = devm_request_irq(&pdev->dev, irq, atmel_i2s_interrupt, 0,
^
Signed-off-by: Pierre-Louis Bossart
---
sound/soc/atmel/atmel-i2s.c | 2 +-
1 file ch
ssigned a value 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/
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 ker
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
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 in
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 from
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
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() and
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 applic
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 reason
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 in
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 = &pdev->dev;
+ struct device *dev = &auxdev->dev;
+
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) &&
dell_smbios_find_token(
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 ("software
+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 = snd_soc_component_get_drvdata
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, A
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 a/sound/soc/codecs/wcd938
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 th
+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 CLS_A
adding a new
driver for it.
ok, that's fine.
Acked-by: 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 support
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
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
---
sound/soc/intel/b
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 for
+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 ADAU70
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 machi
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(-)
di
will return/exit
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
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
x27;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/tas2
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/s
' is never used. [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 Boss
lue
that is never used. [unreadVariable]
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..b9
6359.c:274:19: style: Variable '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/c
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 inser
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(-)
di
sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int rate);
^
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)
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/c
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(+),
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
lized
struct 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 inser
t snd_soc_dai *dai, int device,
^
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,
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/c
lse'.
} else {
^
sound/soc/codecs/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/s
will return/exit
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(-)
c:831:26: note: reg1.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/co
ion will return/exit
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
nt, but this is likely to 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/code
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
c/codecs/ab8500-codec.c:120:20: 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
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
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 for
static const struct 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 Bos
1 - 100 of 1001 matches
Mail list logo