Commit graph

966194 commits

Author SHA1 Message Date
Sameer Pujar
d09c774f2f
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>
2020-11-10 17:28:22 +00:00
Sameer Pujar
930dd47d74
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>
2020-11-10 17:28:21 +00:00
Sameer Pujar
c21cbb526c
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>
2020-11-10 17:28:20 +00:00
Sameer Pujar
e6aeb375d2
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>
2020-11-10 17:28:19 +00:00
Sameer Pujar
aa293777bf
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>
2020-11-10 17:28:18 +00:00
Sameer Pujar
3256ef984b
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>
2020-11-10 17:28:18 +00:00
Mark Brown
513e22f384
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
2020-11-10 15:57:39 +00:00
Mark Brown
50dc5f5c73
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
2020-11-10 15:57:38 +00:00
Mark Brown
068904bdb5
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
2020-11-10 15:57:37 +00:00
David Lin
9352d45a6e
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>
2020-11-10 14:30:06 +00:00
David Lin
4d1a9952dd
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>
2020-11-10 14:30:05 +00:00
Kuninori Morimoto
7428d8c8bd
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>
2020-11-10 14:26:00 +00:00
Kuninori Morimoto
eb84959ab8
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>
2020-11-10 14:25:59 +00:00
Ajye Huang
3cfbf07c6d
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 b7a742cff3 ("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>
2020-11-10 14:25:23 +00:00
Ajye Huang
0e38d93493
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>
2020-11-10 14:25:22 +00:00
Shane.Chien
0865137380
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>
2020-11-10 14:24:45 +00:00
Shane.Chien
64a70744b7
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>
2020-11-10 14:24:45 +00:00
Mark Brown
354e592a50
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
2020-11-09 19:43:31 +00:00
Shengjiu Wang
1cc3245b2c
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>
2020-11-09 17:43:15 +00:00
Cheng-Yi Chiang
b2fc302930
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>
2020-11-09 17:43:15 +00:00
Jack Yu
95370acdb8
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>
2020-11-09 17:43:14 +00:00
Peter Ujfalusi
1b4fb70e5b
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>
2020-11-06 17:46:03 +00:00
Peter Ujfalusi
1125d92599
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>
2020-11-06 17:46:03 +00:00
Peter Ujfalusi
db8793a39b
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>
2020-11-06 17:46:02 +00:00
Peter Ujfalusi
372c4bd11d
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>
2020-11-06 17:46:01 +00:00
Mark Brown
8ca199309f
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
2020-11-06 11:21:24 +00:00
Kuninori Morimoto
8d96ec9ba9
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>
2020-11-05 19:11:03 +00:00
Kuninori Morimoto
2d8fc97364
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>
2020-11-05 19:11:03 +00:00
Kuninori Morimoto
97198614f6
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>
2020-11-05 19:11:02 +00:00
Shengjiu Wang
8a24c834c0
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>
2020-11-05 17:06:16 +00:00
Shengjiu Wang
40f4c56d08
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>
2020-11-05 17:06:15 +00:00
Xu Wang
b8f9495776
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>
2020-11-05 14:52:35 +00:00
Xu Wang
ec4177c834
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>
2020-11-05 14:52:35 +00:00
Srinivas Kandagatla
ee5d28e735
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: 520a1c396d ("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>
2020-11-05 14:52:34 +00:00
Cezary Rojewski
4c22b80f61
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: acbf27746e ("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>
2020-11-05 14:52:33 +00:00
Zou Wei
df3d6390fa
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>
2020-11-05 14:52:32 +00:00
Sudip Mukherjee
8bfe8c9675
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>
2020-11-05 14:52:31 +00:00
Srinivas Kandagatla
20f64a1db8
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: 7cb37b7bd0 ("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>
2020-11-05 14:52:30 +00:00
Mark Brown
bc3955c99c
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
2020-11-04 20:40:40 +00:00
Mark Brown
860bfa6d66
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
2020-11-04 20:40:39 +00:00
Shuming Fan
7e9a2387c5
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>
2020-11-04 17:51:55 +00:00
Jiaxin Yu
4a23212212
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>
2020-11-04 17:51:53 +00:00
Jiaxin Yu
18b13ff23f
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>
2020-11-04 17:51:52 +00:00
Jiaxin Yu
1afc60e00d
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>
2020-11-04 17:51:51 +00:00
Jiaxin Yu
52fcd65414
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>
2020-11-04 17:51:50 +00:00
Jiaxin Yu
c63b786601
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>
2020-11-04 17:51:49 +00:00
Jiaxin Yu
607ac48595
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>
2020-11-04 17:51:48 +00:00
Jiaxin Yu
2c37b4ed73
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>
2020-11-04 17:51:47 +00:00
Jiaxin Yu
125ab5d588
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>
2020-11-04 17:51:47 +00:00
Jiaxin Yu
682c5a72a2
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>
2020-11-04 17:51:46 +00:00