linux-2.6-microblaze.git
3 years agoMerge series "ASoC: topology: fix error handling flow" from Pierre-Louis Bossart...
Mark Brown [Wed, 8 Jul 2020 15:50:36 +0000 (16:50 +0100)]
Merge series "ASoC: topology: fix error handling flow" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

While experimenting and introducing errors in Baytrail topology files
until I got them right, I encountered multiple kernel oopses and
memory leaks. This is a first batch to harden the code, but we should
probably think of a tool to fuzz the topology...

Pierre-Louis Bossart (5):
  ASoC: topology: fix kernel oops on route addition error
  ASoC: topology: fix tlvs in error handling for widget_dmixer
  ASoC: topology: use break on errors, not continue
  ASoC: topology: factor kfree(se) in error handling
  ASoC: topology: add more logs when topology load fails.

 sound/soc/soc-topology.c | 97 ++++++++++++++++++++++++----------------
 1 file changed, 58 insertions(+), 39 deletions(-)

base-commit: a5911ac5790acaf98c929b826b3f7b4a438f9759
--
2.25.1

3 years agoMerge series "ASoC: qdsp6: add gapless compressed audio support" from Srinivas Kandag...
Mark Brown [Wed, 8 Jul 2020 15:50:34 +0000 (16:50 +0100)]
Merge series "ASoC: qdsp6: add gapless compressed audio support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

This patchset adds gapless compressed audio support on q6asm.
Gapless on q6asm is implemented using 2 streams in a single asm session.

First few patches are enhacements done to q6asm interface to allow
stream id per each command, gapless flags and silence meta data.
Along with this there are few trivial changes which I thought are necessary!
Last patch implements copy callback to allow finer control over buffer offsets,
specially in partial drain cases.

This patchset is tested on RB3 aka DB845c platform.

Thanks,
srini

Srinivas Kandagatla (11):
  ASoC: q6asm: add command opcode to timeout error report
  ASoC: q6asm: rename misleading session id variable
  ASoC: q6asm: make commands specific to streams
  ASoC: q6asm: use flags directly from asm-dai
  ASoC: q6asm: add length to write command token
  ASoC: q6asm: add support to remove intial and trailing silence
  ASoC: q6asm: add support to gapless flag in asm open
  ASoC: q6asm-dai: add next track metadata support
  ASoC: qdsp6: use dev_err instead of pr_err
  ASoC: qdsp6-dai: add gapless support
  ASoC: q6asm-dai: add support to copy callback

 sound/soc/qcom/qdsp6/q6asm-dai.c | 397 +++++++++++++++++++++++--------
 sound/soc/qcom/qdsp6/q6asm.c     | 173 +++++++++-----
 sound/soc/qcom/qdsp6/q6asm.h     |  48 ++--
 3 files changed, 458 insertions(+), 160 deletions(-)

--
2.21.0

3 years agoASoC: amd: fixed kernel warnings
Vijendar Mukunda [Tue, 7 Jul 2020 18:37:11 +0000 (00:07 +0530)]
ASoC: amd: fixed kernel warnings

This patch will fix unused variables kernel warnings when
CONFIG_ACPI is disabled.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/1594147044-25582-1-git-send-email-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qdsp6: use dev_err instead of pr_err
Srinivas Kandagatla [Tue, 7 Jul 2020 16:36:39 +0000 (17:36 +0100)]
ASoC: qdsp6: use dev_err instead of pr_err

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200707163641.17113-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: q6asm: add command opcode to timeout error report
Srinivas Kandagatla [Tue, 7 Jul 2020 16:36:31 +0000 (17:36 +0100)]
ASoC: q6asm: add command opcode to timeout error report

Make the error reporting more useful by adding opcode to it.
Without this its almost impossible to say which command actually
timed out.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200707163641.17113-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: topology: add more logs when topology load fails.
Pierre-Louis Bossart [Tue, 7 Jul 2020 20:37:49 +0000 (15:37 -0500)]
ASoC: topology: add more logs when topology load fails.

Add more dev_err() logs to help trace topology load failures, since we
have multiple error causes (e.g. invalid header or header that could
not be loaded).

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200707203749.113883-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: topology: factor kfree(se) in error handling
Pierre-Louis Bossart [Tue, 7 Jul 2020 20:37:48 +0000 (15:37 -0500)]
ASoC: topology: factor kfree(se) in error handling

No need to repeat the same thing multiple times when it can be done in
one location.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200707203749.113883-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: topology: use break on errors, not continue
Pierre-Louis Bossart [Tue, 7 Jul 2020 20:37:47 +0000 (15:37 -0500)]
ASoC: topology: use break on errors, not continue

Since the beginning of the topology, the code continues to the next
object even when an error is detected.

The topology should be handled with an all-or-nothing design, loading
a partially valid topology is a sure way to get bug reports that are
difficult to deal with.

Changing the behavior may break previous solutions and expose problems
in topology files delivered in the past, so it's probably not wise to
add this patch to stable branches without revalidation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200707203749.113883-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: topology: fix tlvs in error handling for widget_dmixer
Pierre-Louis Bossart [Tue, 7 Jul 2020 20:37:46 +0000 (15:37 -0500)]
ASoC: topology: fix tlvs in error handling for widget_dmixer

we need to free all allocated tlvs, not just the one allocated in
the loop before releasing kcontrols - other the tlvs references will
leak.

Fixes: 9f90af3a995298 ('ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200707203749.113883-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: topology: fix kernel oops on route addition error
Pierre-Louis Bossart [Tue, 7 Jul 2020 20:37:45 +0000 (15:37 -0500)]
ASoC: topology: fix kernel oops on route addition error

When errors happens while loading graph components, the kernel oopses
while trying to remove all topology components. This can be
root-caused to a list pointing to memory that was already freed on
error.

remove_route() is already called on errors and will perform the
required cleanups so there's no need to free the route memory in
soc_tplg_dapm_graph_elems_load() if the route was added to the
list. We do however want to free the routes allocated but not added to
the list.

Fixes: 7df04ea7a31ea ('ASoC: topology: modify dapm route loading routine and add dapm route unloading')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200707203749.113883-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: mpc8610_hpcd: Add missing of_node_put()
Liao Pingfang [Tue, 7 Jul 2020 11:47:47 +0000 (19:47 +0800)]
ASoC: fsl: mpc8610_hpcd: Add missing of_node_put()

After finishing using device node got from of_find_compatible_node(),
of_node_put() needs to be called.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Link: https://lore.kernel.org/r/1594122467-11615-1-git-send-email-wang.yi59@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: amd: remove warnings with make W=1" from Pierre-Louis Bossart...
Mark Brown [Tue, 7 Jul 2020 12:03:23 +0000 (13:03 +0100)]
Merge series "ASoC: amd: remove warnings with make W=1" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Yet another cleanup series, with good findings of variables not used
for anything.

Pierre-Louis Bossart (6):
  ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning
  ASoC: amd: acp-rt5645: fix 'defined but not used' warning
  ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning
  ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning
  ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable
  ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable

 sound/soc/amd/acp-da7219-max98357a.c | 2 ++
 sound/soc/amd/acp-rt5645.c           | 2 ++
 sound/soc/amd/raven/acp3x-i2s.c      | 4 ----
 sound/soc/amd/raven/acp3x-pcm-dma.c  | 4 ----
 4 files changed, 4 insertions(+), 8 deletions(-)

--
2.25.1

3 years agoASoC: da7213: add default clock handling
Sebastian Reichel [Fri, 26 Jun 2020 16:46:23 +0000 (18:46 +0200)]
ASoC: da7213: add default clock handling

This adds default clock/PLL configuration to the driver
for usage with generic drivers like simple-card for usage
with a fixed rate clock.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/20200626164623.87894-1-sebastian.reichel@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: add ACPI dependency check
Vijendar Mukunda [Tue, 7 Jul 2020 10:46:41 +0000 (16:16 +0530)]
ASoC: amd: add ACPI dependency check

Add ACPI dependency for evaluating DMIC hardware
runtime.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/1594118813-18689-1-git-send-email-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: raven: acp3x-i2s: remove unused-but-set variable
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:44:33 +0000 (11:44 -0500)]
ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable

