]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/log
mirror_ubuntu-jammy-kernel.git
5 years agoMerge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Thu, 13 Dec 2018 14:36:46 +0000 (14:36 +0000)]
Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.21 intel dep

5 years agoMAINTAINERS: Add Amlogic sound drivers entry
Jerome Brunet [Tue, 11 Dec 2018 13:47:13 +0000 (14:47 +0100)]
MAINTAINERS: Add Amlogic sound drivers entry

Add sound/soc/meson drivers entry for Amlogic audio drivers.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: meson: add axg spdif input
Jerome Brunet [Tue, 11 Dec 2018 13:47:12 +0000 (14:47 +0100)]
ASoC: meson: add axg spdif input

Add support for the spdif input decoder of the axg SoC family

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: meson: add axg spdif input DT binding documentation
Jerome Brunet [Tue, 11 Dec 2018 13:47:11 +0000 (14:47 +0100)]
ASoC: meson: add axg spdif input DT binding documentation

Add the DT binding documentation for axg's SPDIF input.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: meson: axg-toddr: add support for spdifin backend
Jerome Brunet [Tue, 11 Dec 2018 13:47:10 +0000 (14:47 +0100)]
ASoC: meson: axg-toddr: add support for spdifin backend

add IEC958_SUBFRAME_LE to the list of format accepted by the fifo frontend.

As opposed to what was initially noted in the toddr dai driver, the spdifin
does not place the msb at bit 28, it just output a whole spdif subframe.

Placing the msb at bit 28 in the toddr driver just filters out the parity,
user, channel status and validity bits. It is better to just provide the
whole spdif subframe to the userspace and let the iec958 plugin deal with
it.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card: Dereference pointer for memcpy sizeof in asoc_simple_card_probe
Nathan Chancellor [Thu, 13 Dec 2018 05:15:20 +0000 (14:15 +0900)]
ASoC: simple-card: Dereference pointer for memcpy sizeof in asoc_simple_card_probe

