Jon Hunter [Wed, 11 Nov 2020 10:32:45 +0000 (10:32 +0000)]
ASoC: tegra: Don't warn on probe deferral
Deferred probe is an expected return value for snd_soc_register_card().
Given that the driver deals with it properly, there's no need to output
a warning that may potentially confuse users.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20201111103245.152189-1-jonathanh@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 10 Nov 2020 21:36:13 +0000 (21:36 +0000)]
Merge series "Audio Graph Updates" from Sameer Pujar <spujar@nvidia.com>:
This series is a prepraration for using generic graph driver for Tegra210
audio. Tegra audio graph series will be sent in a separate series because
it has some dependency over other series for documentation work. This
series can focus on the generic ASoC driver updates. Below are the summary
of changes done.
* Support multiple instances of a component. For example there can be
multiple I2S devices which can use the same component driver.
* Support open platforms with empty Codec endpoint. Customers can plug
their own HW and can populate codec endpoint.
* In a component model there can be many components which can be
connected together. In such cases Identify no-pcm DPCM DAI links which
can be used in BE<->BE connections.
* Expose structures or helpers to be re-used by other similar graph
drivers.
The series is based on following references where DPCM usgae for Tegra
Audio and simple-card driver proposal were discussed.
* https://lkml.org/lkml/2020/4/30/519 (DPCM for Tegra)
* https://lkml.org/lkml/2020/6/27/4 (simple-card driver)
Changelog
=========
v4 -> v5
--------
* No changes in the core/audio-graph driver patches which are
part of the current series.
* Dropped Tegra audio patches and doc patches. This will be
sent separately once the doc depdendencies are resolved.
v3 -> v4
--------
* Added new patches to convert graph.txt and audio-graph-card.txt
to corresponding json-schema files. Later these references
are used in Tegra audio graph schema.
* AHUB component binding docs are updated to reflect the usage
of ports/port/endpoint
* More common stuff is moved into graph_parse_of() and this is
used by both generic and Tegra audio graph.
* DT binding for Tegra audio graph is updated to included "ports { }"
* As per the suggestion 'void *data' member is dropped from
'asoc_simple_priv' and instead container method is used to
maintain required custom data internal to Tegra audio graph.
v2 -> v3
--------
* Dropped new compatible addition in generic graph driver
after reviewing it with Morimoto-san. Instead added Tegra
audio graph driver and new compatibles are added in the same.
* Added new patches to expose new members for customization
in audio graph driver.
* Added new patch for Tegra audio graph driver and related
documentation.
* Minor change in below commit where mutex version of helper is used
"ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM"
* DT binding is updated to use the newly exposed compatibles
* No changes in other patches
v1 -> v2
--------
* Re-organized ports/endpoints description for ADMAIF and XBAR.
Updated DT patches accordingly.
* After above change, multiple Codec endpoint support is not
required and hence dropped for now. This will be considered
separately if at all required in future.
* Re-ordered patches in the series.
Sameer Pujar (7):
ASoC: soc-core: Fix component name_prefix parsing
ASoC: soc-pcm: Get all BEs along DAPM path
ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names
ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM
ASoC: audio-graph: Support empty Codec endpoint
ASoC: audio-graph: Expose new members for asoc_simple_priv
ASoC: audio-graph: Expose helpers from audio graph
include/sound/graph_card.h | 16 ++++
include/sound/simple_card_utils.h | 3 +
include/sound/soc.h | 1 +
sound/soc/generic/audio-graph-card.c | 175 ++++++++++++++++++++++++-----------
sound/soc/soc-core.c | 3 +-
sound/soc/soc-pcm.c | 3 +-
6 files changed, 143 insertions(+), 58 deletions(-)
create mode 100644 include/sound/graph_card.h
--
2.7.4
Dan Carpenter [Thu, 5 Nov 2020 12:51:54 +0000 (15:51 +0300)]
ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of()
There are two issues in this function.
1) We can't drop the refrences on "cpu", "codec" and "platform" before
we take the reference. This doesn't cause a problem on the first
iteration because those pointers start as NULL so the of_node_put()
is a no-op. But on the subsequent iterations, it will lead to a use
after free.
2) If the devm_kzalloc() allocation failed then the code returned
directly instead of cleaning up.
Fixes:
c1e6414cdc37 ("ASoC: qcom: common: Fix refcount imbalance on error")
Fixes:
1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Viorel Suman [Mon, 2 Nov 2020 16:18:10 +0000 (18:18 +0200)]
ASoC: fsl_xcvr: fix break condition
The break condition copied by mistake as same
as loop condition in the previous version, but must
be the opposite. So fix it.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/20201102161810.902464-1-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:14 +0000 (20:40 +0530)]
ASoC: audio-graph: Expose helpers from audio graph
This commit exposes following functions which can be used by a sound
card driver based on generic audio graph driver. Idea is vendors can
have a thin driver and re-use common stuff from audio graph driver.
- graph_card_probe()
- graph_parse_of()
In doing so a new header file is added for above. The graph_probe()
function is simplified by moving more common stuff to graph_parse_of().
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-8-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:13 +0000 (20:40 +0530)]
ASoC: audio-graph: Expose new members for asoc_simple_priv
Add new members in struct 'asoc_simple_priv'. Idea is to leverage
simple or graph card driver as much as possible and vendor can
maintain a thin driver to control the behavior by populating these
newly exposed members.
Following are the members added in 'asoc_simple_priv':
- 'ops' struct: In some cases SoC vendor drivers may want to
implement 'snd_soc_ops' callbacks differently. In such cases
custom callbacks would be used.
- 'force_dpcm' flag: Right now simple or graph card drivers
detect DAI links as DPCM links if:
* The dpcm_selectable is set AND
* Codec is connected to multiple CPU endpoints or aconvert
property is used for rate/channels.
So there is no way to directly specify usage of DPCM alone. So a
flag is exposed to mark all links as DPCM. Vendor driver can
set this if required.
- 'dpcm_selectable': Currently simple or audio graph drivers
provide a way to enable this for specific compatibles. However
vendor driver may want to define some additional info. Thus
expose this variable where vendor drivers can set this if
required.
Audio graph driver is updated to consider above flags or callbacks.
Subsequent patches in the series illustrate usage for above.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-7-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:12 +0000 (20:40 +0530)]
ASoC: audio-graph: Support empty Codec endpoint
For open platforms, which can support pluggable audio cards, Codec
endpoint is not fixed always. It actually depends on the compatible
HW module that is going to be connected. From SoC side the given I/O
interface is always available. Hence such links have fixed CPU endpoint
but no Codec endpoint. This patch helps to support such links where
user can populate Codec endpoint only and its fields in Platform DT
depending on the plugged HW.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-6-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:11 +0000 (20:40 +0530)]
ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM
PCM devices are created for FE dai links with 'no-pcm' flag as '0'.
Such DAI links have CPU component which implement either pcm_construct()
or pcm_new() at component or dai level respectively. Based on this,
current patch exposes a helper function to identify such components
and populate 'no_pcm' flag for DPCM DAI link.
This helps to have BE<->BE component links where PCM devices need
not be created for CPU component involved in such links.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:10 +0000 (20:40 +0530)]
ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names
For multiple instances of components, using DAI name alone for DAI links
is causing conflicts. Components can define multiple DAIs and hence using
just a device name won't help either. Thus DT device node reference and
DAI names are used to uniquely represent DAI link names.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:09 +0000 (20:40 +0530)]
ASoC: soc-pcm: Get all BEs along DAPM path
dpcm_end_walk_at_be() stops the graph walk when first BE is found for
the given FE component. In a component model we may want to connect
multiple DAIs from different components. A new flag is introduced in
'snd_soc_card', which when set allows DAI/component chaining. Later
PCM operations can be called for all these listed components for a
valid DAPM path.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Mon, 2 Nov 2020 15:10:08 +0000 (20:40 +0530)]
ASoC: soc-core: Fix component name_prefix parsing
The "prefix" can be defined in DAI link node or it can be specified as
part of the component node itself. Currently "sound-name-prefix" defined
in a component is not taking effect. Actually the property is not getting
parsed. It can be fixed by parsing "sound-name-prefix" property whenever
"prefix" is missing in DAI link Codec node.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 10 Nov 2020 15:57:39 +0000 (15:57 +0000)]
Merge series "Modify documentation and machine driver for SC7180 sound card" from Ajye Huang <ajye.huang@gmail.com>:
Note:
- The patch is made by the collaboration of
Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Cheng-Yi Chiang <cychiang@chromium.org>
v6:
- Documentation: Addressed suggestions from Rob Herring.
- Define "maxItems: 1" in dmic-gpios property.
- Only keep one example and add dmic-gpios property in.
v5:
- Machine driver:
- Fix a format string warning (Reported-by: kernel test robot <lkp@intel.com>).
detailed info at https://lore.kernel.org/patchwork/patch/1331087/
v4:
- Machine driver: Addressed suggestions from Tzung-Bi.
- Remove redundant judgments in dmic_set() and dmic_get().
- Remove 1 level indent of judgment of IS_ERR(data->dmic_sel).
v3:
- Machine driver: Addressed suggestions from Tzung-Bi.
- Move variables "dmic_switch" and "dmic_sel" into struct sc7180_snd_data.
- Remove redundant judgments in dmic_set().
v2:
- Documentation: Modify the dimc-gpios property description and examples.
- Machine driver:
- Remove "qcom,sc7180-sndcard-rt5682-m98357-2mic" compatible
- See gpio property and use anadditional control.
Thanks for the review!
Ajye Huang (2):
ASoC: google: dt-bindings: modify machine bindings for two MICs case
ASoC: qcom: sc7180: Modify machine driver for 2mic
.../bindings/sound/google,sc7180-trogdor.yaml | 8 ++-
sound/soc/qcom/sc7180.c | 61 +++++++++++++++++++
2 files changed, 68 insertions(+), 1 deletion(-)
--
2.25.1
Mark Brown [Tue, 10 Nov 2020 15:57:38 +0000 (15:57 +0000)]
Merge series "Fix vaud18 power leakage of mt6359" from Shane Chien <shane.chien@mediatek.com>
"Shane.Chien" <shane.chien@mediatek.com>:
From: "Shane.Chien" <shane.chien@mediatek.com>
This series of patches is to fix vaud18 power leakage problem.
vaud18 will be enable only when mt6359 audio path is turned on.
Change since v2:
- fix dt-binnding syntex error
Change since v1:
- use dapm regulator supply widget for vaud18 control.
- add vaud18 regulator property in mt6359 dt-binding.
Shane.Chien (2):
ASoC: Fix vaud18 power leakage of mt6359
dt-bindings: mediatek: mt6359: Add new property for mt6359
.../devicetree/bindings/sound/mt6359.yaml | 9 +++++++
sound/soc/codecs/mt6359.c | 25 +-------------------
sound/soc/codecs/mt6359.h | 8 -------
3 files changed, 10 insertions(+), 32 deletions(-)
--
1.7.9.5
Mark Brown [Tue, 10 Nov 2020 15:57:37 +0000 (15:57 +0000)]
Merge series "ASoC: soc-compress: tidyup STREAM vs COMPRESS" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
These are v2 of tidyup patch-set for SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx.
soc-compress is using both SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx, but mixed use.
This is confusable, but no problem. Because these are defined as UAPI and
are using same value.
This patch-set make sure these are same value.
v1 -> v2
- checks COMPRESS vs PCM_STREAM by using BUILD_BUG_ON()
Link: https://lore.kernel.org/r/87wnzcfnkk.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (2):
ASoC: soc-compress: tidyup STREAM vs COMPRESS
ASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same
sound/soc/soc-compress.c | 63 +++++++++++++++-------------------------
1 file changed, 23 insertions(+), 40 deletions(-)
--
2.25.1
David Lin [Tue, 10 Nov 2020 09:58:25 +0000 (17:58 +0800)]
ASoC: nau8315: revise the power event of EN_PIN dapm widget for symmetry
This patch is to revise the power event of EN_PIN dapm widget for symmetry.
Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20201110095823.3512447-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
David Lin [Mon, 2 Nov 2020 02:32:13 +0000 (10:32 +0800)]
ASoC: nau8315: add codec driver
Add codec driver for Nuvoton NAU8315.
Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201102023212.594137-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 30 Oct 2020 01:01:22 +0000 (10:01 +0900)]
ASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same
soc-compress.c is using both SND_COMPRESS_xxx and SND_PCM_STREAM_xxx.
These are defined as UAPI, and has same value.
enum {
SNDRV_PCM_STREAM_PLAYBACK = 0,
SNDRV_PCM_STREAM_CAPTURE,
...
};
enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
SND_COMPRESS_CAPTURE
};
Essentially both COMPRESS and PCM_STREAM definitions are identical,
and can be never different because of ABI compatibility,
which means it's safe to mix both variants in the code.
This patch checks it by BUILD_BUG_ON(), and merge to use.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87361wmsyg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 30 Oct 2020 01:01:15 +0000 (10:01 +0900)]
ASoC: soc-compress: tidyup STREAM vs COMPRESS
snd_soc_runtime_activate() and
snd_soc_dai_digital_mute() need SNDRV_PCM_STREAM_xxx
instead of SND_COMPRESS_xxx.
These are bug but nothing happen because these are same value.
enum {
SNDRV_PCM_STREAM_PLAYBACK = 0,
SNDRV_PCM_STREAM_CAPTURE,
...
};
enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
SND_COMPRESS_CAPTURE
};
This patch tidyup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kmcmsyn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajye Huang [Fri, 6 Nov 2020 06:14:33 +0000 (14:14 +0800)]
ASoC: qcom: sc7180: Modify machine driver for 2mic
In addition, having mixer control to switch between DMICs by
using "dmic-gpios" property.
Refer to this one as an example,
commit
b7a742cff3f6 ("ASoC: AMD: Use mixer control to switch between DMICs")
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201106061433.1483129-3-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajye Huang [Fri, 6 Nov 2020 06:14:32 +0000 (14:14 +0800)]
ASoC: google: dt-bindings: modify machine bindings for two MICs case
Add a property "dmic-gpios" for switching between two MICs.
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201106061433.1483129-2-ajye_huang@compal.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shane.Chien [Tue, 10 Nov 2020 02:31:32 +0000 (10:31 +0800)]
dt-bindings: mediatek: mt6359: Add new property for mt6359
This patch add "LDO_VAUD18-supply" property to
control vaud18 regulator. It is labeled as required
due to mt6359 audio path always need to enable vaud18.
Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1604975492-6142-3-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shane.Chien [Tue, 10 Nov 2020 02:31:31 +0000 (10:31 +0800)]
ASoC: Fix vaud18 power leakage of mt6359
vaud18 is power of mt6359 audio path. It
should only enable when audio is used,
instead of in boot up stage.
Once mt6359 audio path is enabled or disabled,
vaud18 is controlled by regulator supply widget
"LDO_VAUD18". Due to vaud18 is controlled by
regulator dapm macro instead of regmap, the macro
MT6359_LDO_VAUD18_CON0 and variable avdd_reg
is no used and removed from mt6359.h.
Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1604975492-6142-2-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 9 Nov 2020 19:43:31 +0000 (19:43 +0000)]
Merge series "ASoC: ti: davinci-mcasp: Handle incomplete DT node gracefully" from Peter Ujfalusi <peter.ujfalusi@ti.com>:
Hi,
The series is inspired by the effort to standardize TI's arm64 dtsi files to keep
all nodes in 'okay' state and let the board dts files disable not needed
peripherals (and not properly configured):
https://lore.kernel.org/lkml/
20201104224356.18040-1-nm@ti.com/
In the unlikely (or likely?) event when the dts misses to disable the McASP node
which is not configured we currenly and luckily just manage to not crash as we
had fixup code in place for legacy pdata boots.
This however prints out a message which does not really help to identify the
issue.
This series will reduce some of the noise during boot (first patch) then
adds the needed changes to handle the variations of 'okay':
A - have all required DT properties for audio
B - gpiochip is enabled
A && !B -> everything is OK for audio, no gpiochip registered
A && B -> everything is OK for audio, gpiochip is registered
!A && B -> audio is not OK, gpiochip is registered. dev_dbg() for audio and do
not register SOC DAI and PCM
!A && !B -> audio is not OK, no gpiochip. dev_err() and fail the probe
Regards,
Peter
---
Peter Ujfalusi (4):
ASoC: ti: davinci-mcasp: Use platform_get_irq_byname_optional
ASoC: ti: davinci-mcasp: Remove legacy dma_request parsing
ASoC: ti: davinci-mcasp: Simplify the configuration parameter handling
ASoC: ti: davinci-mcasp: Handle missing required DT properties
sound/soc/ti/davinci-mcasp.c | 294 ++++++++++++++---------------------
1 file changed, 119 insertions(+), 175 deletions(-)
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Shengjiu Wang [Sat, 7 Nov 2020 02:20:43 +0000 (10:20 +0800)]
ASoC: fsl_aud2htx: Remove dev_err() usage after platform_get_irq()
platform_get_irq() would print error message internally, so dev_err()
after platform_get_irq() is not needed
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1604715643-29507-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cheng-Yi Chiang [Mon, 9 Nov 2020 10:34:15 +0000 (18:34 +0800)]
ASoC: qcom: sc7180: Add missing PM ops
Use PM ops snd_soc_pm_ops to handle suspend/resume like other machine
drivers.
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20201109103415.607495-1-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Jack Yu [Mon, 9 Nov 2020 06:29:58 +0000 (14:29 +0800)]
ASoC: rt1015: modification for calibration to get better performance
Modification for calibration to get better performance.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/20201109062958.16917-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 6 Nov 2020 07:25:51 +0000 (09:25 +0200)]
ASoC: ti: davinci-mcasp: Handle missing required DT properties
McASP needs three required properties to be usable for audio:
op-mode, tdm-slots and the serial-dir array.
Instead of probing the driver even without the needed information we should
make sure that all the parameters are provided for operation.
The fact that McASP can act as a GPIO controller for it's pins complicates
this a bit, but as a general rule we can:
- we fail the probe if McASP is not configured to be used as gpiochip
- we will not register the DAI (and PCM) if gpiochip is defined
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201106072551.689-5-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 6 Nov 2020 07:25:50 +0000 (09:25 +0200)]
ASoC: ti: davinci-mcasp: Simplify the configuration parameter handling
Replace the davinci_mcasp_set_pdata_from_of() function which returned a
pdata pointer with davinci_mcasp_get_config() to return an actual error
code and handle all pdata validation and private mcasp struct setup in
there.
Drop the unused ram-size-playback and sram-size-capture query from DT at
the same time.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201106072551.689-4-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 6 Nov 2020 07:25:49 +0000 (09:25 +0200)]
ASoC: ti: davinci-mcasp: Remove legacy dma_request parsing
The legacy dma_request (which was holding the DMA request number) is no
longer in use for a long time.
All legacy platforms has been converted to dma_slave_map.
Remove it along with the DT parsing to get tx_dma_channel and
rx_dma_channel.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201106072551.689-3-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Fri, 6 Nov 2020 07:25:48 +0000 (09:25 +0200)]
ASoC: ti: davinci-mcasp: Use platform_get_irq_byname_optional
Depending on the integration of McASP either the 'common' or the
'rx' and 'tx' or only the 'tx' interrupt number is valid, provided.
By switching to platform_get_irq_byname_optional() we can clean up the
bootlog from messages like:
davinci-mcasp 2ba0000.mcasp: IRQ common not found
The irq number == 0 is not valid, fix the check at the same time.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201106072551.689-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 6 Nov 2020 11:21:24 +0000 (11:21 +0000)]
Merge series "ASoC: dt-bindings: audio-graph-card: switch to yaml base Documentation" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Rob, Mark
Cc: Sameer
These are v6 of switch to yaml base Documentation for
audio-graph-card and renesas,rsnd which uses audio-graph-card.
v5 -> v6
- add Acked-by/Reviewed-by on each patch
- remove "audio-graph-card,xxx" property
- remove un-needed if "ok"
v4 -> v5
- move "endpoint" under "port"
v3 -> v4
- fixuped yamllint warnings/errors
v2 -> v3
- fixuped Rob's pointed points
v1 -> v2
- upgrade dt-schema, and fixup errors for [2/2] patch
Kuninori Morimoto (3):
dt-bindings: ASoC: audio-graph-card: switch to yaml base Documentation
dt-bindings: ASoC: renesas,rsnd: switch to yaml base Documentation
dt-bindings: ASoC: renesas,rsnd: Add r8a77961 support
.../bindings/sound/audio-graph-card.txt | 337 ------------
.../bindings/sound/audio-graph-card.yaml | 153 ++++++
.../bindings/sound/renesas,rsnd.txt | 520 ------------------
.../bindings/sound/renesas,rsnd.yaml | 451 +++++++++++++++
4 files changed, 604 insertions(+), 857 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card.txt
create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card.yaml
create mode 100644 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
--
2.25.1
Kuninori Morimoto [Thu, 5 Nov 2020 06:05:23 +0000 (15:05 +0900)]
ASoC: renesas,rsnd: Add r8a77961 support
Document R-Car M3-W+ (R8A77961) SoC bindings.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87a6vwbavq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Nov 2020 06:05:10 +0000 (15:05 +0900)]
ASoC: renesas, rsnd: switch to yaml base Documentation
This patch switches from .txt base to .yaml base Document.
It is still keeping detail explanations at .txt
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87blgcbaw4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 5 Nov 2020 06:04:57 +0000 (15:04 +0900)]
ASoC: audio-graph-card: switch to yaml base Documentation
This patch switches from .txt base to .yaml base Document.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87d00sbawh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Mon, 2 Nov 2020 01:52:27 +0000 (09:52 +0800)]
ASoC: fsl_aud2htx: Add aud2htx module driver
The AUD2HTX is a digital module that provides a bridge between
the Audio Subsystem and the HDMI RTX Subsystem. This module
includes intermediate storage to queue SDMA transactions prior
to being synchronized and passed to the HDMI RTX Subsystem over
the Audio Link.
The AUD2HTX contains a DMA request routed to the SDMA module.
This DMA request is controlled based on the watermark level in
the 32-entry sample buffer.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1604281947-26874-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Mon, 2 Nov 2020 01:52:26 +0000 (09:52 +0800)]
ASoC: dt-bindings: fsl_aud2htx: Add binding doc for aud2htx module
AUD2HTX (Audio Subsystem TO HDMI TX Subsystem) is a new
IP module found on i.MX8MP.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1604281947-26874-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xu Wang [Thu, 29 Oct 2020 09:01:04 +0000 (09:01 +0000)]
ASoC: pxa: pxa-ssp: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
ecause clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20201029090104.29552-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Xu Wang [Thu, 29 Oct 2020 08:41:37 +0000 (08:41 +0000)]
ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20201029084137.28771-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Thu, 5 Nov 2020 11:44:35 +0000 (11:44 +0000)]
ASoC: q6afe-clocks: fix warning on symbol scope
This patch fixes below warning when module is compiled with W=1 C=1
sound/soc/qcom/qdsp6/q6afe-clocks.c:122:18: warning: symbol 'q6afe_clks'
was not declared. Should it be static?
Fixes:
520a1c396d196 ("ASoC: q6afe-clocks: add q6afe clock controller")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201105114435.22860-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Mon, 26 Oct 2020 10:01:29 +0000 (11:01 +0100)]
ASoC: pcm: DRAIN support reactivation
soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel
v5.4 where explicit switch(cmd) has been introduced which takes into
account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update
switch statement to reactive support for it.
As DRAIN is somewhat unique by lacking negative/stop counterpart, bring
behaviour of dpcm_fe_dai_do_trigger() for said command back to its
pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.
Fixes:
acbf27746ecf ("ASoC: pcm: update FE/BE trigger order based on the command")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201026100129.8216-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Zou Wei [Thu, 5 Nov 2020 12:28:07 +0000 (20:28 +0800)]
ASoC: mediatek: mt8192: Make some symbols static
Fix the following sparse warnings:
./mt8192-dai-i2s.c:2040:5: warning: symbol 'mt8192_dai_i2s_get_share' was not declared. Should it be static?
./mt8192-dai-i2s.c:2060:5: warning: symbol 'mt8192_dai_i2s_set_priv' was not declared. Should it be static?
./mt8192-afe-gpio.c:15:16: warning: symbol 'aud_pinctrl' was not declared. Should it be static?
./mt8192-afe-pcm.c:70:5: warning: symbol 'mt8192_get_memif_pbuf_size' was not declared. Should it be static?
./mt8192-afe-pcm.c:2137:39: warning: symbol 'mt8192_afe_component' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Acked-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604579287-25251-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sudip Mukherjee [Thu, 5 Nov 2020 12:47:47 +0000 (12:47 +0000)]
ASoC: mediatek: mt8192: Fix build failure
A build of arm64 allmodconfig with next-
20201105 fails with the error:
ERROR: modpost: "mt8192_afe_gpio_request" undefined!
ERROR: modpost: "mt8192_afe_gpio_init" undefined!
Export the symbols so that mt8192-mt6359-rt1015-rt5682.ko finds it.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20201105124747.18383-1-sudipm.mukherjee@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Thu, 5 Nov 2020 11:41:00 +0000 (11:41 +0000)]
ASoC: qcom: lpass-cpu: fix warning on symbol scope
This patch fixes below warning when module is compiled with W=1 C=1
lpass-cpu.c:677:22: warning: symbol 'lpass_hdmi_regmap_config'
was not declared. Should it be static?
Fixes:
7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201105114100.18647-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 4 Nov 2020 20:40:40 +0000 (20:40 +0000)]
Merge series "ASoC: topology: Change to resource managed memory" from Amadeusz Sławiński<amadeuszx.slawinski@linux.intel.com>:
Almost all other allocations in ASoC API are resource managed, the only
exception is soc-topology.c.
This patchset clean ups few unnecessary functions in preparation for
change and then changes to devm_ functions for allocation.
Amadeusz Sławiński (6):
ASoC: topology: Remove unused functions from topology API
ASoC: topology: Remove multistep topology loading
ASoC: topology: Unify all device references
ASoC: topology: Change allocations to resource managed
ASoC: topology: Remove empty functions
ASoC: topology: Simplify remove_widget function
include/sound/soc-topology.h | 13 +-
sound/soc/intel/skylake/skl-topology.c | 9 +-
sound/soc/soc-topology.c | 302 +++++--------------------
sound/soc/sof/pcm.c | 2 +-
sound/soc/sof/topology.c | 4 +-
5 files changed, 57 insertions(+), 273 deletions(-)
--
2.25.1
Mark Brown [Wed, 4 Nov 2020 20:40:39 +0000 (20:40 +0000)]
Merge series "ASoC: Mediatek: Add support for MT8192 SoC" from Jiaxin Yu <jiaxin.yu@mediatek.com>:
This series of patches adds support for Mediatek AFE for MT8192 SoC. At the same
time, the calibration function of MT6359 is completed with real machine driver.
The patch is based on broonie tree "for-next" branch.
Change since v3:
- use normal conditional statements to improve legiblity in [v3,3/9]
- remove mtk_i2s_hd_en_event as there's trace in the core
- impove mt8192_i2s_enum and mt8192_adda_enum
Change since v2:
- split the dai driver files as a separate patch
- fix dt-bindings to GPL-2.0-only License
- remove unnecessary preperty descriptions such as 'maxItems'
Change since v1:
- fixed some typos related to dt-bindings in [v1,3/5] and [v1,5/5]
- add vendor prefix to the properties, such as "mediatek,apmixedsys"
- add a dependency description to indicate the required header files
Jiaxin Yu (9):
ASoC: mediatek: mt6359: add the calibration functions
ASoC: mediatek: mt8192: add platform driver
ASoC: mediatek: mt8192: support i2s in platform driver
ASoC: mediatek: mt8192: support adda in platform driver
ASoC: mediatek: mt8192: support pcm in platform driver
ASoC: mediatek: mt8192: support tdm in platform driver
dt-bindings: mediatek: mt8192: add audio afe document
ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and
rt5682
dt-bindings: mediatek: mt8192: add mt8192-mt6358-rt1015-rt5682
document
.../bindings/sound/mt8192-afe-pcm.yaml | 100 +
.../sound/mt8192-mt6359-rt1015-rt5682.yaml | 42 +
sound/soc/codecs/mt6359.c | 110 +
sound/soc/codecs/mt6359.h | 7 +
sound/soc/mediatek/Kconfig | 23 +
sound/soc/mediatek/Makefile | 1 +
sound/soc/mediatek/common/mtk-afe-fe-dai.c | 13 +-
sound/soc/mediatek/common/mtk-base-afe.h | 1 +
sound/soc/mediatek/mt8192/Makefile | 16 +
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 669 ++++
sound/soc/mediatek/mt8192/mt8192-afe-clk.h | 244 ++
sound/soc/mediatek/mt8192/mt8192-afe-common.h | 170 +
.../soc/mediatek/mt8192/mt8192-afe-control.c | 163 +
sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 306 ++
sound/soc/mediatek/mt8192/mt8192-afe-gpio.h | 19 +
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 2389 +++++++++++++
sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 1471 ++++++++
sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 2110 +++++++++++
sound/soc/mediatek/mt8192/mt8192-dai-pcm.c | 409 +++
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 778 ++++
.../mediatek/mt8192/mt8192-interconnection.h | 65 +
.../mt8192/mt8192-mt6359-rt1015-rt5682.c | 1058 ++++++
sound/soc/mediatek/mt8192/mt8192-reg.h | 3131 +++++++++++++++++
23 files changed, 13291 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
create mode 100644 Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml
create mode 100644 sound/soc/mediatek/mt8192/Makefile
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-clk.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-clk.h
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-common.h
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-control.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-gpio.h
create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-adda.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-i2s.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-pcm.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-interconnection.h
create mode 100644 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
create mode 100644 sound/soc/mediatek/mt8192/mt8192-reg.h
--
2.18.0
Shuming Fan [Wed, 4 Nov 2020 09:20:05 +0000 (17:20 +0800)]
ASoC: rt1015: support TDM slot configuration
Add TDM slot callback function to support TDM configuration
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201104092005.2227-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:38 +0000 (15:59 +0800)]
dt-bindings: mediatek: mt8192: add mt8192-mt6358-rt1015-rt5682 document
This patch adds document for the machine board with mt6358, rt1015
and rt5682.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-10-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:37 +0000 (15:59 +0800)]
ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682
This patch adds support for the machine board with mt6359, rt1015
and rt5682.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-9-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:36 +0000 (15:59 +0800)]
dt-bindings: mediatek: mt8192: add audio afe document
This patch adds mt8192 audio afe document.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-8-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:35 +0000 (15:59 +0800)]
ASoC: mediatek: mt8192: support tdm in platform driver
This patch adds mt8192 tdm dai driver.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-7-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:34 +0000 (15:59 +0800)]
ASoC: mediatek: mt8192: support pcm in platform driver
This patch adds mt8192 pcm dai driver.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-6-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:33 +0000 (15:59 +0800)]
ASoC: mediatek: mt8192: support adda in platform driver
This patch adds mt8192 adda dai driver.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-5-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:32 +0000 (15:59 +0800)]
ASoC: mediatek: mt8192: support i2s in platform driver
This patch adds mt8192 i2s dai driver.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-4-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:31 +0000 (15:59 +0800)]
ASoC: mediatek: mt8192: add platform driver
This patch adds mt8192 platform and affiliated drivers.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-3-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Tue, 3 Nov 2020 07:59:30 +0000 (15:59 +0800)]
ASoC: mediatek: mt6359: add the calibration functions
Add the calibraion functions for initializing the codec when registering
the machine driver.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-2-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 30 Oct 2020 14:54:27 +0000 (10:54 -0400)]
ASoC: topology: Simplify remove_widget function
Now that enum and mixer kcontrols are freed by resource management
framework, removing kcontrol becomes one function call, so simplify code
in remove_widget.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 30 Oct 2020 14:54:26 +0000 (10:54 -0400)]
ASoC: topology: Remove empty functions
After changing memory management to resource managed one, some of the
functions became no ops, remove them as they are no longer needed.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 30 Oct 2020 14:54:25 +0000 (10:54 -0400)]
ASoC: topology: Change allocations to resource managed
In order for topology to be resource managed, change all allocations to
be resource managed:
k*alloc -> devm_k*alloc
kstrdup -> devm_kstrdup
Exceptions where non resource managed allocation is left is
soc_tplg_dapm_widget_create(), as it uses pointer to memory locally and
frees it up after use, as well as soc_tplg_dapm_graph_elems_load(),
which has temporary pointer to table of routes.
After conversion all redundant calls in error and clean up paths were
removed.
Also removed some variables which become unneeded when there is no calls
using them.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 30 Oct 2020 14:54:24 +0000 (10:54 -0400)]
ASoC: topology: Unify all device references
In few places tplg->comp->dev is used, while everywhere else tplg->dev
is being used. Unify those uses towards tplg->dev, as it is being set to
comp->dev during initialization anyway.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 30 Oct 2020 14:54:23 +0000 (10:54 -0400)]
ASoC: topology: Remove multistep topology loading
In theory topology can be loaded in multiple steps by providing index to
snd_soc_tplg_component_load, however, from usability point of view it
doesn't make sense, as can be seen from all current users loading
topology in one go. Remove the unnecessary parameter.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Fri, 30 Oct 2020 14:54:22 +0000 (10:54 -0400)]
ASoC: topology: Remove unused functions from topology API
Topology API exposes snd_soc_tplg_widget_remove and
snd_soc_tplg_widget_remove_all, but both are nowhere used. All current
users load and unload topology as a whole. As following commits
introduce resource managed memory, remove them to simplify code and
reduce maintenance burden.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tom Rix [Sun, 1 Nov 2020 16:03:12 +0000 (08:03 -0800)]
ASoC: TSCS42xx: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201101160312.2296146-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dan Carpenter [Tue, 3 Nov 2020 10:18:53 +0000 (13:18 +0300)]
ASoC: qcom: sc7180: Fix some indenting in sc7180_lpass_alloc_dma_channel()
This code is correct, but it should be indented one more tab.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201103101853.GD1127762@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Tom Rix [Sun, 1 Nov 2020 17:24:12 +0000 (09:24 -0800)]
ASoC: tegra: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20201101172412.2306144-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Zhang Qilong [Mon, 2 Nov 2020 10:34:28 +0000 (18:34 +0800)]
ASoC: ti: davinci-mcasp: remove always zero of davinci_mcasp_get_dt_params
davinci_mcasp_get_dt_params alway return zero, and its return value
could be ignored by the caller. So make it 'void' type to avoid the
check its return value.
Fixes:
764958f2b5239 ("ASoC: ti: davinci-mcasp: Support for auxclk-fs-ratio")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201102103428.32678-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tom Rix [Sun, 1 Nov 2020 17:17:42 +0000 (09:17 -0800)]
ASoC: TSCS454: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201101171742.2304458-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Codrin Ciubotariu [Tue, 3 Nov 2020 10:05:54 +0000 (12:05 +0200)]
ASoC: atmel-i2s: do not warn if muxclk is missing
Besides the fact that muxclk is optional, muxclk can be set using
assigned-clocks, removing the need to set it in driver. The warning is
thus unneeded, so we can transform it in a debug print, eventually to just
reflect that muxclk was not set by the driver.
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20201103100554.1307190-1-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tom Rix [Sun, 1 Nov 2020 17:19:43 +0000 (09:19 -0800)]
ASoC: Intel: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201101171943.2305030-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xu Wang [Thu, 29 Oct 2020 08:25:13 +0000 (08:25 +0000)]
ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201029082513.28233-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Tom Rix [Sun, 1 Nov 2020 16:00:37 +0000 (08:00 -0800)]
ASoC: bcm2835-i2s: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201101160037.2295512-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 30 Oct 2020 19:39:35 +0000 (19:39 +0000)]
Merge series "Add rt1015 support to CML boards" from Brent Lu <brent.lu@intel.com>:
First patch adds tdm 4-slot 100fs DAI setting to avoid jitter of using
64fs on CML boards. Second patch is a DMI quirk for HP Dooly.
Changes since v1:
-Add comment on Dooly's DMI quirk
Brent Lu (2):
ASoC: intel: sof_rt5682: Add support for cml_rt1015_rt5682
ASoC: intel: sof_rt5682: Add quirk for Dooly
sound/soc/intel/boards/sof_rt5682.c | 65 +++++++++++++++++--
.../intel/common/soc-acpi-intel-cml-match.c | 13 ++++
2 files changed, 73 insertions(+), 5 deletions(-)
--
2.17.1
Brent Lu [Fri, 30 Oct 2020 17:05:59 +0000 (01:05 +0800)]
ASoC: intel: sof_rt5682: Add quirk for Dooly
This DMI product family string of this board is "Google_Hatch" so the
DMI quirk will take place. However, this board is using rt1015 speaker
amp instead of max98357a specified in the quirk. Therefore, we need an
new DMI quirk for this board.
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/20201030170559.20370-3-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Brent Lu [Fri, 30 Oct 2020 17:05:58 +0000 (01:05 +0800)]
ASoC: intel: sof_rt5682: Add support for cml_rt1015_rt5682
This patch adds the driver data and updates quirk info for cml with
rt1015 speaker amp and rt5682 headset codec. Due to different mclk
frequency on JSL and CML, we need to use 4 slot TDM 100fs to avoid
the SSP m/n counter.
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/20201030170559.20370-2-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Clément Péron [Fri, 30 Oct 2020 14:46:47 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Document H3 with missing RX channel possibility
Like A83T the Allwinner H3 doesn't have the DMA reception available for
some audio interfaces.
As it's already documented for A83T convert this to an enum and add the H3
interface.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-15-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jernej Skrabec [Fri, 30 Oct 2020 14:46:43 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Add H6 compatible
H6 I2S is very similar to H3, except that it supports up to 16 channels
and thus few registers have fields on different position.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-11-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Clément Péron [Fri, 30 Oct 2020 14:46:42 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: fix coding-style for callback definition
Checkpatch script produces warning:
WARNING: function definition argument 'const struct sun4i_i2s *'
should also have an identifier name.
Let's fix this by adding identifier name to get_bclk_parent_rate()
and set_fmt() callback definition.
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-10-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Samuel Holland [Fri, 30 Oct 2020 14:46:41 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Fix setting of FIFO modes
Because SUN4I_I2S_FIFO_CTRL_REG is volatile, writes done while the
regmap is cache-only are ignored. To work around this, move the
configuration to a callback that runs while the ASoC core has a
runtime PM reference to the device.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-9-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Clément Péron [Fri, 30 Oct 2020 14:46:40 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Fix sun8i volatile regs
The FIFO TX reg is volatile and sun8i i2s register
mapping is different from sun4i.
Even if in this case it's doesn't create an issue,
Avoid setting some regs that are undefined in sun8i.
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-8-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Marcus Cooper [Fri, 30 Oct 2020 14:46:39 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Add 20 and 24 bit support
Extend the functionality of the driver to include support of 20 and
24 bits per sample.
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-7-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Marcus Cooper [Fri, 30 Oct 2020 14:46:38 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Set sign extend sample
On the newer SoCs such as the H3 and A64 this is set by default
to transfer a 0 after each sample in each slot. However the A10
and A20 SoCs that this driver was developed on had a default
setting where it padded the audio gain with zeros.
This isn't a problem while we have only support for 16bit audio
but with larger sample resolution rates in the pipeline then SEXT
bits should be cleared so that they also pad at the LSB. Without
this the audio gets distorted.
Set sign extend sample for all the sunxi generations even if they
are not affected. This will keep consistency and avoid relying on
default.
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-6-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Clément Péron [Fri, 30 Oct 2020 14:46:37 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit
We are actually using a complex formula to just return a bunch of
simple values. Also this formula is wrong for sun4i when calling
get_wss() the function return 4 instead of 3.
Replace this with a simpler switch case.
Also drop the i2s params which is unused and return a simple int as
returning an error code could be out of range for an s8 and there is
no optim to return a s8 here.
Fixes:
619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-5-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jernej Skrabec [Fri, 30 Oct 2020 14:46:36 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Add support for H6 I2S
H6 I2S is very similar to that in H3, except it supports up to 16
channels.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-4-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Clément Péron [Fri, 30 Oct 2020 14:46:35 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Change set_chan_cfg() params
As slots and slot_width can be set manually using set_tdm().
These values are then kept in sun4i_i2s struct.
So we need to check if these values are set or not.
This is not done actually and will trigger a bug.
For example, if we set to the simple soundcard in the device-tree
dai-tdm-slot-width = <32> and then start a stream using S16_LE,
currently we would calculate BCLK for 32-bit slots, but program
lrck_period for 16-bit slots, making the sample rate double what we
expected.
To fix this, we need to check if these values are set or not but as
this logic is already done by the caller. Avoid duplicating this
logic and just pass the required values as params to set_chan_cfg().
Suggested-by: Samuel Holland <samuel@sholland.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Link: https://lore.kernel.org/r/20201030144648.397824-3-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Clément Péron [Fri, 30 Oct 2020 14:46:34 +0000 (15:46 +0100)]
ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode
Left and Right justified mode are computed using the same formula
as DSP_A and DSP_B mode.
Which is wrong and the user manual explicitly says:
LRCK_PERDIOD:
PCM Mode: Number of BCLKs within (Left + Right) channel width.
I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each
individual channel width(Left or Right)
Fix this by using the same formula as the I2S mode.
Fixes:
7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats")
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20201030144648.397824-2-peron.clem@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Michał Mirosław [Wed, 28 Oct 2020 22:48:05 +0000 (23:48 +0100)]
ASoC: tegra20-spdif: remove "default m"
Make tegra20-spdif default to N as all other drivers do.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Fixes:
774fec338bfc ("ASoC: Tegra: Implement SPDIF CPU DAI")
Link: https://lore.kernel.org/r/8756eb5aac561173aa222c9cb64dd314ab1b1f9b.1603925200.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Thu, 29 Oct 2020 10:15:50 +0000 (10:15 +0000)]
ASoC: qcom: sm8250: update compatible with new bindings
Update compatible string as board compatible and device compatible
should not be same!. Make the driver inline with the new bindings.
Fixes:
aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support")
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201029101550.31695-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Thu, 29 Oct 2020 10:15:49 +0000 (10:15 +0000)]
ASoC: qcom: dt-bindings: sm8250: update compatibles
Update compatible string as board compatible and device compatible
should not be same!. New compatible is now suffixed with -sndcard
to be inline with other Qualcomm Sound cards.
This also fixes the warnings/error reported by dt_binding_check.
Fixes:
765c37598494 ("ASoC: qcom: dt-bindings: Add SM8250 sound card bindings")
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201029101550.31695-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Wed, 28 Oct 2020 11:51:12 +0000 (11:51 +0000)]
ASoC: qcom: fix unsigned int bitwidth compared to less than zero
The check for an error return from the call to snd_pcm_format_width
is never true as the unsigned int bitwidth can never be less than
zero. Fix this by making bitwidth an int.
Fixes:
7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201028115112.109017-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 28 Oct 2020 14:20:01 +0000 (14:20 +0000)]
ASoC: qcom: sm8250: Fix array out of bounds access
Static analysis Coverity had detected a potential array out-of-bounds
write issue due to the fact that MAX AFE port Id was set to 16 instead
of using AFE_PORT_MAX macro.
Fix this by properly using AFE_PORT_MAX macro.
Fixes:
aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201028142001.22431-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 27 Oct 2020 20:36:10 +0000 (20:36 +0000)]
Merge series "Add documentation and machine driver for SC7180 sound card" from Cheng-Yi Chiang <cychiang@chromium.org>:
Note:
- The machine driver patch is made by the collaboration of
Cheng-Yi Chiang <cychiang@chromium.org>
Rohit kumar <rohitkr@codeaurora.org>
Ajit Pandey <ajitp@codeaurora.org>
But Ajit has left codeaurora.
Changes from v1 to v2:
- Ducumentation: Addressed all suggestions from Doug.
- Machine driver:
- Fix comment style for license.
- Sort includes.
- Remove sc7180_snd_hw_params.
- Remove sc7180_dai_init and use aux device instead for headset jack registration.
- Statically define format for Primary MI2S.
- Atomic is not a concern because there is mutex in card to make sure
startup and shutdown happen sequentially.
- Fix missing return -EINVAL in startup.
- Use static sound card.
- Use devm_kzalloc to avoid kfree.
Changes from v2 to v3:
- Ducumentation: Addressed suggestions from Srini.
- Machine driver:
- Reuse qcom_snd_parse_of to parse properties.
- Remove playback-only and capture-only.
- Misc fixes to address comments.
Changes from v3 to v4:
- Ducumentation: Addressed suggestions from Rob.
- Remove definition of dai.
- Use 'sound-dai: true' for sound-dai schema.
- Add reg property to pass 'make dt_binding_check' check although reg is not used in the driver.
- Machine driver:
- Add Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Changes from v4 to v5:
- Documentation: Addressed suggestions from Rob.
- Add definition for "#address-cells" and "#size-cells".
- Add additionalProperties: false
- Add required properties.
Changes from v5 to v6:
- Documentation: Addressed suggestions from Rob.
- Drop contains in compatible strings.
- Only allow dai-link@[0-9]
- Remove reg ref since it has a type definition already.
Changes from v6 to v7
- Documentation:
- Add headset-jack and hdmi-jack to specify the codec
responsible for jack detection.
- HDMI codec driver:
- Use component set_jack ops instead of exporting hdmi_codec_set_jack_detect.
- Machine driver:
- Removed aux device following Stephan's suggestion.
- Use headset-jack and hdmi-jack to specify the codec
responsible for jack detection.
- Add support for HDMI(actually DP) playback.
Changes from v7 to v8
- Documentation:
- Remove headset-jack and hdmi-jack.
- Machine driver:
- Let machine driver decide whether there is a jack on the DAI.
Changes from v8 to v9
- hdmi-codec driver:
- Fixed the naming.
- Machine driver:
- Fixed unused fields.
- Moved snd_soc_card_set_drvdata
- Keep the naming of HDMI as dai name until v5 of lpass-hdmi patches.
Changes from v9 to v10
- Documentation:
- Let compatible string be more specific for board configuration to allow
for future changes.
- Machine driver:
- Fixed unused include and macro.
- Add temporary macro SC7180_LPASS_DP for future change in sc7180-lpass.h.
- Let sound card be dynamically allocated.
- Change compatible string accordingly.
Changes from v10 to v11
- Machine driver:
- Use temporary macro LPASS_DP_RX for future change in sc7180-lpass.h.
Changes from v11 to v12
- Documentation:
- Change the file and title name for new compatible string google,sc7180-trogdor.
- Change the example of model name.
- Machine driver:
- Use the definitaion of index LPASS_DP_RX in sc7180-lpass.h.
- Fix for compatible string.
- Replace a comma with semicolon.
Ajit Pandey (1):
ASoC: qcom: sc7180: Add machine driver for sound card registration
Cheng-Yi Chiang (1):
ASoC: google: dt-bindings: Add sc7180-trogdor machine bindings
.../bindings/sound/google,sc7180-trogdor.yaml | 130 +++++++++
sound/soc/qcom/Kconfig | 12 +
sound/soc/qcom/Makefile | 2 +
sound/soc/qcom/sc7180.c | 266 ++++++++++++++++++
4 files changed, 410 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml
create mode 100644 sound/soc/qcom/sc7180.c
--
2.29.0.rc2.309.g374f81d7ae-goog
Srinivas Kandagatla [Tue, 27 Oct 2020 11:15:26 +0000 (11:15 +0000)]
ASoC: qcom: qdsp6: make use of devm_of_platform_populate
make use of devm_of_platform_populate to remove some redundant code!
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201027111526.12326-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajit Pandey [Tue, 27 Oct 2020 03:22:34 +0000 (11:22 +0800)]
ASoC: qcom: sc7180: Add machine driver for sound card registration
Add new driver to register sound card on sc7180 trogdor board and
do the required configuration for lpass cpu dai and external codecs
connected over MI2S interfaces.
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201027032234.1705835-3-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Cheng-Yi Chiang [Tue, 27 Oct 2020 03:22:33 +0000 (11:22 +0800)]
ASoC: google: dt-bindings: Add sc7180-trogdor machine bindings
Add devicetree bindings documentation file for sc7180 sound card.
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20201027032234.1705835-2-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 26 Oct 2020 18:37:17 +0000 (18:37 +0000)]
Merge series "ASoC: SOF: cleanups for 5.10" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:
Series with multiple code cleanups, plus one fix to remove
unnecessary kernel warnings related to firmware loading.
Bard Liao (1):
ASoC: SOF: loader: handle all SOF_IPC_EXT types
Pierre-Louis Bossart (3):
ASoC: SOF: control: remove const in sizeof()
ASoC: SOF: topology: remove const in sizeof()
ASoC: SOF: sof-audio: remove goto used for force-nocodec support
sound/soc/sof/control.c | 20 ++++++++++----------
sound/soc/sof/loader.c | 5 +++++
sound/soc/sof/sof-audio.c | 10 +++-------
sound/soc/sof/topology.c | 2 +-
4 files changed, 19 insertions(+), 18 deletions(-)
--
2.27.0
Mark Brown [Mon, 26 Oct 2020 18:37:16 +0000 (18:37 +0000)]
Merge series "DAI driver for new XCVR IP" from "Viorel Suman (OSS)" <viorel.suman@oss.nxp.com>
Viorel Suman <viorel.suman@nxp.com>:
From: Viorel Suman <viorel.suman@nxp.com>
DAI driver for new XCVR IP found in i.MX8MP.
Viorel Suman (2):
ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver
ASoC: dt-bindings: fsl_xcvr: Add document for XCVR
Changes since v1:
- improved 6- and 12-ch layout comment
- used regmap polling function, improved
clocks handling in runtime_resume
- added FW size check in FW load function,
improved IRQ handler, removed dummy IRQ handlers
- fixed yaml file
Changes since v2:
- used devm_reset_control_get_exclusive instead of of_reset_control_get
- moved reset_control_assert into runtime_suspend
Changes since v3:
- removed "firmware-name" DTS property from both documentation and
source code by porting it into SoC specific 'compatible' data structure.
.../devicetree/bindings/sound/fsl,xcvr.yaml | 104 ++
sound/soc/fsl/Kconfig | 10 +
sound/soc/fsl/Makefile | 2 +
sound/soc/fsl/fsl_xcvr.c | 1359 +++++++++++++++++
sound/soc/fsl/fsl_xcvr.h | 266 ++++
5 files changed, 1741 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/fsl,xcvr.yaml
create mode 100644 sound/soc/fsl/fsl_xcvr.c
create mode 100644 sound/soc/fsl/fsl_xcvr.h
--
2.26.2
Mark Brown [Mon, 26 Oct 2020 18:37:15 +0000 (18:37 +0000)]
Merge series "ASoC: merge soc_pcm_hw_param() rollback and soc_pcm_hw_free()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
soc_pcm_hw_params() does rollback when failed (A),
but, it is almost same as soc_pcm_hw_free().
static int soc_pcm_hw_params(xxx)
{
...
if (ret < 0)
goto xxx_err;
...
return ret;
^ component_err:
| ...
| interface_err:
(A) ...
| codec_err:
| ...
v return ret;
}
This kind of duplicated code can be a hotbed of bugs,
thus, this patch-set share soc_pcm_hw_free() and rollback.
Kuninori Morimoto (6):
ASoC: soc.h: remove for_each_rtd_dais_rollback()
ASoC: soc-pcm: move soc_pcm_hw_free() next to soc_pcm_hw_params()
ASoC: soc-link: add mark for snd_soc_link_hw_params/free()
ASoC: soc-component: add mark for snd_soc_pcm_component_hw_params/free()
ASoC: soc-dai: add mark for snd_soc_dai_hw_params/free()
ASoC: soc-pcm: add soc_pcm_hw_clean() and call it from soc_pcm_hw_params/free()
include/sound/soc-component.h | 6 +-
include/sound/soc-dai.h | 4 +-
include/sound/soc-link.h | 3 +-
include/sound/soc.h | 7 +-
sound/soc/soc-component.c | 19 ++---
sound/soc/soc-dai.c | 13 +++-
sound/soc/soc-dapm.c | 4 +-
sound/soc/soc-link.c | 12 +++-
sound/soc/soc-pcm.c | 131 ++++++++++++++--------------------
9 files changed, 97 insertions(+), 102 deletions(-)
--
2.25.1
Mark Brown [Mon, 26 Oct 2020 18:37:13 +0000 (18:37 +0000)]
Merge series "ASoC: qcom: add support for QRB5165 RB5 machine" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
This patchset adds support to Qualcomm Robotics RB5 Development Kit based on
QRB5165 Robotics SoC. This board has 2 WSA881X smart speakers with onboard
DMIC connected to internal LPASS codec via WSA and VA macros respectively.
Srinivas Kandagatla (2):
ASoC: qcom: dt-bindings: Add SM8250 sound card bindings
ASoC: qcom: sm8250: add sound card qrb5165-rb5 support
.../bindings/sound/qcom,sm8250.yaml | 161 +++++++++++++
sound/soc/qcom/Kconfig | 11 +
sound/soc/qcom/Makefile | 2 +
sound/soc/qcom/sm8250.c | 228 ++++++++++++++++++
4 files changed, 402 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
create mode 100644 sound/soc/qcom/sm8250.c
--
2.21.0
Mark Brown [Mon, 26 Oct 2020 18:37:12 +0000 (18:37 +0000)]
Merge series "use semicolons rather than commas to separate statements" from Julia Lawall <Julia.Lawall@inria.fr>:
These patches replace commas by semicolons. This was done using the
Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below.
This semantic patch ensures that commas inside for loop headers will not be
transformed. It also doesn't touch macro definitions.
Coccinelle ensures that braces are added as needed when a single-statement
branch turns into a multi-statement one.
This semantic patch has a few false positives, for variable delcarations
such as:
LIST_HEAD(x), *y;
The semantic patch could be improved to avoid these, but for the moment
they have been removed manually (2 occurrences).
// <smpl>
@initialize:ocaml@
@@
let infunction p =
(* avoid macros *)
(List.hd p).current_element <> "something_else"
let combined p1 p2 =
(List.hd p1).line_end = (List.hd p2).line ||
(((List.hd p1).line_end < (List.hd p2).line) &&
((List.hd p1).col < (List.hd p2).col))
@bad@
statement S;
declaration d;
position p;
@@
S@p
d
// special cases where newlines are needed (hope for no more than 5)
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@
- e1@p1,@S@p e2@p2;
+ e1; e2;
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@
- e1@p1,@S@p e2@p2;
+ e1; e2;
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@
- e1@p1,@S@p e2@p2;
+ e1; e2;
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@
- e1@p1,@S@p e2@p2;
+ e1; e2;
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@
- e1@p1,@S@p e2@p2;
+ e1; e2;
@r@
expression e1,e2;
statement S;
position p != bad.p;
@@
e1 ,@S@p e2;
@@
expression e1,e2;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && not(combined p1 p2) };
statement S;
position r.p;
@@
e1@p1
-,@S@p
+;
e2@p2
... when any
// </smpl>
---
sound/firewire/fireworks/fireworks_pcm.c | 2 +-
sound/pci/hda/patch_ca0132.c | 2 +-
sound/pci/hda/patch_hdmi.c | 2 +-
sound/soc/codecs/madera.c | 4 ++--
sound/soc/codecs/wm8350.c | 3 ++-
sound/soc/intel/boards/bytcr_rt5651.c | 2 +-
sound/soc/samsung/snow.c | 2 +-
sound/soc/soc-dapm.c | 2 +-
sound/soc/sof/intel/hda-dsp.c | 2 +-
9 files changed, 11 insertions(+), 10 deletions(-)
Mark Brown [Mon, 26 Oct 2020 18:37:11 +0000 (18:37 +0000)]
Merge series "ASoC: sun8i-codec: support for AIF2 and AIF3" from Samuel Holland <samuel@sholland.org>:
This series adds support the other two AIFs present in the sun8i codec,
which can be used for codec2codec DAI links.
This series first fills out the DAI driver, removing assumptions that
were made for AIF1 (16 bits, 2 channels, certain clock inversions). Some
new logic is required to handle 3 DAIs and the ADC/DAC sharing the same
clock. Finally, it adds the new DAIs, and hooks them up with DAPM
widgets and routes per the hardware topology.
To minimize the number of patches in this series, related device tree
patches (increasing #sound-dai-cells, adding new DAI links) will be sent
separately.
Changes from v1:
- Patches 1-8 from v1 (DAPM changes) were merged
- Prefixed AIF constants with "SUN8I_CODEC_" [1, 7, 10, 16, 17]
- Renamed variables in sun8i_codec_set_fmt for clarity [3]
- Update sysclk->sysclk_rate if later calls to hw_params change the
sample rate (thanks Chen-Yu for reminding me of this) [11]
- Select COMMON_CLK for clk_set_rate_exclusive [12]
- Add comments and hopefully clarify the clock protection logic [12]
- Make the error message more concise and put it on one line [12]
- Drop the "reg" variable holding SUN8I_AIF_CLK_CTRL(dai->id) [15]
- Rename "div_reg" to "clk_reg" and adjust comments for clarity [17]
- Improve the AIF2/AIF3 rate mismatch error message [17]
- Minor grammar/wording fixes in commit messages [2, 4, 7, 8, 16, 17]
- Added Maxime's Acked-by: [1-2, 4-9, 11, 13-14, 16]
Samuel Holland (17):
ASoC: sun8i-codec: Prepare to extend the DAI driver
ASoC: sun8i-codec: Program DAI format before clock inversion
ASoC: sun8i-codec: Enable all supported clock inversions
ASoC: sun8i-codec: Use the provided word size
ASoC: sun8i-codec: Round up the LRCK divisor
ASoC: sun8i-codec: Correct the BCLK divisor calculation
ASoC: sun8i-codec: Support the TDM slot binding
ASoC: sun8i-codec: Enforce symmetric DAI parameters
ASoC: sun8i-codec: Enable all supported sample rates
ASoC: sun8i-codec: Automatically set the system sample rate
ASoC: sun8i-codec: Constrain to compatible sample rates
ASoC: sun8i-codec: Protect the clock rate while streams are open
ASoC: sun8i-codec: Require an exact BCLK divisor match
ASoC: sun8i-codec: Enable all supported PCM formats
ASoC: sun8i-codec: Generalize AIF clock control
ASoC: sun8i-codec: Add the AIF2 DAI, widgets, and routes
ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes
sound/soc/sunxi/Kconfig | 1 +
sound/soc/sunxi/sun8i-codec.c | 834 ++++++++++++++++++++++++++++------
2 files changed, 699 insertions(+), 136 deletions(-)
--
2.26.2
Mark Brown [Mon, 26 Oct 2020 18:37:10 +0000 (18:37 +0000)]
Merge series "dt-bindings: stm32: convert audio dfsdm to json-schema" from Olivier Moysan <olivier.moysan@st.com>:
Some audio properties documented in st,stm32-adfsdm.txt are already documented
in Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml bindings.
Move remaining properties from st,stm32-adfsdm.txt to st,stm32-dfsdm-adc.yaml,
and remove st,stm32-adfsdm.txt.
Changes in v2:
- Complete st,stm32-dfsdm-adc.yaml rather than converting st,stm32-adfsdm.txt
Olivier Moysan (2):
dt-bindings: stm32: dfsdm: update audio properties
dt-bindings: stm32: dfsdm: remove stm32-adfsdm.txt binding
.../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 7 ++-
.../bindings/sound/st,stm32-adfsdm.txt | 63 -------------------
2 files changed, 5 insertions(+), 65 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
--
2.17.1