Fix W=1 warning. The variable prtd is set but not used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702164433.162815-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:44:32 +0000 (11:44 -0500)]
ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable

Fix W=1 warning. The variable prtd is not used, remove.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702164433.162815-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:44:31 +0000 (11:44 -0500)]
ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning

Fix W=1 warning. the card variable is useless here

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702164433.162815-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:44:30 +0000 (11:44 -0500)]
ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning

Fix W=1 warning. the card variable is useless here.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702164433.162815-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: acp-rt5645: fix 'defined but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:44:29 +0000 (11:44 -0500)]
ASoC: amd: acp-rt5645: fix 'defined but not used' warning

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702164433.162815-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:44:28 +0000 (11:44 -0500)]
ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702164433.162815-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMAINTAINERS: Add Shengjiu to reviewer list of sound/soc/fsl
Nicolin Chen [Tue, 7 Jul 2020 04:58:29 +0000 (21:58 -0700)]
MAINTAINERS: Add Shengjiu to reviewer list of sound/soc/fsl

Add Shengjiu who's actively working on the latest fsl/nxp audio drivers.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20200707045829.10002-1-nicoleotsuka@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: core: Remove only the registered component in devm functions
Maxime Ripard [Tue, 7 Jul 2020 07:42:37 +0000 (09:42 +0200)]
ASoC: core: Remove only the registered component in devm functions

The ASoC devm_ functions that register a component
(devm_snd_soc_register_component and devm_snd_dmaengine_pcm_register) will
clean their component by running snd_soc_unregister_component.

snd_soc_unregister_component will then remove all the components for the
device that was used to register the component in the first place.

However, some drivers register several components (such as a DAI and a
dmaengine PCM) on the same device, and if the dmaengine PCM is registered
first, then the DAI will be cleaned up first and
snd_dmaengine_pcm_unregister will be called next.

snd_dmaengine_pcm_unregister will then lookup the dmaengine PCM component
on the device, and if there's one unregister that component and release its
dmaengine channels. That doesn't happen in practice though since the first
call to snd_soc_unregister_component removed all the components, so we
never get the chance to release the dmaengine channels.

In order to fix this, instead of removing all the components for a given
device, we can simply remove the component that was registered in the first
place. We should have the same number of component registration than we
have components, so it should work just fine.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20200707074237.287171-1-maxime@cerno.tech
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wm8400: remove unused variables
Pierre-Louis Bossart [Thu, 2 Jul 2020 16:36:33 +0000 (11:36 -0500)]
ASoC: codecs: wm8400: remove unused variables

Fix W=1 warning by removing unused variables

Suggested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702163633.162508-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: fsl: fix kernel-doc" from Pierre-Louis Bossart <pierre-louis...
Mark Brown [Fri, 3 Jul 2020 16:33:50 +0000 (17:33 +0100)]
Merge series "ASoC: fsl: fix kernel-doc" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This cleanup patchset is only about kernel-doc, mostly trivial edits
and format correction.

v2: added Nicolin Chen's Acked-by tags and included the three
suggested edits.

Pierre-Louis Bossart (6):
  ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start
  ASoC: fsl: fsl_ssi: fix kernel-doc
  ASoC: fsl: fsl-asoc-card: fix kernel-doc
  ASoC: fsl: fsl_spdif: fix kernel-doc
  ASoC: fsl: fsl_asrc: fix kernel-doc
  ASoC: fsl: fsl_esai: fix kernel-doc

 sound/soc/fsl/fsl-asoc-card.c | 21 +++++------
 sound/soc/fsl/fsl_asrc.c      | 57 +++++++++++++++++++---------
 sound/soc/fsl/fsl_esai.c      | 32 +++++++++-------
 sound/soc/fsl/fsl_spdif.c     |  5 ++-
 sound/soc/fsl/fsl_ssi.c       | 70 ++++++++++++++++++++++-------------
 sound/soc/fsl/fsl_ssi_dbg.c   |  4 +-
 6 files changed, 115 insertions(+), 74 deletions(-)

--
2.25.1

3 years agoMerge series "ASoC: rt5670: 2 small cleanups" from Hans de Goede <hdegoede@redhat...
Mark Brown [Fri, 3 Jul 2020 16:33:49 +0000 (17:33 +0100)]
Merge series "ASoC: rt5670: 2 small cleanups" from Hans de Goede <hdegoede@redhat.com>:

Hi All,

Here is in essence a resend of my 2 cleanup patches for the rt5670 ASoC
codec code, rebased on top of broonie/sound/for-5.9 with
broonie/sound/for-5.8 merged in.

Regards,

Hans

p.s.

I'll also send out the patch improving the comment in
cht_bsw_rt5672.c cht_codec_fixup() which Pierre-Louis requested soon.

3 years agoASoC: fsl: fsl_asrc: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:40 +0000 (14:21 -0500)]
ASoC: fsl: fsl_asrc: fix kernel-doc

Fix W=1 warnings. fix kernel doc and describe arguments.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl_ssi: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:37 +0000 (14:21 -0500)]
ASoC: fsl: fsl_ssi: fix kernel-doc

Fix W=1 warnings. The kernel-doc support is partial, add more
descriptions and follow proper syntax

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-ac97: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 17:28:00 +0000 (12:28 -0500)]
ASoC: soc-ac97: fix kernel-doc

Fix W=1 warning. Add missing arguments

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702172800.164986-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: add logic to check dmic hardware runtime
Vijendar Mukunda [Thu, 2 Jul 2020 17:26:52 +0000 (22:56 +0530)]
ASoC: amd: add logic to check dmic hardware runtime