Commit 4fb7f4df49d3 ("ASoC: simple-card: use cpu/codec pointer on
simple_dai_props") updated {cpu,codec}_dai to be pointers in struct
simple_dai_props but didn't update these locations to dereference the
pointers.
This patch fixup it for non DT simple-card use case.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: fsl-sai: Fix typo in "transmitter"
Fabio Estevam [Thu, 13 Dec 2018 10:36:38 +0000 (08:36 -0200)]
ASoC: fsl-sai: Fix typo in "transmitter"

Fix the spelling of "transmitter".

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: fsl: Fix SND_SOC_EUKREA_TLV320 build error on i.MX8M
Fabio Estevam [Thu, 13 Dec 2018 02:08:38 +0000 (00:08 -0200)]
ASoC: fsl: Fix SND_SOC_EUKREA_TLV320 build error on i.MX8M

eukrea-tlv320.c machine driver runs on non-DT platforms
and include <asm/mach-types.h> header file in order to be able
to use some machine_is_eukrea_xxx() macros.

Building it for ARM64 causes the following build error:

sound/soc/fsl/eukrea-tlv320.c:28:10: fatal error: asm/mach-types.h: No such file or directory

Avoid this error by not allowing to build the SND_SOC_EUKREA_TLV320
driver when ARM64 is selected.

This is needed in preparation for the i.MX8M support.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: remove RSND_REG_ from rsnd_reg
Kuninori Morimoto [Wed, 12 Dec 2018 07:03:58 +0000 (16:03 +0900)]
ASoC: rsnd: remove RSND_REG_ from rsnd_reg

Current rsnd is using RSND_REG_xxx for register naming,
and using RSND_REG_##f style macro for read/write.
The biggest reason why it uses this style is that
we can avoid non-existing register access.
But, its demerit is sequential register access code will
be very ugly.
Current rsnd driver is well tested, so, let's remove RSND_REG_
from rsnd_reg, and cleanup sequential register access code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: care multi DPCM codec_conf
Kuninori Morimoto [Tue, 11 Dec 2018 03:25:37 +0000 (03:25 +0000)]
ASoC: simple-scu-card: care multi DPCM codec_conf

Current simple-scu-card didn't care about codec_conf
for multi DPCM case. This patch cares it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: use cpu/codec pointer on graph_dai_props
Kuninori Morimoto [Tue, 11 Dec 2018 03:25:27 +0000 (03:25 +0000)]
ASoC: simple-scu-card: use cpu/codec pointer on graph_dai_props

In  DPCM case, it uses CPU-dummy / dummy-Codec dai links, and
non DPCM case, it uses CPU-Codec dai links.

Now, we want to merge simple-card and simple-scu-card.

These sound cards are using silimar but not same logic on each functions.
Then, of course we want to share same logic.
To compromise, this patch uses cpu/codec pointer on simple-scu-card.
It is same logic with simple-card, thus easy merging.
This is prepare for merging simple card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: tidyup "convert-rate/channels" parsing
Kuninori Morimoto [Tue, 11 Dec 2018 03:25:18 +0000 (03:25 +0000)]
ASoC: simple-scu-card: tidyup "convert-rate/channels" parsing

simple-scu-card.c is supporting "convert-rate/channels" which is
used for DPCM.
But, sound card might have multi codecs, and each codec might need
each convert-rate/channels.

This patch supports each codec's convert-rate/channles support.
top node convert-rate/channels will overwrite settings if exist.

It can't support each codec's convert-rate/channels if sound card had
multi codecs without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: care link / dai count
Kuninori Morimoto [Tue, 11 Dec 2018 03:25:08 +0000 (03:25 +0000)]
ASoC: simple-scu-card: care link / dai count

In DPCM case, it uses CPU-dummy / dummy-Codec dai links.
If sound card is caring only DPCM, link count = dai count,
but, if non DPCM case, link count != dai count.
Now, we want to merge simple-card and simple-scu-card,
then, we need to care both link / dai count more carefly
This patch cares it, and prepare for merging simple card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: add dai-link support
Kuninori Morimoto [Tue, 11 Dec 2018 03:24:57 +0000 (03:24 +0000)]
ASoC: simple-scu-card: add dai-link support

simple-card is supporting dai-link support, but simple-scu-card
doesn't have it.
This patch support it. This is prepare for merging simple-card
and simple-scu-card.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: tidyup asoc_simple_card_parse_daifmt() timing
Kuninori Morimoto [Tue, 4 Dec 2018 08:20:13 +0000 (08:20 +0000)]
ASoC: simple-scu-card: tidyup asoc_simple_card_parse_daifmt() timing

Current simple-scu-card driver is parsing codec position for DPCM
and consider DAI format. But, current operation is doing totally pointless,
because it should be called for each CPU/Codec pair.
Let's tidyup asoc_simple_card_parse_daifmt() timing.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card: use cpu/codec pointer on simple_dai_props
Kuninori Morimoto [Tue, 4 Dec 2018 08:19:43 +0000 (08:19 +0000)]
ASoC: simple-card: use cpu/codec pointer on simple_dai_props

In  DPCM case, it uses CPU-dummy / dummy-Codec dai links, and
non DPCM case, it uses CPU-Codec dai links.

Now, we want to merge simple-card and simple-scu-card.

These sound cards are using silimar but not same logic on each functions.
Then, of course we want to share same logic.
To compromise, this patch uses cpu/codec pointer on simple-card.
It is same logic with simple-scu-card, thus easy merging.
This is prepare for merging audio card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card-utils: fix build warning without CONFIG_OF
Arnd Bergmann [Mon, 10 Dec 2018 20:46:10 +0000 (21:46 +0100)]
ASoC: simple-card-utils: fix build warning without CONFIG_OF

When CONFIG_OF is disabled, of_graph_parse_endpoint() does not
initialize 'info', and gcc can see that:

sound/soc/generic/simple-card-utils.c: In function 'asoc_simple_card_parse_graph_dai':
sound/soc/generic/simple-card-utils.c:284:13: error: 'info.port' may be used uninitialized in this function [-Werror=maybe-uninitialized]

It's probably best to check the return code anyway, and that also
takes care of the warning.

Fixes: b6f3fc005a2c ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: sdm845: add rt5663 codec select
Arnd Bergmann [Mon, 10 Dec 2018 20:49:28 +0000 (21:49 +0100)]
ASoC: sdm845: add rt5663 codec select

Calling into the codec driver adds a dependency on that being reachable
from the module:

ERROR: "rt5663_sel_asrc_clk_src" [sound/soc/qcom/snd-soc-sdm845.ko]
undefined!

Add the corresponding select statement, as it is done in the other user
(Intel).

Fixes: f7485875a687 ("ASoC: sdm845: Add configuration for headset codec")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping
Zhuohao Lee [Mon, 10 Dec 2018 04:32:13 +0000 (12:32 +0800)]
ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping

From the da7219 spec, the button A, B, C and D are remapped to
0, 1, 2 and 3 respectively where button A is KEY_PLAYPAUSE,
B is KEY_VOLUMEUP, C is KEY_VOLUMEDOWN and D is KEY_VOICECOMMAND.

Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Signed-off-by: Max Chang <changmax@chromium.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: bytcr_rt5640: Add quirk for the Point of View Mobii TAB-P1005W-232
Hans de Goede [Sat, 8 Dec 2018 13:01:14 +0000 (14:01 +0100)]
ASoC: Intel: bytcr_rt5640: Add quirk for the Point of View Mobii TAB-P1005W-232

Add a quirk for the Point of View Mobii TAB-P1005W-232 v2.0 tablet, this
BYTCR device uses IN1 for its MIC and JD2 for jack-detect, rather then the
default IN3 and JD1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: bytcr_rt5640: Add quirk for the Prowise PT301 tablet
Hans de Goede [Sat, 8 Dec 2018 13:01:13 +0000 (14:01 +0100)]
ASoC: Intel: bytcr_rt5640: Add quirk for the Prowise PT301 tablet

Add a quirk for the Prowise PT301 tablet, this BYTCR tablet has no CHAN
package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which
is the default for BYTCR devices.

Also it uses IN1 for its MIC and JD2 for jack-detect, rather then the
default IN3 and JD1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max9867: Add copyright and module author
Ladislav Michl [Thu, 6 Dec 2018 21:06:38 +0000 (22:06 +0100)]
ASoC: max9867: Add copyright and module author

Driver rewritten, assign copyright notice and change module author
as original one remains silent and I want to be notified about bugs.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: sdm845: Add configuration for headset codec
Cheng-Yi Chiang [Wed, 28 Nov 2018 09:00:36 +0000 (17:00 +0800)]
ASoC: sdm845: Add configuration for headset codec

Set DAI format and sysclk for headset codec.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: sdm845: Add TDM configuration for speaker
Cheng-Yi Chiang [Wed, 28 Nov 2018 09:00:35 +0000 (17:00 +0800)]
ASoC: sdm845: Add TDM configuration for speaker

Set TDM time slots and DAI format for speaker codec.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max9867: Fix signal paths
Ladislav Michl [Tue, 4 Dec 2018 18:21:33 +0000 (19:21 +0100)]
ASoC: max9867: Fix signal paths

Sound capture and line bypass currently do not work as well as
some mixer controls. Fix that by building proper audio paths and
adjusting volume controls to match datasheet.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max9867: Calculate LRCLK divider
Ladislav Michl [Tue, 4 Dec 2018 18:21:04 +0000 (19:21 +0100)]
ASoC: max9867: Calculate LRCLK divider

Drop "Common NI Values Table" and calculate LRCLK divider, then
add allowed rate constraints based on master clock frequency.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max9867: Fix power management
Ladislav Michl [Tue, 4 Dec 2018 18:19:51 +0000 (19:19 +0100)]
ASoC: max9867: Fix power management

Implement set_bias_level to drive shutdown bit, so device is
put to sleep when unused.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max9867: Remove useless assignment
Ladislav Michl [Tue, 4 Dec 2018 18:18:17 +0000 (19:18 +0100)]
ASoC: max9867: Remove useless assignment

ret is assigned later, no need to initialize it.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rt5660: Add a new ACPI match ID
Hui Wang [Thu, 6 Dec 2018 14:52:05 +0000 (22:52 +0800)]
ASoC: rt5660: Add a new ACPI match ID

The Realtek codec ALC3277 is 100% compatible with the codec RT5660
in I2S mode. And on the Dell IoT platform, the codec is ALC3277,
and the HID of the codec in the BIOS is 10EC3277, so adding this
ID to the ACPI match table.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: codecs: ak4104: move to GPIO consumer API
Daniel Mack [Thu, 6 Dec 2018 12:24:57 +0000 (13:24 +0100)]
ASoC: codecs: ak4104: move to GPIO consumer API

Get the reset GPIO through the GPIO consumer API. This allows specifying the
DT property as "reset-gpios" without breaking existing DT users.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dt-bindings: ak4104: use 'reset-gpios' rather than 'reset-gpio'
Daniel Mack [Thu, 6 Dec 2018 12:24:56 +0000 (13:24 +0100)]
ASoC: dt-bindings: ak4104: use 'reset-gpios' rather than 'reset-gpio'

Bindings should use 'reset-gpios', not 'reset-gpio'. The driver needs to
switch to the gpiod consume API to handle this correctly.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: codecs: cs4270: move to GPIO consumer API
Daniel Mack [Thu, 6 Dec 2018 12:24:26 +0000 (13:24 +0100)]
ASoC: codecs: cs4270: move to GPIO consumer API

Get the reset GPIO through the GPIO consumer API. This allows specifying the
DT property as "reset-gpios" without breaking existing DT users.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dt-bindings: cs4270: use 'reset-gpios' rather than 'reset-gpio'
Daniel Mack [Thu, 6 Dec 2018 12:24:25 +0000 (13:24 +0100)]
ASoC: dt-bindings: cs4270: use 'reset-gpios' rather than 'reset-gpio'

Bindings should use 'reset-gpios', not 'reset-gpio'. The driver needs to
switch to the gpiod consume API to handle this correctly.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Use of_node_name_eq for node name comparisons
Rob Herring [Wed, 5 Dec 2018 19:50:49 +0000 (13:50 -0600)]
ASoC: Use of_node_name_eq for node name comparisons

Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

For the FSL ASoC card, the full node names appear to be "ssi", "esai",
and "sai", so there's not any reason to use strstr and of_node_name_eq
can be used instead.

Cc: Timur Tabi <timur@kernel.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: use dma_ops of parent device for acp_audio_dma
Yu Zhao [Tue, 4 Dec 2018 22:42:53 +0000 (15:42 -0700)]
ASoC: use dma_ops of parent device for acp_audio_dma

AMD platform device acp_audio_dma can only be created by parent PCI
device driver (drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c). Pass struct
device of the parent to snd_pcm_lib_preallocate_pages() so
dma_alloc_coherent() can use correct dma_ops. Otherwise, it will
use default dma_ops which is nommu_dma_ops on x86_64 even when
IOMMU is enabled and set to non passthrough mode.

Though platform device inherits some dma related fields during its
creation in mfd_add_device(), we can't simply pass its struct device
to snd_pcm_lib_preallocate_pages() because dma_ops is not among the
inherited fields. Even it were, drivers/iommu/amd_iommu.c would
ignore it because get_device_id() doesn't handle platform device.

This change shouldn't give us any trouble even struct device of the
parent becomes null or represents some non PCI device in the future,
because get_dma_ops() correctly handles null struct device or uses
the default dma_ops if struct device doesn't have it set.

Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: use DMA addr rather than CPU pa for acp_audio_dma
Yu Zhao [Tue, 4 Dec 2018 22:42:52 +0000 (15:42 -0700)]
ASoC: use DMA addr rather than CPU pa for acp_audio_dma

We shouldn't assume CPU physical address we get from page_to_phys()
is same as DMA address we get from dma_alloc_coherent(). On x86_64,
we won't run into any problem with the assumption when dma_ops is
nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled.
And it's most likely different from CPU physical address when AMD
IOMMU is not in passthrough mode.

Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Gnawty
Hans de Goede [Mon, 3 Dec 2018 20:45:14 +0000 (21:45 +0100)]
ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Gnawty

The Gnawty model Chromebook uses pmc_plt_clk_0 instead of pmc_plt_clk_3
for the mclk, just like the Clapper and Swanky models.

This commit adds a DMI based quirk for this.

This fixing audio no longer working on these devices after
commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
that commit fixes us unnecessary keeping unused clocks on, but in case of
the Gnawty that was breaking audio support since we were not using the
right clock in the cht_bsw_max98090_ti machine driver.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201787
Cc: stable@vger.kernel.org
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Reported-and-tested-by: Jaime Pérez <19.jaime.91@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max98373: Added max98373_reset for stable amp reset
Ryan Lee [Fri, 30 Nov 2018 03:21:09 +0000 (03:21 +0000)]
ASoC: max98373: Added max98373_reset for stable amp reset

This patch added max98373_reset function to avoid amp software reset failure and code duplication.
Reset verification step has been added for stable amp reset and it repeats verification maximum 3 times when it is failed.
Chip revision ID is available when the amp is in the idle state which means software reset is completed well.
Additional 10ms delay was added for every retrial and maximum 30ms delay can be applied.

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-card: use cpu/codec pointer on graph_dai_props
Kuninori Morimoto [Fri, 30 Nov 2018 02:07:48 +0000 (02:07 +0000)]
ASoC: audio-graph-card: use cpu/codec pointer on graph_dai_props

In  DPCM case, it uses CPU-dummy / dummy-Codec dai links, and
non DPCM case, it uses CPU-Codec dai links.

Now, we want to merge audio-graph-card and audio-graph-scu-card.

These sound cards are using silimar but not same logic on each functions.
Then, of course we want to share same logic.
To compromise, this patch uses cpu/codec pointer on audio-graph-card.
It is same logic with audio-graph-scu-card, thus easy merging.
This is prepare for merging audio card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: care multi DPCM codec_conf
Kuninori Morimoto [Fri, 30 Nov 2018 02:07:32 +0000 (02:07 +0000)]
ASoC: audio-graph-scu-card: care multi DPCM codec_conf

Current audio-graph-scu-card didn't care about codec_conf
for multi DPCM case. This patch cares it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: use cpu/codec pointer on graph_dai_props
Kuninori Morimoto [Fri, 30 Nov 2018 02:07:15 +0000 (02:07 +0000)]
ASoC: audio-graph-scu-card: use cpu/codec pointer on graph_dai_props

In  DPCM case, it uses CPU-dummy / dummy-Codec dai links, and
non DPCM case, it uses CPU-Codec dai links.

Now, we want to merge audio-graph-card and audio-graph-scu-card.

These sound cards are using silimar but not same logic on each functions.
Then, of course we want to share same logic.
To compromise, this patch uses cpu/codec pointer on audio-graph-scu-card.
It is same logic with audio-graph-card, thus easy merging.
This is prepare for merging audio card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: care link / dai count
Kuninori Morimoto [Fri, 30 Nov 2018 02:06:51 +0000 (02:06 +0000)]
ASoC: audio-graph-scu-card: care link / dai count

In DPCM case, it uses CPU-dummy / dummy-Codec dai links.
If sound card is caring only DPCM, link count = dai count,
but, if non DPCM case, link count != dai count.
Now, we want to merge audio-graph-card and audio-graph-scu-card,
then, we need to care both link / dai count more carefly
This patch cares it, and prepare for merging audio card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting
Kuninori Morimoto [Fri, 30 Nov 2018 02:04:13 +0000 (02:04 +0000)]
ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting

asoc_simple_card_get_dai_id() returns DAI ID, but it is based on
DT node's "endpoint" position.
Almost all cases 1 port has 1 endpoint, thus, it was no problem.
But in reality, port : endpoint = 1 : N, thus, counting endpoint
is BUG, it should based on "port" ID.
This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: add missing TDM Split mode support for simple-card
Kuninori Morimoto [Tue, 4 Dec 2018 08:02:43 +0000 (08:02 +0000)]
ASoC: rsnd: add missing TDM Split mode support for simple-card

commit f69f452243e4e1 ("ASoC: rsnd: add TDM Split mode support")
added TDM Split mode support for rsnd driver.
But, it cares audio-graph-card style only. We can't use TDM Split
mode on simple-card style now.
This patch fixup this issue.

Fixes: f69f452243e4e1 ("ASoC: rsnd: add TDM Split mode support")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: fixup mod ID for CTU regmap read/write
Kuninori Morimoto [Tue, 4 Dec 2018 08:00:47 +0000 (08:00 +0000)]
ASoC: rsnd: fixup mod ID for CTU regmap read/write

commit c16015f36cc12824 ("ASoC: rsnd: add .get_id/.get_id_sub")
add new .get_id/.get_id_sub to indicate module ID/subID.
It is used for SSIU and CTU. In SSIU case, subID indicates BUSIF,
but register settings is based on SSIU ID.
OTOH, in CTU case, subID indicates CTU channel, and register settings
is based on it. This means regmap read/write function needs to care it.
This patch fixup this issue. It can't play MIXed sound without this
patch.

Fixes: c16015f36cc12824 ("ASoC: rsnd: add .get_id/.get_id_sub")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: indicates Channel and Mode for debug
Kuninori Morimoto [Tue, 4 Dec 2018 07:59:05 +0000 (07:59 +0000)]
ASoC: rsnd: indicates Channel and Mode for debug

For TDM debug purpose, indicating Channel and Mode is very
useful. This patch indicate it if it has #define DEBUG

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Clapper
Hans de Goede [Sun, 2 Dec 2018 12:21:22 +0000 (13:21 +0100)]
ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Clapper

The Clapper model Chromebook uses pmc_plt_clk_0 instead of pmc_plt_clk_3
for the mclk, just like the Swanky model.

This commit adds a DMI based quirk for this.

This fixing audio no longer working on these devices after
commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
that commit fixes us unnecessary keeping unused clocks on, but in case of
the Clapper that was breaking audio support since we were not using the
right clock in the cht_bsw_max98090_ti machine driver.

Cc: stable@vger.kernel.org
Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: pxa: remove raumfeld machine driver
Daniel Mack [Sat, 1 Dec 2018 14:08:46 +0000 (15:08 +0100)]
ASoC: pxa: remove raumfeld machine driver

These boards are now fully ported to devicetree and make use of the
simple-card driver, so the platform specific machine driver can be
removed.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: common: add ACPI matching tables for ICL
Pierre-Louis Bossart [Sat, 1 Dec 2018 00:54:37 +0000 (18:54 -0600)]
ASoC: Intel: common: add ACPI matching tables for ICL

Entry needed for ICL RVP w/ RT274

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dt-bindings: use a generic node name for rt5631
Lubomir Rintel [Mon, 3 Dec 2018 11:47:28 +0000 (12:47 +0100)]
ASoC: dt-bindings: use a generic node name for rt5631

The example should follow the practice or using a generic node name
instead of the precise programming model, as recommended by the DTSpec.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: au8540: use 64-bit arithmetic instead of 32-bit
Young_X [Tue, 27 Nov 2018 06:33:16 +0000 (06:33 +0000)]
ASoC: au8540: use 64-bit arithmetic instead of 32-bit

Add suffix ULL to constant 256 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such constant is used in a context that expects an
expression of type u64 (64 bits, unsigned) and the following
expression is currently being evaluated using 32-bit arithmetic:

    256 * fs * 2 * mclk_src_scaling[i].param

Signed-off-by: Young_X <YangX92@hotmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: pcm3168a: Don't disable pcm3168a when CONFIG_PM defined
Jiada Wang [Wed, 28 Nov 2018 12:26:12 +0000 (21:26 +0900)]
ASoC: pcm3168a: Don't disable pcm3168a when CONFIG_PM defined

pcm3168 codec support runtime_[resume|suspend], whenever it
is not active, it enters suspend mode, and it's clock and regulators
will be disabled. so there is no need to disable them again in
remove callback.  Otherwise we got following kernel warnings,
when unload pcm3168a driver

[  222.257514] unbalanced disables for amp-en-regulator
[  222.262526] ------------[ cut here ]------------
[  222.267158] WARNING: CPU: 0 PID: 2423 at drivers/regulator/core.c:2264 _regulator_disable+0x28/0x108
[  222.276291] Modules linked in:
[  222.279343]  snd_soc_pcm3168a_i2c(-)
[  222.282916]  snd_aloop
[  222.285272]  arc4
[  222.287194]  wl18xx
[  222.289289]  wlcore
[  222.291385]  mac80211
[  222.293654]  cfg80211
[  222.295923]  aes_ce_blk
[  222.298366]  crypto_simd
[  222.300896]  cryptd
[  222.302992]  aes_ce_cipher
[  222.305696]  crc32_ce
[  222.307965]  ghash_ce
[  222.310234]  aes_arm64
[  222.312590]  gf128mul
[  222.314860]  snd_soc_rcar
[  222.317476]  sha2_ce
[  222.319658]  xhci_plat_hcd
[  222.322362]  sha256_arm64
[  222.324978]  xhci_hcd
[  222.327247]  sha1_ce
[  222.329430]  renesas_usbhs
[  222.332133]  evdev
[  222.334142]  sha1_generic
[  222.336758]  rcar_gen3_thermal
[  222.339810]  cpufreq_dt
[  222.342253]  ravb_streaming(C)
[  222.345304]  wlcore_sdio
[  222.347834]  thermal_sys
[  222.350363]  udc_core
[  222.352632]  mch_core(C)
[  222.355161]  usb_dmac
[  222.357430]  snd_soc_pcm3168a
[  222.360394]  snd_soc_ak4613
[  222.363184]  gpio_keys
[  222.365540]  virt_dma
[  222.367809]  nfsd
[  222.369730]  ipv6
[  222.371652]  autofs4
[  222.373834]  [last unloaded: snd_soc_pcm3168a_i2c]
[  222.378629] CPU: 0 PID: 2423 Comm: rmmod Tainted: G        WC      4.14.63-04798-gd456126e4a42-dirty #457
[  222.388196] Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT)
[  222.396199] task: ffff8006fa8c6200 task.stack: ffff00000a0a0000
[  222.402117] PC is at _regulator_disable+0x28/0x108
[  222.406906] LR is at _regulator_disable+0x28/0x108
[  222.411695] pc : [<ffff0000083bd89c>] lr : [<ffff0000083bd89c>] pstate: 00000145
[  222.419089] sp : ffff00000a0a3c80
[  222.422401] x29: ffff00000a0a3c80
[  222.425799] x28: ffff8006fa8c6200
[  222.429199] x27: ffff0000086f1000
[  222.432597] x26: 000000000000006a
[  222.435997] x25: 0000000000000124
[  222.439395] x24: 0000000000000018
[  222.442795] x23: 0000000000000006
[  222.446193] x22: ffff8006f925d490
[  222.449592] x21: ffff8006f9ac2068
[  222.452991] x20: ffff8006f9ac2000
[  222.456390] x19: 0000000000000005
[  222.459787] x18: 000000000000000a
[  222.463186] x17: 0000000000000000
[  222.466584] x16: 0000000000000000
[  222.469984] x15: 000000000d3f616a
[  222.473382] x14: 0720072007200720
[  222.476781] x13: 0720072007200720
[  222.480179] x12: 0720072007200720
[  222.483578] x11: 0720072007200720
[  222.486975] x10: 0720072007200720
[  222.490375] x9 : 0720072007200720
[  222.493773] x8 : 07200772076f0774
[  222.497172] x7 : 0000000000000000
[  222.500570] x6 : 0000000000000007
[  222.503969] x5 : 0000000000000000
[  222.507367] x4 : 0000000000000000
[  222.510766] x3 : 0000000000000000
[  222.514164] x2 : c790b852091e2600
[  222.517563] x1 : 0000000000000000
[  222.520961] x0 : 0000000000000028
[  222.524361] Call trace:
[  222.526805] Exception stack(0xffff00000a0a3b40 to 0xffff00000a0a3c80)
[  222.533245] 3b40: 0000000000000028 0000000000000000 c790b852091e2600 0000000000000000
[  222.541075] 3b60: 0000000000000000 0000000000000000 0000000000000007 0000000000000000
[  222.548905] 3b80: 07200772076f0774 0720072007200720 0720072007200720 0720072007200720
[  222.556735] 3ba0: 0720072007200720 0720072007200720 0720072007200720 000000000d3f616a
[  222.564564] 3bc0: 0000000000000000 0000000000000000 000000000000000a 0000000000000005
[  222.572394] 3be0: ffff8006f9ac2000 ffff8006f9ac2068 ffff8006f925d490 0000000000000006
[  222.580224] 3c00: 0000000000000018 0000000000000124 000000000000006a ffff0000086f1000
[  222.588053] 3c20: ffff8006fa8c6200 ffff00000a0a3c80 ffff0000083bd89c ffff00000a0a3c80
[  222.595883] 3c40: ffff0000083bd89c 0000000000000145 0000000000000000 0000000000000000
[  222.603713] 3c60: 0000ffffffffffff ffff00000a0a3c30 ffff00000a0a3c80 ffff0000083bd89c
[  222.611543] [<ffff0000083bd89c>] _regulator_disable+0x28/0x108
[  222.617375] [<ffff0000083bd9c4>] regulator_disable+0x48/0x68
[  222.623033] [<ffff0000083be8e4>] regulator_bulk_disable+0x58/0xc0
[  222.629134] [<ffff0000007d831c>] pcm3168a_remove+0x30/0x50 [snd_soc_pcm3168a]
[  222.636270] [<ffff0000007e5010>] pcm3168a_i2c_remove+0x10/0x1c [snd_soc_pcm3168a_i2c]
[  222.644106] [<ffff0000084b9d9c>] i2c_device_remove+0x38/0x70
[  222.649766] [<ffff00000843cd5c>] device_release_driver_internal+0xd0/0x1c0
[  222.656640] [<ffff00000843ced8>] driver_detach+0x70/0x7c
[  222.661951] [<ffff00000843bf68>] bus_remove_driver+0x74/0xa0
[  222.667609] [<ffff00000843d7e4>] driver_unregister+0x48/0x4c
[  222.673268] [<ffff0000084ba8dc>] i2c_del_driver+0x24/0x30
[  222.678666] [<ffff0000007e5078>] pcm3168a_i2c_driver_exit+0x10/0xf98 [snd_soc_pcm3168a_i2c]
[  222.687019] [<ffff00000811bd28>] SyS_delete_module+0x198/0x1d4
[  222.692850] Exception stack(0xffff00000a0a3ec0 to 0xffff00000a0a4000)
[  222.699289] 3ec0: 0000aaaafeb4b268 0000000000000800 14453f6470497100 0000fffffaa520d8
[  222.707119] 3ee0: 0000fffffaa520d9 000000000000000a 1999999999999999 0000000000000000
[  222.714948] 3f00: 000000000000006a 0000ffffa8f7d1d8 000000000000000a 0000000000000005
[  222.722778] 3f20: 0000000000000000 0000000000000000 000000000000002d 0000000000000000
[  222.730607] 3f40: 0000aaaae19b9f68 0000ffffa8f411f0 0000000000000000 0000aaaae19b9000
[  222.738436] 3f60: 0000fffffaa533b8 0000fffffaa531f0 0000000000000000 0000000000000001
[  222.746266] 3f80: 0000fffffaa53ec6 0000000000000000 0000aaaafeb4b200 0000aaaafeb4a010
[  222.754096] 3fa0: 0000000000000000 0000fffffaa53130 0000aaaae199f36c 0000fffffaa53130
[  222.761926] 3fc0: 0000ffffa8f411f8 0000000000000000 0000aaaafeb4b268 000000000000006a
[  222.769755] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  222.777589] [<ffff0000080832c0>] el0_svc_naked+0x34/0x38
[  222.782899] ---[ end trace eaf8939a3698b1a8 ]---
[  222.787609] Failed to disable VCCDA2: -5
[  222.791649] ------------[ cut here ]------------
[  222.796283] WARNING: CPU: 0 PID: 2423 at drivers/clk/clk.c:595 clk_core_disable+0xc/0x1d8
[  222.804460] Modules linked in:
[  222.807511]  snd_soc_pcm3168a_i2c(-)
[  222.811083]  snd_aloop
[  222.813439]  arc4
[  222.815360]  wl18xx
[  222.817456]  wlcore
[  222.819551]  mac80211
[  222.821820]  cfg80211
[  222.824088]  aes_ce_blk
[  222.826531]  crypto_simd
[  222.829060]  cryptd
[  222.831155]  aes_ce_cipher
[  222.833859]  crc32_ce
[  222.836127]  ghash_ce
[  222.838396]  aes_arm64
[  222.840752]  gf128mul
[  222.843020]  snd_soc_rcar
[  222.845637]  sha2_ce
[  222.847818]  xhci_plat_hcd
[  222.850522]  sha256_arm64
[  222.853138]  xhci_hcd
[  222.855407]  sha1_ce
[  222.857589]  renesas_usbhs
[  222.860292]  evdev
[  222.862300]  sha1_generic
[  222.864917]  rcar_gen3_thermal
[  222.867968]  cpufreq_dt
[  222.870410]  ravb_streaming(C)
[  222.873461]  wlcore_sdio
[  222.875991]  thermal_sys
[  222.878520]  udc_core
[  222.880789]  mch_core(C)
[  222.883318]  usb_dmac
[  222.885587]  snd_soc_pcm3168a
[  222.888551]  snd_soc_ak4613
[  222.891341]  gpio_keys
[  222.893696]  virt_dma
[  222.895965]  nfsd
[  222.897886]  ipv6
[  222.899808]  autofs4
[  222.901990]  [last unloaded: snd_soc_pcm3168a_i2c]
[  222.906783] CPU: 0 PID: 2423 Comm: rmmod Tainted: G        WC      4.14.63-04798-gd456126e4a42-dirty #457
[  222.916349] Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT)
[  222.924351] task: ffff8006fa8c6200 task.stack: ffff00000a0a0000
[  222.930270] PC is at clk_core_disable+0xc/0x1d8
[  222.934799] LR is at clk_core_disable_lock+0x20/0x34
[  222.939761] pc : [<ffff0000083ab9b8>] lr : [<ffff0000083acd28>] pstate: 800001c5
[  222.947154] sp : ffff00000a0a3cf0
[  222.950466] x29: ffff00000a0a3cf0
[  222.953864] x28: ffff8006fa8c6200
[  222.957263] x27: ffff0000086f1000
[  222.960661] x26: 000000000000006a
[  222.964061] x25: 0000000000000124
[  222.967458] x24: 0000000000000015
[  222.970858] x23: ffff8006f9ffa8d0
[  222.974256] x22: ffff8006faf16480
[  222.977655] x21: ffff0000007e7040
[  222.981053] x20: ffff8006faadd100
[  222.984452] x19: 0000000000000140
[  222.987850] x18: 000000000000000a
[  222.991249] x17: 0000000000000000
[  222.994647] x16: 0000000000000000
[  222.998046] x15: 000000000d477819
[  223.001444] x14: 0720072007200720
[  223.004843] x13: 0720072007200720
[  223.008242] x12: 0720072007200720
[  223.011641] x11: 0720072007200720
[  223.015039] x10: 0720072007200720
[  223.018438] x9 : 0720072007200720
[  223.021837] x8 : 0720072007200720
[  223.025236] x7 : 0000000000000000
[  223.028634] x6 : 0000000000000007
[  223.032034] x5 : 0000000000000000
[  223.035432] x4 : 0000000000000000
[  223.038831] x3 : 0000000000000000
[  223.042229] x2 : 0000000004720471
[  223.045628] x1 : 0000000000000000
[  223.049026] x0 : ffff8006faadd100
[  223.052426] Call trace:
[  223.054870] Exception stack(0xffff00000a0a3bb0 to 0xffff00000a0a3cf0)
[  223.061309] 3ba0:                                   ffff8006faadd100 0000000000000000
[  223.069139] 3bc0: 0000000004720471 0000000000000000 0000000000000000 0000000000000000
[  223.076969] 3be0: 0000000000000007 0000000000000000 0720072007200720 0720072007200720
[  223.084798] 3c00: 0720072007200720 0720072007200720 0720072007200720 0720072007200720
[  223.092628] 3c20: 0720072007200720 000000000d477819 0000000000000000 0000000000000000
[  223.100458] 3c40: 000000000000000a 0000000000000140 ffff8006faadd100 ffff0000007e7040
[  223.108287] 3c60: ffff8006faf16480 ffff8006f9ffa8d0 0000000000000015 0000000000000124
[  223.116117] 3c80: 000000000000006a ffff0000086f1000 ffff8006fa8c6200 ffff00000a0a3cf0
[  223.123947] 3ca0: ffff0000083acd28 ffff00000a0a3cf0 ffff0000083ab9b8 00000000800001c5
[  223.131777] 3cc0: ffff00000a0a3cf0 ffff0000083acd1c 0000ffffffffffff ffff8006faadd100
[  223.139606] 3ce0: ffff00000a0a3cf0 ffff0000083ab9b8
[  223.144483] [<ffff0000083ab9b8>] clk_core_disable+0xc/0x1d8
[  223.150054] [<ffff0000083acd58>] clk_disable+0x1c/0x28
[  223.155198] [<ffff0000007d8328>] pcm3168a_remove+0x3c/0x50 [snd_soc_pcm3168a]
[  223.162334] [<ffff0000007e5010>] pcm3168a_i2c_remove+0x10/0x1c [snd_soc_pcm3168a_i2c]
[  223.170167] [<ffff0000084b9d9c>] i2c_device_remove+0x38/0x70
[  223.175826] [<ffff00000843cd5c>] device_release_driver_internal+0xd0/0x1c0
[  223.182700] [<ffff00000843ced8>] driver_detach+0x70/0x7c
[  223.188012] [<ffff00000843bf68>] bus_remove_driver+0x74/0xa0
[  223.193669] [<ffff00000843d7e4>] driver_unregister+0x48/0x4c
[  223.199329] [<ffff0000084ba8dc>] i2c_del_driver+0x24/0x30
[  223.204726] [<ffff0000007e5078>] pcm3168a_i2c_driver_exit+0x10/0xf98 [snd_soc_pcm3168a_i2c]
[  223.213079] [<ffff00000811bd28>] SyS_delete_module+0x198/0x1d4
[  223.218909] Exception stack(0xffff00000a0a3ec0 to 0xffff00000a0a4000)
[  223.225349] 3ec0: 0000aaaafeb4b268 0000000000000800 14453f6470497100 0000fffffaa520d8
[  223.233179] 3ee0: 0000fffffaa520d9 000000000000000a 1999999999999999 0000000000000000
[  223.241008] 3f00: 000000000000006a 0000ffffa8f7d1d8 000000000000000a 0000000000000005
[  223.248838] 3f20: 0000000000000000 0000000000000000 000000000000002d 0000000000000000
[  223.256668] 3f40: 0000aaaae19b9f68 0000ffffa8f411f0 0000000000000000 0000aaaae19b9000
[  223.264497] 3f60: 0000fffffaa533b8 0000fffffaa531f0 0000000000000000 0000000000000001
[  223.272327] 3f80: 0000fffffaa53ec6 0000000000000000 0000aaaafeb4b200 0000aaaafeb4a010
[  223.280157] 3fa0: 0000000000000000 0000fffffaa53130 0000aaaae199f36c 0000fffffaa53130
[  223.287986] 3fc0: 0000ffffa8f411f8 0000000000000000 0000aaaafeb4b268 000000000000006a
[  223.295816] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  223.303648] [<ffff0000080832c0>] el0_svc_naked+0x34/0x38
[  223.308958] ---[ end trace eaf8939a3698b1a9 ]---
[  223.313752] ------------[ cut here ]------------
[  223.318383] WARNING: CPU: 0 PID: 2423 at drivers/clk/clk.c:477 clk_core_unprepare+0xc/0x1ac
[  223.326733] Modules linked in:
[  223.329784]  snd_soc_pcm3168a_i2c(-)
[  223.333356]  snd_aloop
[  223.335712]  arc4
[  223.337633]  wl18xx
[  223.339728]  wlcore
[  223.341823]  mac80211
[  223.344092]  cfg80211
[  223.346360]  aes_ce_blk
[  223.348803]  crypto_simd
[  223.351332]  cryptd
[  223.353428]  aes_ce_cipher
[  223.356131]  crc32_ce
[  223.358400]  ghash_ce
[  223.360668]  aes_arm64
[  223.363024]  gf128mul
[  223.365293]  snd_soc_rcar
[  223.367909]  sha2_ce
[  223.370091]  xhci_plat_hcd
[  223.372794]  sha256_arm64
[  223.375410]  xhci_hcd
[  223.377679]  sha1_ce
[  223.379861]  renesas_usbhs
[  223.382564]  evdev
[  223.384572]  sha1_generic
[  223.387188]  rcar_gen3_thermal
[  223.390239]  cpufreq_dt
[  223.392682]  ravb_streaming(C)
[  223.395732]  wlcore_sdio
[  223.398261]  thermal_sys
[  223.400790]  udc_core
[  223.403059]  mch_core(C)
[  223.405588]  usb_dmac
[  223.407856]  snd_soc_pcm3168a
[  223.410820]  snd_soc_ak4613
[  223.413609]  gpio_keys
[  223.415965]  virt_dma
[  223.418234]  nfsd
[  223.420155]  ipv6
[  223.422076]  autofs4
[  223.424258]  [last unloaded: snd_soc_pcm3168a_i2c]
[  223.429050] CPU: 0 PID: 2423 Comm: rmmod Tainted: G        WC      4.14.63-04798-gd456126e4a42-dirty #457
[  223.438616] Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT)
[  223.446618] task: ffff8006fa8c6200 task.stack: ffff00000a0a0000
[  223.452536] PC is at clk_core_unprepare+0xc/0x1ac
[  223.457239] LR is at clk_unprepare+0x28/0x3c
[  223.461506] pc : [<ffff0000083ab5a4>] lr : [<ffff0000083ace4c>] pstate: 60000145
[  223.468900] sp : ffff00000a0a3d00
[  223.472211] x29: ffff00000a0a3d00
[  223.475609] x28: ffff8006fa8c6200
[  223.479009] x27: ffff0000086f1000
[  223.482407] x26: 000000000000006a
[  223.485807] x25: 0000000000000124
[  223.489205] x24: 0000000000000015
[  223.492604] x23: ffff8006f9ffa8d0
[  223.496003] x22: ffff8006faf16480
[  223.499402] x21: ffff0000007e7040
[  223.502800] x20: ffff8006faf16420
[  223.506199] x19: ffff8006faadd100
[  223.509597] x18: 000000000000000a
[  223.512997] x17: 0000000000000000
[  223.516395] x16: 0000000000000000
[  223.519794] x15: 0000000000000000
[  223.523192] x14: 00000033fe89076c
[  223.526591] x13: 0000000000000400
[  223.529989] x12: 0000000000000400
[  223.533388] x11: 0000000000000000
[  223.536786] x10: 00000000000009e0
[  223.540185] x9 : ffff00000a0a3be0
[  223.543583] x8 : ffff8006fa8c6c40
[  223.546982] x7 : ffff8006fa8c6400
[  223.550380] x6 : 0000000000000001
[  223.553780] x5 : 0000000000000000
[  223.557178] x4 : ffff8006fa8c6200
[  223.560577] x3 : 0000000000000000
[  223.563975] x2 : ffff8006fa8c6200
[  223.567374] x1 : 0000000000000000
[  223.570772] x0 : ffff8006faadd100
[  223.574170] Call trace:
[  223.576615] Exception stack(0xffff00000a0a3bc0 to 0xffff00000a0a3d00)
[  223.583054] 3bc0: ffff8006faadd100 0000000000000000 ffff8006fa8c6200 0000000000000000
[  223.590884] 3be0: ffff8006fa8c6200 0000000000000000 0000000000000001 ffff8006fa8c6400
[  223.598714] 3c00: ffff8006fa8c6c40 ffff00000a0a3be0 00000000000009e0 0000000000000000
[  223.606544] 3c20: 0000000000000400 0000000000000400 00000033fe89076c 0000000000000000
[  223.614374] 3c40: 0000000000000000 0000000000000000 000000000000000a ffff8006faadd100
[  223.622204] 3c60: ffff8006faf16420 ffff0000007e7040 ffff8006faf16480 ffff8006f9ffa8d0
[  223.630033] 3c80: 0000000000000015 0000000000000124 000000000000006a ffff0000086f1000
[  223.637863] 3ca0: ffff8006fa8c6200 ffff00000a0a3d00 ffff0000083ace4c ffff00000a0a3d00
[  223.645693] 3cc0: ffff0000083ab5a4 0000000060000145 0000000000000140 ffff8006faadd100
[  223.653523] 3ce0: 0000ffffffffffff ffff0000083ace44 ffff00000a0a3d00 ffff0000083ab5a4
[  223.661353] [<ffff0000083ab5a4>] clk_core_unprepare+0xc/0x1ac
[  223.667103] [<ffff0000007d8330>] pcm3168a_remove+0x44/0x50 [snd_soc_pcm3168a]
[  223.674239] [<ffff0000007e5010>] pcm3168a_i2c_remove+0x10/0x1c [snd_soc_pcm3168a_i2c]
[  223.682070] [<ffff0000084b9d9c>] i2c_device_remove+0x38/0x70
[  223.687731] [<ffff00000843cd5c>] device_release_driver_internal+0xd0/0x1c0
[  223.694604] [<ffff00000843ced8>] driver_detach+0x70/0x7c
[  223.699915] [<ffff00000843bf68>] bus_remove_driver+0x74/0xa0
[  223.705572] [<ffff00000843d7e4>] driver_unregister+0x48/0x4c
[  223.711230] [<ffff0000084ba8dc>] i2c_del_driver+0x24/0x30
[  223.716628] [<ffff0000007e5078>] pcm3168a_i2c_driver_exit+0x10/0xf98 [snd_soc_pcm3168a_i2c]
[  223.724980] [<ffff00000811bd28>] SyS_delete_module+0x198/0x1d4
[  223.730811] Exception stack(0xffff00000a0a3ec0 to 0xffff00000a0a4000)
[  223.737250] 3ec0: 0000aaaafeb4b268 0000000000000800 14453f6470497100 0000fffffaa520d8
[  223.745079] 3ee0: 0000fffffaa520d9 000000000000000a 1999999999999999 0000000000000000
[  223.752909] 3f00: 000000000000006a 0000ffffa8f7d1d8 000000000000000a 0000000000000005
[  223.760739] 3f20: 0000000000000000 0000000000000000 000000000000002d 0000000000000000
[  223.768568] 3f40: 0000aaaae19b9f68 0000ffffa8f411f0 0000000000000000 0000aaaae19b9000
[  223.776398] 3f60: 0000fffffaa533b8 0000fffffaa531f0 0000000000000000 0000000000000001
[  223.784227] 3f80: 0000fffffaa53ec6 0000000000000000 0000aaaafeb4b200 0000aaaafeb4a010
[  223.792057] 3fa0: 0000000000000000 0000fffffaa53130 0000aaaae199f36c 0000fffffaa53130
[  223.799886] 3fc0: 0000ffffa8f411f8 0000000000000000 0000aaaafeb4b268 000000000000006a
[  223.807715] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  223.815546] [<ffff0000080832c0>] el0_svc_naked+0x34/0x38
[  223.820855] ---[ end trace eaf8939a3698b1aa ]---