Add logic to check DMIC hardware exists or not on
the platform at runtime.

Add module param for overriding DMIC hardware check
at runtime.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/1593710826-1106-1-git-send-email-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ti: j721e-evm: Fix missing unlock on error in j721e_audio_hw_params()
Wei Yongjun [Fri, 3 Jul 2020 03:09:10 +0000 (03:09 +0000)]
ASoC: ti: j721e-evm: Fix missing unlock on error in j721e_audio_hw_params()

Add the missing unlock before return from function j721e_audio_hw_params()
in the error handling case.

Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200703030910.75047-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl_esai: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:41 +0000 (14:21 -0500)]
ASoC: fsl: fsl_esai: fix kernel-doc

Fix W=1 warnings. Fix kernel-doc syntax and add missing parameters.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl_asrc: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:40 +0000 (14:21 -0500)]
ASoC: fsl: fsl_asrc: fix kernel-doc

Fix W=1 warnings. fix kernel doc and describe arguments.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl_spdif: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:39 +0000 (14:21 -0500)]
ASoC: fsl: fsl_spdif: fix kernel-doc

Fix W=1 warnings. kernel-doc syntax was not followed and missing parameter

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl-asoc-card: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:38 +0000 (14:21 -0500)]
ASoC: fsl: fsl-asoc-card: fix kernel-doc

Fix W=1 warnings. Kernel-doc syntax was not properly used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl_ssi: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:37 +0000 (14:21 -0500)]
ASoC: fsl: fsl_ssi: fix kernel-doc

Fix W=1 warnings. The kernel-doc support is partial, add more
descriptions and follow proper syntax

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:21:36 +0000 (14:21 -0500)]
ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start

Fix W=1 warnings. There is no kernel-doc here.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200702192141.168018-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5670: Rename dev_gpio to gpio1_is_irq
Hans de Goede [Fri, 3 Jul 2020 10:08:23 +0000 (12:08 +0200)]
ASoC: rt5670: Rename dev_gpio to gpio1_is_irq

Rename the not really descriptive dev_gpio quirk / setting to
gpio1_is_irq, which describes what it actually does.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200703100823.258033-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5670: Remove struct rt5670_platform_data
Hans de Goede [Fri, 3 Jul 2020 10:08:22 +0000 (12:08 +0200)]
ASoC: rt5670: Remove struct rt5670_platform_data

platform_data is an obsolete concept, instead device_properties,
set through e.g. device-tree, should be used.

struct rt5670_platform_data is only used internally by the rt5670 codec
driver, so lets remove it before someone starts relying on it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200703100823.258033-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMAINTAINERS: Change Maintainer for some at91 drivers
Nicolas Ferre [Thu, 2 Jul 2020 13:42:24 +0000 (15:42 +0200)]
MAINTAINERS: Change Maintainer for some at91 drivers

I hand over the maintenance of these drivers to my colleagues. Claudiu,
Codrin and Tudor already have experience with these controllers and
sub-systems.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20200702134224.3750-1-nicolas.ferre@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier
Colin Ian King [Thu, 2 Jul 2020 11:48:35 +0000 (12:48 +0100)]
ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier

Currently if the ctx->spkamp is not recognized an error message is
reported but the code continues to set up the device with uninitialized
variables such as the number of widgets.  Fix this by returning -EINVAL
for unrecognized speaker amplifier types.

Fixes: e1435a1feb18 ("ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Addresses-Coverity: ("Uninitialized scalar variable")
Link: https://lore.kernel.org/r/20200702114835.37889-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: codecs: wm/cs: fix kernel-doc and W=1 warnings" from Pierre-Louis...
Mark Brown [Thu, 2 Jul 2020 13:55:34 +0000 (14:55 +0100)]
Merge series "ASoC: codecs: wm/cs: fix kernel-doc and W=1 warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

I've been doing a lot of cleanups to get to zero warnings with W=1,
here's the first batch for Cirrus/Wolfson codecs.

Pierre-Louis Bossart (7):
  ASoC: codecs: cs4270: fix kernel-doc
  ASoC: codecs: cs42l42: remove always-true comparisons
  ASoC: codecs: wm8986: fix missing kernel-doc arguments
  ASoC: codecs: wm8960: fix kernel-doc
  ASoC: codecs: wm9713: remove spurious kernel-doc comment start
  ASoC: codecs: wm8994: fix kernel-doc
  ASoC: codecs: wm8400: add _maybe_unused as needed

 sound/soc/codecs/cs4270.c  | 4 ++--
 sound/soc/codecs/cs42l42.c | 9 +++------
 sound/soc/codecs/wm8400.c  | 6 +++---
 sound/soc/codecs/wm8960.c  | 2 +-
 sound/soc/codecs/wm8994.c  | 4 ++++
 sound/soc/codecs/wm8996.c  | 3 +++
 sound/soc/codecs/wm9713.c  | 2 +-
 7 files changed, 17 insertions(+), 13 deletions(-)

base-commit: a2b782d59c57cb6f673dbb4804ffc500336d7a54
--
2.25.1

3 years agoASoC: codecs: wm8994: fix kernel-doc
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:13:19 +0000 (13:13 -0500)]
ASoC: codecs: wm8994: fix kernel-doc

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200701181320.80848-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wm9713: remove spurious kernel-doc comment start
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:13:18 +0000 (13:13 -0500)]
ASoC: codecs: wm9713: remove spurious kernel-doc comment start

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200701181320.80848-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wm8960: fix kernel-doc
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:13:17 +0000 (13:13 -0500)]
ASoC: codecs: wm8960: fix kernel-doc

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200701181320.80848-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: wm8986: fix missing kernel-doc arguments
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:13:16 +0000 (13:13 -0500)]
ASoC: codecs: wm8986: fix missing kernel-doc arguments

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200701181320.80848-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: cs42l42: remove always-true comparisons
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:13:15 +0000 (13:13 -0500)]
ASoC: codecs: cs42l42: remove always-true comparisons

Fix W=1 warnings:

cs42l42.c: In function 'cs42l42_handle_device_data':
cs42l42.c:1661:12: warning: comparison of unsigned expression >= 0 is
always true [-Wtype-limits]
 1661 |   if ((val >= CS42L42_BTN_DET_INIT_DBNCE_MIN) &&
      |            ^~
cs42l42.c:1679:12: warning: comparison of unsigned expression >= 0 is
always true [-Wtype-limits]
 1679 |   if ((val >= CS42L42_BTN_DET_EVENT_DBNCE_MIN) &&
      |            ^~
cs42l42.c:1698:23: warning: comparison of unsigned expression >= 0 is
always true [-Wtype-limits]
 1698 |    if ((thresholds[i] >= CS42L42_HS_DET_LEVEL_MIN) &&
      |                       ^~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200701181320.80848-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: codecs: cs4270: fix kernel-doc
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:13:14 +0000 (13:13 -0500)]
ASoC: codecs: cs4270: fix kernel-doc

Fix W=1 warnings

cs4270.c:508: warning: Function parameter or member 'component' not
described in 'cs4270_probe'
cs4270.c:508: warning: Excess function parameter 'pdev' description in
'cs4270_probe'
cs4270.c:548: warning: Function parameter or member 'component' not
described in 'cs4270_remove'
cs4270.c:548: warning: Excess function parameter 'pdev' description in
'cs4270_remove'

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200701181320.80848-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings
Fabio Estevam [Tue, 30 Jun 2020 22:30:20 +0000 (19:30 -0300)]
ASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings

The following build warnings are seen with 'make dt_binding_check':

Documentation/devicetree/bindings/sound/simple-card.example.dts:209.46-211.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:213.37-215.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:250.42-261.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:263.42-288.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:270.32-272.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:273.23-275.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@1: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:276.23-278.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@2: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:279.23-281.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@3: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:290.42-303.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@2: node has a unit name, but no reg or ranges property

Fix them all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20200630223020.25546-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: Intel: atom: fix kernel-doc and W=1 warnings" from Pierre-Louis...
Mark Brown [Wed, 1 Jul 2020 20:14:24 +0000 (21:14 +0100)]
Merge series "ASoC: Intel: atom: fix kernel-doc and W=1 warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Yet another series to fix broken kernel-doc and mark unused variables
as such.

Pierre-Louis Bossart (2):
  ASoC: Intel: atom: fix kernel-doc
  ASoC: Intel: atom: fix 'defined but not used' warning

 sound/soc/intel/atom/sst-atom-controls.c | 65 ++++++++++++++++--------
 sound/soc/intel/atom/sst/sst_loader.c    |  4 ++
 sound/soc/intel/atom/sst/sst_stream.c    | 43 +++++++++-------
 3 files changed, 74 insertions(+), 38 deletions(-)

base-commit: a2b782d59c57cb6f673dbb4804ffc500336d7a54
--
2.25.1

3 years agoASoC: SOF: sof-acpi-dev: fix 'defined but unused' warning
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:39:13 +0000 (13:39 -0500)]
ASoC: SOF: sof-acpi-dev: fix 'defined but unused' warning

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200701183913.83455-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: atom: fix 'defined but not used' warning
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:37:16 +0000 (13:37 -0500)]
ASoC: Intel: atom: fix 'defined but not used' warning

Fix W=1 warning. The VOIP controls were not used in the mainline but
in special versions of Android. Keep and use __maybe_used to make
warning go away.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200701183716.83314-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: atom: fix kernel-doc
Pierre-Louis Bossart [Wed, 1 Jul 2020 18:37:15 +0000 (13:37 -0500)]
ASoC: Intel: atom: fix kernel-doc

Fix W=1 warnings. The kernel-doc format was probably never supported,
fix information as needed.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200701183716.83314-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp
Brent Lu [Wed, 1 Jul 2020 09:36:51 +0000 (17:36 +0800)]
ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp

Support MAX98390 speaker amplifier on cometlake platform. Driver now
detects amplifier type in the probe function and installs corresponding
controls and DAPM widgets/routes in the late_probe function.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/1593596211-28344-1-git-send-email-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: ti: Add support for audio on J721e EVM" from Peter Ujfalusi ...
Mark Brown [Wed, 1 Jul 2020 16:21:09 +0000 (17:21 +0100)]
Merge series "ASoC: ti: Add support for audio on J721e EVM" from Peter Ujfalusi <peter.ujfalusi@ti.com>:

Hi,

Changes since v3:
- Fix the single clock source handling and typo

Changes since v2:
- DT binding:
 - use proper (?) patch subject for the binding docuemtn patch
 - drop pll4 and pll15 from DT - driver should check the rate via
   clk_get_parent. If it is not available (as it is not currently) then use the
   match_data provided rates.
 - add simple explanation for the clocking setup
 - Use descriptive names for clocks: cpb/ivi-mcasp-auxclk and cpb/ivi-codec-scki
 - dt_binding_check shows no errors/warnings
- ASoC machine driver:
 - Try to read the PLL4/15 rate with clk API (parent of the two clock divider)
   if it is not available then use the match_data provided numbers.
 - Support for single PLL setup

Changes since v1:
- Fixed DT binding documentation errors
- Rebased on ASoC head and updated the driver to compile and work

This series adds support for the analog audio setup on the j721e EVM.
The audio setup of the EVM is:
Common Processor Board (CPB): McASP10 <-> pcm3168a
Infotainment Expansion Board (IVI): McASP0 <-> 2x pcm3168a

Both CPB and IVI wired in parallel serializer setup.

The first patch adds the stream_name for McASP driver as it is needed in
multicodec (and would be needed in DPCM) setup for proper DAPM handling.

The second patch adds two DT schema, one for the cpb and one for the cpb+ivi
card.

Regards,
Peter
---
Peter Ujfalusi (3):
  ASoC: ti: davinci-mcasp: Specify stream_name for playback/capture
  ASoC: dt-bindings: Add documentation for TI j721e EVM (CPB and IVI)
  ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)

 .../bindings/sound/ti,j721e-cpb-audio.yaml    |  95 ++
 .../sound/ti,j721e-cpb-ivi-audio.yaml         | 150 +++
 sound/soc/ti/Kconfig                          |   8 +
 sound/soc/ti/Makefile                         |   2 +
 sound/soc/ti/davinci-mcasp.c                  |   3 +
 sound/soc/ti/j721e-evm.c                      | 896 ++++++++++++++++++
 6 files changed, 1154 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/ti,j721e-cpb-audio.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/ti,j721e-cpb-ivi-audio.yaml
 create mode 100644 sound/soc/ti/j721e-evm.c

--
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

3 years agoARM: dts: motorola-mapphone-common: remove unneeded "simple-graph-card"
Kuninori Morimoto [Fri, 19 Jun 2020 05:33:36 +0000 (14:33 +0900)]
ARM: dts: motorola-mapphone-common: remove unneeded "simple-graph-card"

Audio Graph Card is using "audio-graph-card" prefix instead of
"simple-graph-card", and moreover "widgets / routing" doesn't need it.
This patch removes unsupported "simple-graph-card" prefix from
motorola-mapphone-common.dtsi and vendor-prefixes.yaml.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/87r1ub39hq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_asrc: Add an option to select internal ratio mode
Shengjiu Wang [Tue, 30 Jun 2020 13:56:07 +0000 (21:56 +0800)]
ASoC: fsl_asrc: Add an option to select internal ratio mode

The ASRC not only supports ideal ratio mode, but also supports
internal ratio mode.

For internal rato mode, the rate of clock source should be divided
with no remainder by sample rate, otherwise there is sound
distortion.

Add function fsl_asrc_select_clk() to find proper clock source for
internal ratio mode, if the clock source is available then internal
ratio mode will be selected.