Fix this issue by only disable clock and regulators in remove callback
when CONFIG_PM isn't defined

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dmic: introduce module_param wakeup_delay
Jenny TC [Wed, 28 Nov 2018 06:52:46 +0000 (12:22 +0530)]
ASoC: dmic: introduce module_param wakeup_delay

Introducing a module param for wakeup_delay in order to
align with modeswitch_delay parameter. With this change, both
wakeup_delay and modeswitch_delay parameters can be passed
as module parameters.

Signed-off-by: Jenny TC <jenny.tc@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dmic: introduce mode switch delay
Jenny TC [Wed, 28 Nov 2018 06:52:45 +0000 (12:22 +0530)]
ASoC: dmic: introduce mode switch delay

On startup, applications such as PulseAudio or CRAS enable playback or
capture on all PCM devices to verify that configurations are correct,
and close them immediately. For DMICs, this can result in the clock
being turned off very quickly, which may not compatible with internal
state machine transition requirements.

This patch add a mode-switch delay which will prevent the clock from
being turned off without complying with manufacturer timing
specifications. While the DMIC clock may be controlled at a lower level,
be it with hardware or firmware, applying the delay during the
STOP_TRIGGER phase ensures that there is no race condition, e.g. with
the hardware/firmware turning off the clock earlier

Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Jenny TC <jenny.tc@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agodt-bindings: sound: omap-mcpdm: Update documentation for pdmclk
Peter Ujfalusi [Wed, 14 Nov 2018 12:46:30 +0000 (14:46 +0200)]
dt-bindings: sound: omap-mcpdm: Update documentation for pdmclk