With change, the ideal ratio mode is not the only option for user.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1593525367-23221-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: Enable interrupt in dma_open
Akshu Agrawal [Tue, 30 Jun 2020 18:37:46 +0000 (00:07 +0530)]
ASoC: amd: Enable interrupt in dma_open

Fixes interrupt enable condition check with which now
interrupt gets enabled in dma_open.
Prior to this patch it was getting enabled in runtime_resume only.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200630183754.20641-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings
Fabio Estevam [Tue, 30 Jun 2020 22:30:20 +0000 (19:30 -0300)]
ASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings

The following build warnings are seen with 'make dt_binding_check':

Documentation/devicetree/bindings/sound/simple-card.example.dts:209.46-211.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:213.37-215.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:250.42-261.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:263.42-288.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:270.32-272.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@0: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:273.23-275.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@1: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:276.23-278.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@2: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:279.23-281.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@3: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/sound/simple-card.example.dts:290.42-303.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@2: node has a unit name, but no reg or ranges property

Fix them all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20200630223020.25546-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: KeemBay: Fix header guard
Nathan Chancellor [Wed, 17 Jun 2020 01:02:32 +0000 (18:02 -0700)]
ASoC: Intel: KeemBay: Fix header guard

Clang warns:

 In file included from sound/soc/intel/keembay/kmb_platform.c:14:
 sound/soc/intel/keembay/kmb_platform.h:9:9: warning: 'KMB_PLATFORM_H_'
 is used as a header guard here, followed by #define of a different
 macro [-Wheader-guard]
 #ifndef KMB_PLATFORM_H_
         ^~~~~~~~~~~~~~~
 sound/soc/intel/keembay/kmb_platform.h:10:9: note: 'KMB_PLATFORMP_H_'
 is defined here; did you mean 'KMB_PLATFORM_H_'?
 #define KMB_PLATFORMP_H_
         ^~~~~~~~~~~~~~~~
         KMB_PLATFORM_H_
 1 warning generated.

Fix the typo so that the header guard works as intended.

Fixes: c5477e966728 ("ASoC: Intel: Add KeemBay platform driver")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Sia, Jee Heng <jee.heng.sia@intel.com>; alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; clang-built-linux@googlegroups.com; Nathan Chancellor <natechancellor@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1053
To: Rojewski, Cezary <cezary.rojewski@intel.com>; Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>; Liam Girdwood <liam.r.girdwood@linux.intel.com>; Jie Yang <yang.jie@linux.intel.com>; Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200617010232.23222-1-natechancellor@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: keembay-i2s: Fix reg descriptions
Fabio Estevam [Tue, 30 Jun 2020 22:44:59 +0000 (19:44 -0300)]
ASoC: dt-bindings: keembay-i2s: Fix reg descriptions

intel,keembay-i2s has two register regions:
- I2S registers
- I2S gen configuration

Describe these regions accordingly to fix the following warning seen
with 'make dt_binding_check':

Documentation/devicetree/bindings/sound/intel,keembay-i2s.example.dt.yaml: example-0: i2s@20140000:reg:0: [538181632, 512, 539623588, 4] is too long

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20200630224459.27174-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_sai: Refine regcache usage with pm runtime
Shengjiu Wang [Mon, 29 Jun 2020 06:42:33 +0000 (14:42 +0800)]
ASoC: fsl_sai: Refine regcache usage with pm runtime

When there is dedicated power domain bound with device, after probing
the power will be disabled, then registers are not accessible in
fsl_sai_dai_probe(), so regcache only need to be enabled in end of
probe() and regcache_mark_dirty should be moved to pm runtime resume
callback function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1593412953-10897-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)
Peter Ujfalusi [Tue, 30 Jun 2020 12:58:43 +0000 (15:58 +0300)]
ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)

The audio support on the board is using pcm3168a codec connected to McASP10
serializers in parallel setup.
The pcm3168a SCKI clock is coming via the j721e AUDIO_REFCLK2 pin.
In order to support 48KHz and 44.1KHz family of sampling rates the parent clock
for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and PLL15 (for
44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via different
HSDIVIDER.

Generic card can not be used for the board as we need to switch between
clock paths for different sampling rate families and also need to change
the slot_width between 16 and 24 bit audio.

The audio support on the Infotainment Expansion Board consists of McASP0
connected to two pcm3168a codecs with dedicated set of serializers to each.
The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin.
It is extending the audio support on the CPB.

Due to the fact that the same PLL4/15 is used by both domains (CPB/IVI)
there are cross restriction on sampling rates.

The IVI side is represented as multicodec setup.

PCMs available on a plain CPB (no IVI addon):
hw:0,0 - cpb playback (8 channels)
hw:0,1 - cpb capture (6 channels)

When the IVI addon is present, additional two PCMs will be present:
hw:0,2 - ivi multicodec playback (16 channels)
hw:0,3 - ivi multicodec capture (12 channels)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200630125843.11561-4-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: Add documentation for TI j721e EVM (CPB and IVI)
Peter Ujfalusi [Tue, 30 Jun 2020 12:58:42 +0000 (15:58 +0300)]
ASoC: dt-bindings: Add documentation for TI j721e EVM (CPB and IVI)

The audio support on the Common Processor Board board is using
pcm3168a codec connected to McASP10 serializers in parallel setup.

The Infotainment board plugs into the Common Processor Board, the support
of the extension board is extending the CPB audio support by adding
the two codecs on the expansion board.

The audio support on the Infotainment Expansion Board consists of McASP0
connected to two pcm3168a codecs with dedicated set of serializers to each.
The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200630125843.11561-3-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ti: davinci-mcasp: Specify stream_name for playback/capture
Peter Ujfalusi [Tue, 30 Jun 2020 12:58:41 +0000 (15:58 +0300)]
ASoC: ti: davinci-mcasp: Specify stream_name for playback/capture

In order to dai stream widgets to be created the stream_name must be set.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200630125843.11561-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rockchip: add format and rate constraints on rk3399
Yu-Hsuan Hsu [Tue, 30 Jun 2020 09:16:15 +0000 (17:16 +0800)]
ASoC: rockchip: add format and rate constraints on rk3399

S8 and S24 formats does not work on this machine driver so force to use
S16_LE instead.

In addition, add constraint to limit the max value of rate because the
rate higher than 96000(172000, 192000) is not stable either.

Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Link: https://lore.kernel.org/r/20200630091615.4020059-1-yuhsuan@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: amd: Rectifying Unbalanced pm_runtime_enable! issue
Ravulapati Vishnu vardhan rao [Tue, 30 Jun 2020 09:22:38 +0000 (14:52 +0530)]
ASoC: amd: Rectifying Unbalanced pm_runtime_enable! issue

When snd_pci_acp3x driver loads we see:

WARNING kernel:snd_pci_acp3x 0000:04:00.5: Unbalanced pm_runtime_enable!
at boot time.
same can be observed in /var/log/messages/.

Modifying pm runtime sequence for fixing unbalanced pm issue.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200630092242.7799-1-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode
Oder Chiou [Wed, 1 Jul 2020 07:16:45 +0000 (15:16 +0800)]
ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode

Base on https://patchwork.kernel.org/patch/11237953/
Soundwire mode also should follow it.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20200701071645.32061-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge branch 'for-5.8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Mon, 29 Jun 2020 19:47:01 +0000 (20:47 +0100)]
Merge branch 'for-5.8' of https://git./linux/kernel/git/broonie/sound into asoc-5.9

3 years agoASoC: rt5670: Fix dac- and adc- vol-tlv values being off by a factor of 10
Hans de Goede [Sun, 28 Jun 2020 15:52:29 +0000 (17:52 +0200)]
ASoC: rt5670: Fix dac- and adc- vol-tlv values being off by a factor of 10

The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB,
not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace
apps which translate the dB scale to a linear scale. With the logarithmic
dB scale being of by a factor of 10 we loose all precision in the lower
area of the range when apps translate things to a linear scale.

E.g. the 0 dB default, which corresponds with a value of 47 of the
0 - 127 range for the control, would be shown as 0/100 in alsa-mixer.

Since the centi-dB values used in the TLV struct cannot represent the
0.375 dB step size used by these controls, change the TLV definition
for them to specify a min and max value instead of min + stepsize.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200628155231.71089-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo Miix...
Hans de Goede [Sun, 28 Jun 2020 15:52:28 +0000 (17:52 +0200)]
ASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo Miix 2 10

The Lenovo Miix 2 10 has a keyboard dock with extra speakers in the dock.
Rather then the ACL5672's GPIO1 pin being used as IRQ to the CPU, it is
actually used to enable the amplifier for these speakers
(the IRQ to the CPU comes directly from the jack-detect switch).

Add a quirk for having an ext speaker-amplifier enable pin on GPIO1
and replace the Lenovo Miix 2 10's dmi_system_id table entry's wrong
GPIO_DEV quirk (which needs to be renamed to GPIO1_IS_IRQ) with the
new RT5670_GPIO1_IS_EXT_SPK_EN quirk, so that we enable the external
speaker-amplifier as necessary.

Also update the ident field for the dmi_system_id table entry, the
Miix models are not Thinkpads.

Fixes: 67e03ff3f32f ("ASoC: codecs: rt5670: add Thinkpad Tablet 10 quirk")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723
Link: https://lore.kernel.org/r/20200628155231.71089-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt5670: Correct RT5670_LDO_SEL_MASK
Hans de Goede [Sun, 28 Jun 2020 15:52:27 +0000 (17:52 +0200)]
ASoC: rt5670: Correct RT5670_LDO_SEL_MASK

The RT5670_PWR_ANLG1 register has 3 bits to select the LDO voltage,
so the correct mask is 0x7 not 0x3.

Because of this wrong mask we were programming the ldo bits
to a setting of binary 001 (0x05 & 0x03) instead of binary 101
when moving to SND_SOC_BIAS_PREPARE.

According to the datasheet 001 is a reserved value, so no idea
what it did, since the driver was working fine before I guess we
got lucky and it does something which is ok.

Fixes: 5e8351de740d ("ASoC: add RT5670 CODEC driver")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200628155231.71089-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: cht_bsw_rt5672: Change bus format to I2S 2 channel
Hans de Goede [Sun, 28 Jun 2020 15:52:26 +0000 (17:52 +0200)]
ASoC: Intel: cht_bsw_rt5672: Change bus format to I2S 2 channel

The default mode for SSP configuration is TDM 4 slot and so far we were
using this for the bus format on cht-bsw-rt56732 boards.

One board, the Lenovo Miix 2 10 uses not 1 but 2 codecs connected to SSP2.
The second piggy-backed, output-only codec is inside the keyboard-dock
(which has extra speakers). Unlike the main rt5672 codec, we cannot
configure this codec, it is hard coded to use 2 channel 24 bit I2S.

Using 4 channel TDM leads to the dock speakers codec (which listens in on
the data send from the SSP to the rt5672 codec) emiting horribly distorted
sound.

Since we only support 2 channels anyways, there is no need for TDM on any
cht-bsw-rt5672 designs. So we can simply use I2S 2ch everywhere.

This commit fixes the Lenovo Miix 2 10 dock speakers issue by changing
the bus format set in cht_codec_fixup() to I2S 2 channel.

This change has been tested on the following devices with a rt5672 codec:

Lenovo Miix 2 10
Lenovo Thinkpad 8
Lenovo Thinkpad 10 (gen 1)

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723
Link: https://lore.kernel.org/r/20200628155231.71089-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2562: Add voltage sense slot property
Dan Murphy [Fri, 26 Jun 2020 15:41:41 +0000 (10:41 -0500)]
ASoC: tas2562: Add voltage sense slot property

Add a property to configure the slot for the voltage sense monitoring of
the device. Vsense data will be sent to the processor via the slot
defined by the property

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200626154143.20351-2-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2562: Add voltage sense slot configuration
Dan Murphy [Fri, 26 Jun 2020 15:41:42 +0000 (10:41 -0500)]
ASoC: tas2562: Add voltage sense slot configuration

Add Vsense slot configuration based on the device tree.  Adding this
property enables the slot programming to be moved to the tdm_set_slot
callback.  This in affect sets the slots for the Isense and Vsense and
enabling this these modes are now based on whether these features were
powered on or not.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200626154143.20351-3-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas2562: Add right and left channel slot programming
Dan Murphy [Fri, 26 Jun 2020 15:41:40 +0000 (10:41 -0500)]
ASoC: tas2562: Add right and left channel slot programming

Add programming for the tdm slots for the right and left. This also
requires configuring the RX/TX offsets for the DAI format type.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200626154143.20351-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Documentation: fix reference to renamed source file
Randy Dunlap [Mon, 29 Jun 2020 03:23:33 +0000 (20:23 -0700)]
ASoC: Documentation: fix reference to renamed source file

sound/soc/soc-io.c was merged into sound/soc/soc-component.c, so fixup
the Documentation to use the updated file name.

Error: Cannot open file ../sound/soc/soc-io.c
WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno ../sound/soc/soc-io.c' failed with return code 1

Fixes: 460b42d162e3 ("ASoC: soc-component: merge soc-io.c into soc-component.c")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/a9f59f30-8cf2-ea82-567c-1706fd64fe62@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoasoc: Update supported rate and format for dummy dai
Rohit kumar [Sat, 27 Jun 2020 13:37:10 +0000 (19:07 +0530)]
asoc: Update supported rate and format for dummy dai

Add support for 384KHz sample rate and S24_3LE
bitwidth for dummy dai.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Link: https://lore.kernel.org/r/1593265030-1451-1-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Drop HAS_DMA dependency to fix link failure
Geert Uytterhoeven [Mon, 29 Jun 2020 12:24:43 +0000 (14:24 +0200)]
ASoC: qcom: Drop HAS_DMA dependency to fix link failure

When building on allyesconfig kernel for a NO_DMA=y platform (e.g.
Sun-3), CONFIG_SND_SOC_QCOM_COMMON=y, but CONFIG_SND_SOC_QDSP6_AFE=n,
leading to a link failure:

    sound/soc/qcom/common.o: In function `qcom_snd_parse_of':
    common.c:(.text+0x2e2): undefined reference to `q6afe_is_rx_port'

While SND_SOC_QDSP6 depends on HAS_DMA, SND_SOC_MSM8996 and SND_SOC_SDM845
don't, so the following warning is seen:

    WARNING: unmet direct dependencies detected for SND_SOC_QDSP6
      Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y] && HAS_DMA [=n]
      Selected by [y]:
      - SND_SOC_MSM8996 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y]
      - SND_SOC_SDM845 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && QCOM_APR [=y] && CROS_EC [=y] && I2C [=y] && SOUNDWIRE [=y]