McPDM module receives it's functional clock from external source. This
clock is the pdmclk provided by the twl6040 audio IC. If the clock is not
available all register accesses to McPDM fails and the module is not
operational.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: qcom: sdm845: Create and setup jack in init callback
Cheng-Yi Chiang [Sat, 24 Nov 2018 11:09:46 +0000 (19:09 +0800)]
ASoC: qcom: sdm845: Create and setup jack in init callback

Add a callback for init ops on dai_link to create and setup jack.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: qcom: sdm845: Add board specific dapm widgets
Cheng-Yi Chiang [Sat, 24 Nov 2018 11:09:45 +0000 (19:09 +0800)]
ASoC: qcom: sdm845: Add board specific dapm widgets

Add board specific dapm widgets so these widgets can be used
in the route.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: davinci-mcasp: Implement configurable dismod handling
Peter Ujfalusi [Fri, 16 Nov 2018 13:41:41 +0000 (15:41 +0200)]
ASoC: davinci-mcasp: Implement configurable dismod handling

If the dismod is specified in the DT node, use the specified custom value
to configure the drive on state of the inactive TX slots.

If the dismod is not present or booted in legacy mode, the dismod is set
to low as it was the original behavior.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: davinci-mcasp: Document dismod optional property
Peter Ujfalusi [Fri, 16 Nov 2018 13:41:40 +0000 (15:41 +0200)]
ASoC: davinci-mcasp: Document dismod optional property