Until recently, this warning was harmless (from a compile-testing
point-of-view), but the new user of q6afe_is_rx_port() turned this into
a hard failure.

As the QDSP6 driver itself builds fine if NO_DMA=y, and it depends on
QCOM_APR (which in turns depends on ARCH_QCOM || COMPILE_TEST), it is
safe to increase compile testing coverage.  Hence fix the link failure
by dropping the HAS_DMA dependency of SND_SOC_QDSP6.

Fixes: a2120089251f1fe2 ("ASoC: qcom: common: set correct directions for dailinks")
Fixes: 6b1687bf76ef84cb ("ASoC: qcom: add sdm845 sound card support")
Fixes: a6f933f63f2ffdb2 ("ASoC: qcom: apq8096: Add db820c machine driver")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200629122443.21736-1-geert@linux-m68k.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: Add MAX98373 support
Naveen Manohar [Thu, 25 Jun 2020 19:26:20 +0000 (14:26 -0500)]
ASoC: Intel: sof_sdw: Add MAX98373 support

Add max98373-sdw helper function, which configures 2x MAX98373 codecs to
Link1. This patch shares code between the I2S and SoundWire modes of
MAX98373 and adds the trigger already added for I2S.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200625192620.4312-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: Fix a typo in Kconfig
Masanari Iida [Fri, 26 Jun 2020 14:29:58 +0000 (23:29 +0900)]
ASoC: samsung: Fix a typo in Kconfig

This patch fixes a spelling typo in samsung/Kconfig.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Link: https://lore.kernel.org/r/20200626142958.253614-1-standby24x7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: common: add match table for TGL MAX98373 + RT5682 SoundWire driver
Naveen Manohar [Thu, 25 Jun 2020 19:27:08 +0000 (14:27 -0500)]
ASoC: Intel: common: add match table for TGL MAX98373 + RT5682 SoundWire driver

RT5682 is in Soundwire mode on Link0 & 2x MAX98373 on link1.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200625192708.4416-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoc: Intel: cml_rt1011_rt5682: explicitly access first codec
Fred Oh [Thu, 25 Jun 2020 19:24:58 +0000 (14:24 -0500)]
ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec

dailink.codecs is pointer to a codec array. Explicitly access
first codec's dai_name.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200625192458.4148-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart...
Mark Brown [Fri, 26 Jun 2020 13:43:48 +0000 (14:43 +0100)]
Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This patchset adds:

a) fixes for missing .owner = THIS_MODULE initializations for
snd_soc_card structures

b) extensions for TigerLake and JasperLake reusing the same machine
drivers.

c) Max98373 support for SoundWire machine driver.

d) cleanups (use-after-free, quirks, etc).

Bard Liao (1):
  ASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks

Dharageswari R (3):
  ASoC: Intel: Boards: tgl_max98373: add dai_trigger function
  ASoC: Intel: Boards: tgl_max98373: Fix the comment for
    max_98373_components
  ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in
    hw_params

Fred Oh (3):
  ASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing
    quirk
  ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec
    config
  ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec

Naveen Manohar (2):
  ASoC: Intel: sof_sdw: Add MAX98373 support
  ASoC: Intel: common: add match table for TGL MAX98373 + RT5682
    SoundWire driver

Pierre-Louis Bossart (6):
  ASoC: SOF: nocodec: add missing .owner field
  ASoC: Intel: cml_rt1011_rt5682: add missing .owner field
  ASoC: Intel: sof_sdw: add missing .owner field
  ASoC: Intel: bxt_rt298: add missing .owner field
  ASoC: Intel: sof_sdw: add quirk override with kernel parameter
  ASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log

Yong Zhi (1):
  ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682

randerwang (1):
  ASoC: Intel: sdw_max98373: add card_late_probe support

 sound/soc/intel/boards/Kconfig                |  3 +-
 sound/soc/intel/boards/Makefile               |  2 +
 sound/soc/intel/boards/bxt_rt298.c            |  2 +
 sound/soc/intel/boards/bytcht_es8316.c        |  5 +-
 sound/soc/intel/boards/bytcr_rt5640.c         |  4 +-
 sound/soc/intel/boards/bytcr_rt5651.c         |  4 +-
 sound/soc/intel/boards/cml_rt1011_rt5682.c    | 90 ++++++-------------
 sound/soc/intel/boards/sof_maxim_common.c     | 55 ++++++++++--
 sound/soc/intel/boards/sof_maxim_common.h     |  3 +
 sound/soc/intel/boards/sof_rt5682.c           | 32 +++++++
 sound/soc/intel/boards/sof_sdw.c              | 72 ++++++++++++++-
 sound/soc/intel/boards/sof_sdw_common.h       | 15 ++++
 sound/soc/intel/boards/sof_sdw_max98373.c     | 86 ++++++++++++++++++
 .../intel/common/soc-acpi-intel-jsl-match.c   | 13 +++
 .../intel/common/soc-acpi-intel-tgl-match.c   | 25 ++++++
 sound/soc/sof/nocodec.c                       |  1 +
 16 files changed, 332 insertions(+), 80 deletions(-)
 create mode 100644 sound/soc/intel/boards/sof_sdw_max98373.c

base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172
--
2.20.1

3 years agosnd/soc: correct trivial kernel-doc inconsistency
Colton Lewis [Fri, 26 Jun 2020 05:40:24 +0000 (05:40 +0000)]
snd/soc: correct trivial kernel-doc inconsistency

Silence documentation build warning by correcting kernel-doc comment
for snd_soc_runtime_action.

./sound/soc/soc-pcm.c:220: warning: Function parameter or member 'action' not described in 'snd_soc_runtime_action'

Signed-off-by: Colton Lewis <colton.w.lewis@protonmail.com>
Link: https://lore.kernel.org/r/20200626053953.68797-1-colton.w.lewis@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params
Dharageswari R [Thu, 25 Jun 2020 19:13:04 +0000 (14:13 -0500)]
ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params

This patch updates tx_mask, so that (0-3)slots are reserved for
Maxim amps to feedback data.

V0->slot0,
I0->slot1,
V1->slot2,
I1->slot3.

also update slot_width in tdm configuration to 24 as the BE
configuration is 24 in topology.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks
Bard Liao [Thu, 25 Jun 2020 19:13:03 +0000 (14:13 -0500)]
ASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks

for_each_card_prelinks() is a common API to walk through each prelink
in the card.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec config
Fred Oh [Thu, 25 Jun 2020 19:13:02 +0000 (14:13 -0500)]
ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec config

When the cml_rt1011_rt5682_dailink[].codecs pointer is overridden by
a quirk with a devm allocated structure and the probe is deferred,
in the next probe we will see an use-after-free condition
(verified with KASAN). This can be avoided by using statically allocated
configurations - which simplifies the code quite a bit as well.

KASAN issue fixed.
[   23.301373] cml_rt1011_rt5682 cml_rt1011_rt5682: sof_rt1011_quirk = f
[   23.301875] ==================================================================
[   23.302018] BUG: KASAN: use-after-free in snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302178] Read of size 8 at addr ffff8881ec6acae0 by task kworker/0:2/105
[   23.302320] CPU: 0 PID: 105 Comm: kworker/0:2 Not tainted 5.7.0-rc7-test+ #3
[   23.302322] Hardware name: Google Helios/Helios, BIOS  01/21/2020
[   23.302329] Workqueue: events deferred_probe_work_func
[   23.302331] Call Trace:
[   23.302339]  dump_stack+0x76/0xa0
[   23.302345]  print_address_description.constprop.0.cold+0xd3/0x43e
[   23.302351]  ? _raw_spin_lock_irqsave+0x7b/0xd0
[   23.302355]  ? _raw_spin_trylock_bh+0xf0/0xf0
[   23.302362]  ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302365]  __kasan_report.cold+0x37/0x86
[   23.302371]  ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302375]  kasan_report+0x38/0x50
[   23.302382]  snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682]
[   23.302389]  platform_drv_probe+0x66/0xc0

Fixes: 629ba12e9998 ("ASoC: Intel: boards: split woofer and tweeter support")
Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing quirk
Fred Oh [Thu, 25 Jun 2020 19:13:01 +0000 (14:13 -0500)]
ASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing quirk

Change dev_info to dev_dbg to reduce noise during multiple deferred
probes.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682
Yong Zhi [Thu, 25 Jun 2020 19:13:00 +0000 (14:13 -0500)]
ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682

Add support for max98360a speaker amp on SSP1 and ALC5682 on SSP0
for jsl+ platform.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: Fix the comment for max_98373_components
Dharageswari R [Thu, 25 Jun 2020 19:12:59 +0000 (14:12 -0500)]
ASoC: Intel: Boards: tgl_max98373: Fix the comment for max_98373_components

MAX_98373_DEV0_NAME is the Right speaker and MAX_98373_DEV1_NAME is the
Left speaker, hence updating the comments for max98373 dailink components
accordingly.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: Boards: tgl_max98373: add dai_trigger function
Dharageswari R [Thu, 25 Jun 2020 19:12:58 +0000 (14:12 -0500)]
ASoC: Intel: Boards: tgl_max98373: add dai_trigger function

Speaker amplifier feedback is not modeled as being dependent on any
active output. Even when there is no playback happening, parts of the
graph, specifically the IV sense->speaker protection->output remains
active and this prevents the DSP from entering low-power states.

This patch suggests a machine driver level approach where the speaker
pins are enabled/disabled dynamically depending on stream start/stop
events. DPAM graph representations show the feedback loop is indeed
disabled and low-power states can be reached.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:57 +0000 (14:12 -0500)]
ASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log

We don't need an explicit cast, using the right format is simple
enough.

Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: add quirk override with kernel parameter
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:56 +0000 (14:12 -0500)]
ASoC: Intel: sof_sdw: add quirk override with kernel parameter

During the bring-up of new platforms, or to take care of specific
hardware reworks, it's useful to add a kernel parameter to override
the default DMI-based quirks.

For example, adding the following line in a .conf file in
/etc/modprobe.d/ will change the default quirk and log the changes if
dynamic debug is enabled.

options snd_soc_sof_sdw quirk=0x802

[  735.025785] sof_sdw sof_sdw: Overriding quirk 0x10 => 0x802
[  735.025787] sof_sdw sof_sdw: quirk realtek,jack-detect-source 2
[  735.025790] sof_sdw sof_sdw: quirk SOF_RT715_DAI_ID_FIX enabled

Tested on ICL RVP with add-on board instead of default codec.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bxt_rt298: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:55 +0000 (14:12 -0500)]
ASoC: Intel: bxt_rt298: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 76016322ec56 ('ASoC: Intel: Add Broxton-P machine driver')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: sof_sdw: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:54 +0000 (14:12 -0500)]
ASoC: Intel: sof_sdw: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: cml_rt1011_rt5682: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:53 +0000 (14:12 -0500)]
ASoC: Intel: cml_rt1011_rt5682: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 17fe95d6df93 ('ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: nocodec: add missing .owner field
Pierre-Louis Bossart [Thu, 25 Jun 2020 19:12:52 +0000 (14:12 -0500)]
ASoC: SOF: nocodec: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a
module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
 0 (efault)

Fixes: 8017b8fd37bf ('ASoC: SOF: Add Nocodec machine driver support')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt1015: add missing header inclusion
Tzung-Bi Shih [Thu, 25 Jun 2020 15:35:43 +0000 (23:35 +0800)]
ASoC: rt1015: add missing header inclusion

To fix compilation error:

error: implicit declaration of function 'ACPI_PTR'
[-Werror,-Wimplicit-function-declaration]
                .acpi_match_table = ACPI_PTR(rt1015_acpi_match),
                    ^

Adds the missing header "acpi.h" inclusion and sorts in alphabetical.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dapm: declare missing structure prototypes
Tzung-Bi Shih [Thu, 25 Jun 2020 15:35:42 +0000 (23:35 +0800)]
ASoC: dapm: declare missing structure prototypes

To fix compilation warnings:

- struct 'snd_soc_pcm_runtime' declared inside parameter list will not
  be visible outside of this definition or declaration
- struct 'soc_enum' declared inside parameter list will not be visible
  outside of this definition or declaration

Declares the missing structure prototypes.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: core: move definition of enum snd_soc_bias_level
Tzung-Bi Shih [Thu, 25 Jun 2020 15:35:41 +0000 (23:35 +0800)]
ASoC: core: move definition of enum snd_soc_bias_level

To fix compilation error:

- error: field 'XXX' has incomplete type

Moves definition of enum snd_soc_bias_level from soc.h to soc-dapm.h.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>