The dismod property can be used to specify the drive on level of inactive
TX slots.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: davinci-mcasp: Update PDIR (pin direction) register handling
Peter Ujfalusi [Fri, 16 Nov 2018 13:41:39 +0000 (15:41 +0200)]
ASoC: davinci-mcasp: Update PDIR (pin direction) register handling

When McASP is master and the PDIR for the clock pins are configured as
outputs before the clocking is configured it will output whatever clock
is generated at the moment internally.
The clock will switch to the correct rate only when the we start the clock
generators.

To avoid this we must only set the pin as output after the clock is
configured and enabled.

AXR pins configured as outputs behaves somehow interesting as well:
when McASP is not enabled and the pin is selected as output it will not
honor the DISMOD settings for the inactive state, but will pull the pin
down.

Add a new bitfield and mark the pins there which needs to be output and
set the pins only at the time when they will behave correctly.

On stream stop configure the pins back to input which makes them to obey
the global pin configuration regarding to pull up/down.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: davinci-mcasp: Clear TXSTAT register before activating serializers
Peter Ujfalusi [Fri, 16 Nov 2018 13:41:38 +0000 (15:41 +0200)]
ASoC: davinci-mcasp: Clear TXSTAT register before activating serializers

Follow the guideline from the TRM:
Before starting, clear the respective transmitter and receiver status
registers

To avoid stale state stored in the status registers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: Skylake: Add FW reply for MCLK/SCLK IPC
Subhransu S. Prusty [Mon, 29 Jan 2018 16:16:00 +0000 (21:46 +0530)]
ASoC: Intel: Skylake: Add FW reply for MCLK/SCLK IPC

If mclk/sclk is already running, FW responds with IPC reply MCLK/SCLK
already running. Add these to the IPC reply lookup table.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: Skylake: Make DSP replies more human readable
Subhransu S. Prusty [Mon, 29 Jan 2018 16:15:59 +0000 (21:45 +0530)]
ASoC: Intel: Skylake: Make DSP replies more human readable

Add more meaning to the IPC replies for easy debugging. Replace the switch
case with a lookup table to lookup for the IPC replies and print in human
readable form.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: tidyup registering method for rsnd_kctrl_new()
Kuninori Morimoto [Tue, 27 Nov 2018 07:35:34 +0000 (07:35 +0000)]
ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()

Current rsnd dvc.c is using flags to avoid duplicating register for
MIXer case. OTOH, commit e894efef9ac7 ("ASoC: core: add support to card
rebind") allows to rebind sound card without rebinding all drivers.

Because of above patch and dvc.c flags, it can't re-register kctrl if
only sound card was rebinded, because dvc is keeping old flags.
(Of course it will be no problem if rsnd driver also be rebinded,
but it is not purpose of above patch).

This patch checks current card registered kctrl when registering.
In MIXer case, it can avoid duplicate register if card already has same
kctrl. In rebind case, it can re-register kctrl because card registered
kctl had been removed when unbinding.

This patch is updated version of commit b918f1bc7f1ce ("ASoC: rsnd: DVC
kctrl sets once")

Reported-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: max9867: Fix whitespace
Ladislav Michl [Fri, 23 Nov 2018 14:27:00 +0000 (15:27 +0100)]
ASoC: max9867: Fix whitespace

Minor changes to match coding style.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: soc.h: makes snd_soc_of_parse_audio_prefix() inline
Kuninori Morimoto [Mon, 26 Nov 2018 01:21:22 +0000 (01:21 +0000)]
ASoC: soc.h: makes snd_soc_of_parse_audio_prefix() inline

commit 3b7103562c03c ("ASoC: soc-core: add
snd_soc_of_parse_node_prefix()") maked snd_soc_of_parse_audio_prefix()
as #define. But it'd be better to make this a static inline rather than
a #define. It helps with error messages and type safety.
This patch makes it inline.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: tidyup for SSIU subnode
Kuninori Morimoto [Mon, 26 Nov 2018 01:17:01 +0000 (01:17 +0000)]
ASoC: rsnd: tidyup for SSIU subnode

commit da48a6eb82ea2 ("ASoC: rsnd: add SSIU BUSIF support for
Document") updated Documentation for SSIU, but 1) we want to
keep old/deprecated DMA description, 2) it is missing SSIU
subnode properties. This patch tidyup these

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: amd: Fix a NULL vs IS_ERR() check in probe
Dan Carpenter [Mon, 26 Nov 2018 08:13:07 +0000 (11:13 +0300)]
ASoC: amd: Fix a NULL vs IS_ERR() check in probe

The platform_device_register_full() function doesn't return NULL, it
returns error pointers.

Fixes: 7894a7e7ea3d ("ASoC: amd: create ACP3x PCM platform device")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE
Peter Ujfalusi [Wed, 14 Nov 2018 11:06:23 +0000 (13:06 +0200)]
ASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE

We need to block sleep states which would require longer time to leave than
the time the DMA must react to the DMA request in order to keep the FIFO
serviced without overrun.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE
Peter Ujfalusi [Wed, 14 Nov 2018 11:06:22 +0000 (13:06 +0200)]
ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE

We need to block sleep states which would require longer time to leave than
the time the DMA must react to the DMA request in order to keep the FIFO
serviced without under of overrun.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: omap-mcbsp: Fix latency value calculation for pm_qos
Peter Ujfalusi [Wed, 14 Nov 2018 11:06:21 +0000 (13:06 +0200)]
ASoC: omap-mcbsp: Fix latency value calculation for pm_qos

The latency number is in usec for the pm_qos. Correct the calculation to
give us the time in usec

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-card: tidyup define position
Kuninori Morimoto [Thu, 22 Nov 2018 00:57:40 +0000 (00:57 +0000)]
ASoC: audio-graph-card: tidyup define position

commit f986907c9225 ("ASoC: audio-graph-card: add widgets and routing for
external amplifier support") added new function
asoc_graph_card_outdrv_event(), but the inserted position breaks
define area. This patch tidyup it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD
Kuninori Morimoto [Thu, 22 Nov 2018 00:57:23 +0000 (00:57 +0000)]
ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD

1 "simple" is enough on Kconfig help

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing
Kuninori Morimoto [Thu, 22 Nov 2018 00:57:09 +0000 (00:57 +0000)]
ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing

Current audio-graph-scu-card driver is parsing codec position for DPCM
and consider DAI format. But, current operation is doing totally pointless,
because 1) asoc_simple_card_parse_daifmt() will be called not only for 1st
codec on current implementation, and it will be used as fixed format
2) it should be called for each CPU/Codec pair.
Let's tidyup asoc_simple_card_parse_daifmt() timing.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing
Kuninori Morimoto [Thu, 22 Nov 2018 00:56:53 +0000 (00:56 +0000)]
ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing

audio-graph-scu-card.c is supporting "convert-rate/channels" which is
used for DPCM.
But, sound card might have multi codecs, and each codec might need
each convert-rate/channels.

This patch supports each codec's convert-rate/channles support.
top node convert-rate/channels will overwrite settings if exist.

It can't support each codec's convert-rate/channels if sound card had
multi codecs without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc
Kuninori Morimoto [Thu, 22 Nov 2018 00:56:41 +0000 (00:56 +0000)]
ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc

audio-graph-scu-card.c is supporting "convert-rate/channels" which is
used for DPCM.
But, sound card might have multi codecs, and each codec might need
each convert-rate/channels.

This patch supports each codec's convert-rate/channles support.
top node convert-rate/channels will overwrite settings if exist.

It can't support each codec's convert-rate/channels if sound card had
multi codecs without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: tidyup "prefix" parsing
Kuninori Morimoto [Thu, 22 Nov 2018 00:56:21 +0000 (00:56 +0000)]
ASoC: audio-graph-scu-card: tidyup "prefix" parsing

audio-graph-scu-card.c is supporting "prefix" which is used to avoid
DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need
each prefix.

Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support
it on audio-graph-scu-card, too. It is keeping existing DT style.

It can't support each codec's prefix if sound card had multi sub-devices
without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc
Kuninori Morimoto [Thu, 22 Nov 2018 00:55:54 +0000 (00:55 +0000)]
ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc

audio-graph-scu-card.c is supporting "prefix" which is used to avoid
DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need
each prefix.

Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support
it on audio-graph-scu-card, too. It is keeping existing DT style.

It can't support each codec's prefix if sound card had multi sub-devices
without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: tidyup "prefix" parsing
Kuninori Morimoto [Thu, 22 Nov 2018 00:55:40 +0000 (00:55 +0000)]
ASoC: simple-scu-card: tidyup "prefix" parsing

simple-scu-card.c is supporting "prefix" which is used to avoid
DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need
each prefix.

Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support
it on audio-graph-scu-card, too. It is keeping existing DT style.

It can't support each codec's prefix if sound card had multi sub-devices
without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-scu-card: tidyup "prefix" parsing on Doc
Kuninori Morimoto [Thu, 22 Nov 2018 00:55:24 +0000 (00:55 +0000)]
ASoC: simple-scu-card: tidyup "prefix" parsing on Doc

simple-scu-card.c is supporting "prefix" which is used to avoid
DAI naming conflict when CPU/Codec matching.
But, sound card might have multi sub-devices, and each codec might need
each prefix.

Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support
it on audio-graph-scu-card, too. It is keeping existing DT style.

It can't support each codec's prefix if sound card had multi sub-devices
without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: soc-core: add snd_soc_of_parse_node_prefix()
Kuninori Morimoto [Thu, 22 Nov 2018 00:55:09 +0000 (00:55 +0000)]
ASoC: soc-core: add snd_soc_of_parse_node_prefix()

Current ASoC has snd_soc_of_parse_audio_prefix() to get codec_conf
settings from DT which is used to avoid DAI naming conflict when
CPU/Codec matching.

Currently, it is parsing from "top node",
but, we want to parse from "each sub node" if sound card had multi
cpus/codecs.

This patch adds new snd_soc_of_parse_node_prefix() to allow parsing
settings from selected node.
It is keeping existing snd_soc_of_parse_audio_prefix() by using macro.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-amplifier: add VCC regulator widget
Vasily Khoruzhick [Thu, 22 Nov 2018 10:23:21 +0000 (18:23 +0800)]
ASoC: simple-amplifier: add VCC regulator widget

Amplifier may have assosicated regulator, so add a widget for it
and appropriate route.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dt-bindings: add regulator property to simple amplifier
Vasily Khoruzhick [Thu, 22 Nov 2018 10:23:20 +0000 (18:23 +0800)]
ASoC: dt-bindings: add regulator property to simple amplifier

Amplifier may have associated regulator, so add a property for it.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: sunxi: sun50i-codec-analog: Add support for cpvdd regulator supply
Chen-Yu Tsai [Thu, 22 Nov 2018 10:23:19 +0000 (18:23 +0800)]
ASoC: sunxi: sun50i-codec-analog: Add support for cpvdd regulator supply

On the Allwinner A64 SoCs, the audio codec has a built-in headphone
amplifier. This amplifier has a power supply separate from the rest of
the analog audio circuitry, labeled cpvdd.

This patch adds a DAPM widget for this supply, and ties it to the
headphone amp widget.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: dt-bindings: sun50i-codec-analog: Add headphone amp regulator supply
Chen-Yu Tsai [Thu, 22 Nov 2018 10:23:18 +0000 (18:23 +0800)]
ASoC: dt-bindings: sun50i-codec-analog: Add headphone amp regulator supply

On the Allwinner A64 SoC, the audio codec has a built-in headphone
amplifier. This amplifier has a power supply separate from the rest of
the analog audio circuitry.

Add a regulator supply property to handle this.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple_card_utils: remove "option" from asoc_simple_card_of_parse_routing()
Kuninori Morimoto [Wed, 21 Nov 2018 02:11:13 +0000 (02:11 +0000)]
ASoC: simple_card_utils: remove "option" from asoc_simple_card_of_parse_routing()

asoc_simple_card_of_parse_routing() had "option" parameter
to consider error handling, but it is very pointless parameter.
Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card-utils: tidyup asoc_simple_card_parse_convert()
Kuninori Morimoto [Wed, 21 Nov 2018 02:10:51 +0000 (02:10 +0000)]
ASoC: simple-card-utils: tidyup asoc_simple_card_parse_convert()

Current simple-card-utils has asoc_simple_card_parse_convert() to parse
convert channel/rate for be_hw_params_fixup.
But, it is parsing from top of node.

If sound card had multi subnode, we need to parse it from each sub node.
This patch tidyup asoc_simple_card_parse_convert() to allow parsing
settings from each node.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card-utils: accept NULL parameter on asoc_simple_card_xxx()
Kuninori Morimoto [Wed, 21 Nov 2018 02:09:16 +0000 (02:09 +0000)]
ASoC: simple-card-utils: accept NULL parameter on asoc_simple_card_xxx()

If simple-card-utils accept NULL pointer on asoc_simple_card_xxx(),
each driver code will be more simple.
Let's accept NULL pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: simple-card-utils: remove asoc_simple_card_clk_register()
Kuninori Morimoto [Wed, 21 Nov 2018 02:08:59 +0000 (02:08 +0000)]
ASoC: simple-card-utils: remove asoc_simple_card_clk_register()

asoc_simple_card_clk_register() is used but only 1 user,
and very pointless code. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: makes rsnd_ssi_is_dma_mode() static
Kuninori Morimoto [Wed, 21 Nov 2018 08:15:30 +0000 (08:15 +0000)]
ASoC: rsnd: makes rsnd_ssi_is_dma_mode() static

ssi.c only is using rsnd_ssi_is_dma_mode().
Let's move it as static function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: tidyup rsnd_parse_connect_ssiu_compatible()
Kuninori Morimoto [Wed, 21 Nov 2018 01:58:30 +0000 (01:58 +0000)]
ASoC: rsnd: tidyup rsnd_parse_connect_ssiu_compatible()

rsnd_parse_connect_ssiu_compatible() is doing
 - using rsnd_ssiu_id(), but we use it via rsnd_mod_id()
 - we can break loop if rsnd_dai_connect() was called
This patch fixup these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: rsnd: Add device tree support for r8a77995
Hiroyuki Yokoyama [Wed, 21 Nov 2018 01:06:43 +0000 (01:06 +0000)]
ASoC: rsnd: Add device tree support for r8a77995

Simply document new compat strings.
There appears to be no need for a driver updates.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: sdm845: Add support for Secondary MI2S interface
Rohit kumar [Fri, 16 Nov 2018 07:41:58 +0000 (13:11 +0530)]
ASoC: sdm845: Add support for Secondary MI2S interface

Add support to configure bit clock for secondary MI2S
TX interface.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: sdm845: Update slot_width for Quaternary TDM port
Rohit kumar [Fri, 16 Nov 2018 07:41:57 +0000 (13:11 +0530)]
ASoC: sdm845: Update slot_width for Quaternary TDM port

Change slot_width for quaternary TDM port to 16 and
update bclk rate for TDM and MI2S interfaces
accordingly.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: use platform_data for machine drivers
Pierre-Louis Bossart [Sat, 17 Nov 2018 00:47:06 +0000 (18:47 -0600)]
ASoC: Intel: use platform_data for machine drivers

For some reason we have different mechanisms for passing data to
machine drivers. Use the solution used by Atom/SST and SOF instead of
using drv_data as done by Skylake.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: fix interface for Chromebook machine drivers
Pierre-Louis Bossart [Sat, 17 Nov 2018 00:47:05 +0000 (18:47 -0600)]
ASoC: Intel: fix interface for Chromebook machine drivers

The changes for HDaudio overlooked the fact that the machine drivers
used for Chromebooks rely on the dmic number information passed as
pdata.

Add dmic_num field to standard interface and use standard interface
instead of SKL-specific one.

Also clean-up pdata definition to remove fields that are no longer
used.

Fixes: 842bb5135f10 ('ASoC: Intel: use standard interface for Hdaudio machine driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: acpi: fix: continue searching when machine is ignored
Keyon Jie [Sat, 17 Nov 2018 00:47:04 +0000 (18:47 -0600)]
ASoC: acpi: fix: continue searching when machine is ignored

The machine_quirk may return NULL which means the acpi entries should be
skipped and search for next matched entry is needed, here add return
check here and continue for NULL case.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: Intel: Skylake: fix Kconfigs, make HDaudio codec optional
Pierre-Louis Bossart [Sun, 18 Nov 2018 22:38:09 +0000 (16:38 -0600)]
ASoC: Intel: Skylake: fix Kconfigs, make HDaudio codec optional

The Skylake driver currently has a set of problems supporting
load/unload modules. We need to make the HDaudio codec support
optional to help narrow down the issues.

Support for HDaudio codecs also leads to a Kconfig issue. We want the
hdac_hda codec to be compilable independently of Skylake (e.g. with
ALL_CODECS) but when Skylake is selected as built-in the hdac_hda
codec needs to use the same option due a a code dependency

Solve both problems by adding a user-selectable boolean Kconfig,
select HDAC_HDA as needed and make the HDaudio codec support in the
Skylake driver optional. Tests on a Chell Chromebook device without
HDaudio show no regression for speaker and HDMI playback.

This is submitted as an RFC to allow for comments and more validation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: tlv320aic3x: Add support for CBM_CFS and CBS_CFM clocking modes
Peter Ujfalusi [Tue, 20 Nov 2018 12:42:53 +0000 (14:42 +0200)]
ASoC: tlv320aic3x: Add support for CBM_CFS and CBS_CFM clocking modes

The codec can support any variation of bclk/fs master/slave configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoMAINTAINERS: add ASoC maintainers for sound dt-bindings
Clément Péron [Sat, 17 Nov 2018 12:14:52 +0000 (13:14 +0100)]
MAINTAINERS: add ASoC maintainers for sound dt-bindings

Sound dt-bindings are applied by ASoC maintainers and should be
submit to ASoC list in addition to the devicetree list.

Hence, add this information into the MAINTAINERS file.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>