Commit graph

21530 commits

Author SHA1 Message Date
Mark Brown
ba3e069fc1
Merge series "ASoC: da7219: Reorganise device/codec level probe/remove" from Adam Thomson <Adam.Thomson.Opensource@diasemi.com>:
This patch set reorganises and fixes device and codec level probe/remove
handling within the driver, to allow clean probe and remove at the codec level.

This set relates to an issue raised by Yong Zhi where a codec level re-probe
would fail due to clks still being registered from the previous instantiation.
In addition some improvements around regulator handling and soft reset have
also been included.

Adam Thomson (3):
  ASoC: da7219: Move required devm_* allocations to device level code
  ASoC: da7219: Move soft reset handling to codec level probe
  ASoC: da7219: Fix clock handling around codec level probe

 sound/soc/codecs/da7219-aad.c |  85 +++++---
 sound/soc/codecs/da7219-aad.h |   3 +
 sound/soc/codecs/da7219.c     | 493 +++++++++++++++++++++++-------------------
 sound/soc/codecs/da7219.h     |   1 +
 4 files changed, 328 insertions(+), 254 deletions(-)

--
1.9.1
2020-08-18 14:53:01 +01:00
Mark Brown
bf66f140d6
Merge series "refine and clean code for synchronous mode" from Shengjiu Wang <shengjiu.wang@nxp.com>:
refine and clean code for synchronous mode

Shengjiu Wang (3):
  ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger()
  ASoC: fsl_sai: Drop TMR/RMR settings for synchronous mode
  ASoC: fsl_sai: Replace synchronous check with fsl_sai_dir_is_synced

changes in v3:
- Add reviewed-by Nicolin
- refine the commit log.
- Add one more patch #3

changes in v2:
- Split the commit
- refine the sequence in trigger stop

 sound/soc/fsl/fsl_sai.c | 173 +++++++++++++++++++++++-----------------
 1 file changed, 102 insertions(+), 71 deletions(-)

--
2.27.0
2020-08-18 14:52:59 +01:00
Mark Brown
cba62c8b49
Merge series "ASoC: qcom: Add support for SC7180 lpass variant" from Rohit kumar <rohitkr@codeaurora.org>:
This patch chain add audio support for SC7180 soc by doing the required
modification in existing common lpass-cpu/lpass-platform driver.
This also fixes some concurrency issue.

This patch series is already tested by Srinivas on Dragon Board 410c.
Changes since v5:
        - Fixed remove api in lpass-sc7180.c
        - Addressed comments by Rob in yaml Documentation.

Ajit Pandey (4):
  ASoC: qcom: Add common array to initialize soc based core clocks
  ASoC: qcom: lpass-platform: Replace card->dev with component->dev
  include: dt-bindings: sound: Add sc7180-lpass bindings header
  ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio

Rohit kumar (8):
  ASoC: qcom: lpass-cpu: Move ahbix clk to platform specific function
  ASoC: qcom: lpass-platform: fix memory leak
  ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers
  ASoC: qcom: lpass-cpu: fix concurrency issue
  dt-bindings: sound: lpass-cpu: Add sc7180 lpass cpu node
  ASoC: qcom: lpass-cpu: Use platform_get_resource
  ASoC: qcom: lpass-platform: Use platform_get_irq
  dt-bindings: sound: lpass-cpu: Move to yaml format

 .../devicetree/bindings/sound/qcom,lpass-cpu.txt   |  79 --------
 .../devicetree/bindings/sound/qcom,lpass-cpu.yaml  | 189 ++++++++++++++++++
 include/dt-bindings/sound/sc7180-lpass.h           |  10 +
 sound/soc/qcom/Kconfig                             |   5 +
 sound/soc/qcom/Makefile                            |   2 +
 sound/soc/qcom/lpass-apq8016.c                     |  86 ++++++--
 sound/soc/qcom/lpass-cpu.c                         | 204 ++++++++++---------
 sound/soc/qcom/lpass-ipq806x.c                     |  67 +++++++
 sound/soc/qcom/lpass-lpaif-reg.h                   | 157 ++++++++-------
 sound/soc/qcom/lpass-platform.c                    | 155 +++++++++++----
 sound/soc/qcom/lpass-sc7180.c                      | 216 +++++++++++++++++++++
 sound/soc/qcom/lpass.h                             |  63 +++++-
 12 files changed, 934 insertions(+), 299 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml
 create mode 100644 include/dt-bindings/sound/sc7180-lpass.h
 create mode 100644 sound/soc/qcom/lpass-sc7180.c

--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
2020-08-18 14:52:57 +01:00
Mark Brown
354caf5836
Merge series "Codec workaround" from Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>:
This patch series enables some features on the tlv3204 codec and also fixes some issues faced while testing

v2: Fixed the build error from snd_soc_component_read32
v1: initial ASoC: codec: tlv3204: Codec workaround series

Michael Sit Wei Hong (3):
  ASoC: codec: tlv3204: Enable 24 bit audio support
  ASoC: codec: tlv3204: Increased maximum supported channels
  ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset

 sound/soc/codecs/tlv320aic32x4.c | 60 +++++++++++++++++++++++---------
 1 file changed, 44 insertions(+), 16 deletions(-)

--
2.17.1
2020-08-18 14:52:56 +01:00
Mark Brown
4782e6cc29
Merge series "ASoC: sun50i-codec-analog: Cleanup and power management" from Samuel Holland <samuel@sholland.org>:
This series performs some minor cleanup on the driver for the analog
codec in the Allwinner A64, and hooks up the existing mute switches to
DAPM widgets, in order to provide improved power management.

Changes since v1:
  - Collected Acked-by/Reviewed-by tags
  - Used SOC_MIXER_NAMED_CTL_ARRAY to avoid naming a widget "Earpiece"

Samuel Holland (8):
  ASoC: sun50i-codec-analog: Fix duplicate use of ADC enable bits
  ASoC: sun50i-codec-analog: Gate the amplifier clock during suspend
  ASoC: sun50i-codec-analog: Group and sort mixer routes
  ASoC: sun50i-codec-analog: Make headphone routes stereo
  ASoC: sun50i-codec-analog: Enable DAPM for headphone switch
  ASoC: sun50i-codec-analog: Make line out routes stereo
  ASoC: sun50i-codec-analog: Enable DAPM for line out switch
  ASoC: sun50i-codec-analog: Enable DAPM for earpiece switch

 sound/soc/sunxi/sun50i-codec-analog.c | 176 ++++++++++++++++----------
 1 file changed, 111 insertions(+), 65 deletions(-)

--
2.26.2
2020-08-18 14:52:55 +01:00
Mark Brown
163ae5d1e1
Merge series "This patch series is to enable multiple features on the Keembay Platform" from Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>:
v2: Change channel-max device tree property to use new compatible string
v1: Initial patch series

Michael Sit Wei Hong (2):
  ASoC: Intel: KMB: Enable TDM audio capture
  dt-bindings: sound: intel,keembay-i2s: Add new compatible string

 .../bindings/sound/intel,keembay-i2s.yaml     |   1 +
 sound/soc/intel/keembay/kmb_platform.c        | 145 +++++++++++++-----
 2 files changed, 109 insertions(+), 37 deletions(-)

--
2.17.1
2020-08-18 14:52:53 +01:00
Mark Brown
2d32c6087d
Merge series "Allwinner A64 digital audio codec fixes" from Samuel Holland <samuel@sholland.org>:
This series fixes a couple of issues with the digital audio codec in the
Allwinner A64 SoC:
  1) Left/right channels were swapped when playing/recording audio
  2) DAPM topology was wrong, breaking some kcontrols

This is the minimum set of changes necessary to fix these issues in a
backward-compatible way. For that reason, some DAPM widgets still have
incorrect or confusing names; those and other issues will be fixed in
later patch sets.

Samuel Holland (7):
  ASoC: dt-bindings: Add a new compatible for the A64 codec
  ASoC: sun8i-codec: Fix DAPM to match the hardware topology
  ASoC: sun8i-codec: Add missing mixer routes
  ASoC: sun8i-codec: Add a quirk for LRCK inversion
  ARM: dts: sun8i: a33: Update codec widget names
  arm64: dts: allwinner: a64: Update codec widget names
  arm64: dts: allwinner: a64: Update the audio codec compatible

 .../sound/allwinner,sun8i-a33-codec.yaml      |   6 +-
 arch/arm/boot/dts/sun8i-a33-olinuxino.dts     |   4 +-
 arch/arm/boot/dts/sun8i-a33.dtsi              |   4 +-
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts |   8 +-
 .../dts/allwinner/sun50i-a64-orangepi-win.dts |   8 +-
 .../boot/dts/allwinner/sun50i-a64-pine64.dts  |   8 +-
 .../dts/allwinner/sun50i-a64-pinebook.dts     |   8 +-
 .../dts/allwinner/sun50i-a64-pinephone.dtsi   |   8 +-
 .../boot/dts/allwinner/sun50i-a64-pinetab.dts |   8 +-
 .../allwinner/sun50i-a64-sopine-baseboard.dts |   8 +-
 .../boot/dts/allwinner/sun50i-a64-teres-i.dts |   8 +-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi |  11 +-
 sound/soc/sunxi/sun8i-codec.c                 | 137 ++++++++++++++----
 13 files changed, 155 insertions(+), 71 deletions(-)

--
2.26.2
2020-08-18 14:52:52 +01:00
Mark Brown
fbe7a5dbd8
Merge series "ASoC: rt5682: Use clk APIs better" from Stephen Boyd <swboyd@chromium.org>:
This patch series drops a printk message down to dev_dbg() because it
was noisy and then migrates this driver to use clk_hw based APIs instead
of clk based APIs because this device is a clk provider, not a clk
consumer. I've only lightly tested the last two patches but I don't have
all combinations of clks for this device.

Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Cc: Shuming Fan <shumingf@realtek.com>

Stephen Boyd (3):
  ASoC: rt5682: Use dev_dbg() in rt5682_clk_check()
  ASoC: rt5682: Drop usage of __clk_get_name()
  ASoC: rt5682: Use clk_hw based APIs for registration

 sound/soc/codecs/rt5682.c | 73 ++++++++++++---------------------------
 sound/soc/codecs/rt5682.h |  2 --
 2 files changed, 23 insertions(+), 52 deletions(-)

Based on the last patch to this driver in linux-next.

base-commit: 6301adf942
--
Sent by a computer, using git, on the internet
2020-08-18 14:52:50 +01:00
Mark Brown
9af73c31f4
Merge series "ASoC: SOF/Intel: fix cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
A small set of fixes to reduce the number of warnings.

Pierre-Louis Bossart (5):
  ASOC: SOF: Intel: hda-codec: move unused label to correct position
  ASoC: SOF: Intel: hda-codec: move variable used conditionally
  ASoC: Intel: rename shadowed variable for all broadwell boards
  ASoC: Intel: bytcht_cx2072x: simplify return handling
  ASoC: Intel: sof_sdw: clarify operator precedence

 sound/soc/intel/boards/bdw-rt5650.c     | 10 +++++-----
 sound/soc/intel/boards/bdw-rt5677.c     |  8 ++++----
 sound/soc/intel/boards/broadwell.c      |  8 ++++----
 sound/soc/intel/boards/bytcht_cx2072x.c |  2 +-
 sound/soc/intel/boards/sof_sdw.c        |  2 +-
 sound/soc/sof/intel/hda-codec.c         |  7 ++++++-
 6 files changed, 21 insertions(+), 16 deletions(-)

--
2.25.1
2020-08-18 14:52:49 +01:00
Shengjiu Wang
a8fd5ca801
ASoC: fsl-asoc-card: Get "extal" clock rate by clk_get_rate
On some platform(.e.g. i.MX8QM MEK), the "extal" clock is different
with the mclk of codec, then the clock rate is also different.
So it is better to get clock rate of "extal" rate by clk_get_rate,
don't reuse the clock rate of mclk.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1597047103-6863-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:46 +01:00
Srinivas Kandagatla
db24fa5756
ASoC: qcom: add a dedicated menuconfig
Currently list of Qualcomm drivers is growing, so put them in to a
proper menu so that it does not mix up with other ASOC configs in menuconfig.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200811105818.7890-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:45 +01:00
Sebastian Krzyszkowiak
89383a2707
ASoC: wm8962: Export DAC/ADC monomix switches
This allows solutions like ALSA UCM to utilize hardware mono downmix
for cases where mono output to a single speaker is desired only in
specific situations (like on a mobile phone).

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/3662154.EqNIRYjrc8@pliszka
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:44 +01:00
Colin Ian King
466a806a7d
sound: remove duplicate "the the" phrase in Kconfig text
There are a couple of occurrences of "the the" in the Kconfig
text. Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/20200817224706.6139-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:43 +01:00
Randy Dunlap
8932f0cb20
ASoC: SOF: delete repeated words in comments
Drop the repeated words {that, the} in comments.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200808012156.10827-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:42 +01:00
Pierre-Louis Bossart
093513b8ed
ASoC: codecs: wm0010: use DECLARE_COMPLETION_ONSTACK() macro
Follow recommendation in Documentation/scheduler/completion.rst and
use macro to declare local 'struct completion'

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200813175442.59067-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:41 +01:00
Stephan Gerhold
6bc37d32f6
ASoC: meson: Use snd_soc_of_parse_aux_devs()
Use the new common snd_soc_of_parse_aux_devs() helper function
to parse auxiliary devices from the device tree. The new helper
is just a copy of meson_card_add_aux_devices() so there is no
functional change.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200801100257.22658-3-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:40 +01:00
Stephan Gerhold
d9ffff696c
ASoC: simple-card: Use snd_soc_of_parse_aux_devs()
Use the new common snd_soc_of_parse_aux_devs() helper function
to parse auxiliary devices from the device tree. The code is slightly
different but the binding that is parsed is exactly the same.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200801100257.22658-2-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:39 +01:00
Stephan Gerhold
1ae0965dc2
ASoC: core: Add common helper to parse aux devs from device tree
simple-card.c and meson-card-utils.c use pretty much the same
helper function to parse auxiliary devices from the device tree.

Make it easier for other drivers to parse these from the device tree
as well by adding a shared helper function to soc-core.c.

snd_soc_of_parse_aux_devs() is pretty much a copy of
meson_card_add_aux_devices() from meson-card-utils.c
with two minor changes:

  - Make property name configurable as parameter
  - Change dev_err() message slightly for consistency with other
    error messages in soc-core.c

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200801100257.22658-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:38 +01:00
Shengjiu Wang
7e3096e8f8
ASoC: ak4458: Add regulator support
"AVDD" is for analog power supply,  "DVDD" is for digital power
supply, they can improve the power management.

As the regulator is enabled in pm runtime resume, which is
behind the component driver probe, so accessing registers in
component driver probe will fail. Fix this issue by enabling
regcache_cache_only after pm_runtime_enable.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1597397561-2426-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:37 +01:00
Brent Lu
1f53bcb3fc
ASoC: hdac_hdmi: support 'ELD' mixer
Add an binary mixer 'ELD' to each HDMI PCM device so user space
could read the ELD data of external HDMI display.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20200818004413.12852-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:35 +01:00
Youling Tang
ade5376dff
sound/soc/intel: Fix spelling mistake "cant" --> "can't"
There is some spelling mistakes in a dev_err message. Fix it.

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Link: https://lore.kernel.org/r/1597299157-32221-1-git-send-email-tangyouling@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:34 +01:00
Randy Dunlap
85131d9489
ASoC: codecs: delete repeated words in comments
Drop the repeated words {start, it, the} in comments.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200808012143.10777-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:33 +01:00
Randy Dunlap
0d8aa2ccb2
ASoC: various vendors: delete repeated words in comments
Drop the repeated words {related, we, is, the} in comments.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200808012209.10880-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 14:52:32 +01:00
Pierre-Louis Bossart
8f0ccd59bc
ASoC: Intel: Skylake: (cosmetic) align function parameters
Fix cppcheck warnings and align headers with code.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:26 +01:00
Pierre-Louis Bossart
11a790f94b
ASoC: Intel: Skylake: skl-topology: remove redundant assignment
Fix cppcheck warning:

sound/soc/intel/skylake/skl-topology.c:2879:29: style: Variable
'block_size' is assigned a value that is never used. [unreadVariable]

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:25 +01:00
Pierre-Louis Bossart
25722cf606
ASoC: Intel: Skylake: skl-topology: remove redundant assignments
Cppcheck complains about possible NULL pointer dereferences but the
assignments are actually not needed before walking through lists.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:24 +01:00
Pierre-Louis Bossart
c6193988e9
ASoC: Intel: Skylake: sst-utils: remove redundant assignment
Fix cppcheck warning:

sound/soc/intel/skylake/skl-sst-utils.c:240:10: style: Variable 'ret'
is assigned a value that is never used. [unreadVariable]
 int ret = 0;
         ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:23 +01:00
Pierre-Louis Bossart
3b4d60f0f7
ASoC: Intel: Skylake: cldma: remove redundant initialization
Fix cppcheck warning:

sound/soc/intel/skylake/skl-sst-cldma.c:248:10: style: Variable 'ret'
is assigned a value that is never used. [unreadVariable]
 int ret = 0;
         ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:22 +01:00
Pierre-Louis Bossart
8be54edba9
ASoC: Intel: Skylake: skl-nhlt: remove redundant initialization
Fix cppcheck warning:

sound/soc/intel/skylake/skl-nhlt.c:203:21: style: Variable 'rate' is
assigned a value that is never used. [unreadVariable]
 unsigned long rate = 0;
                    ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:21 +01:00
Pierre-Louis Bossart
523615b716
ASoC: Intel: haswell-ipc: remove redundant assignments
Fix cppcheck warnings:

sound/soc/intel/haswell/sst-haswell-ipc.c:430:8: style: Variable 'i'
is assigned a value that is never used. [unreadVariable]

sound/soc/intel/haswell/sst-haswell-ipc.c:1792:8: style: Variable 'id'
is assigned a value that is never used. [unreadVariable]

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:20 +01:00
Pierre-Louis Bossart
c9b1f82d53
ASoC: Intel: haswell: (cosmetic) align function parameters
Fix cppcheck warning:

sound/soc/intel/haswell/sst-haswell-ipc.c:963:8: style:inconclusive:
Function 'sst_hsw_stream_new' argument 3 names different: declaration
'get_write_position' definition
'notify_position'. [funcArgNamesDifferent]

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:20 +01:00
Pierre-Louis Bossart
2b84a26f99
ASoC: Intel: common: (cosmetic) align function parameters
Fix cppcheck style warnings, align headers and code and remove useless
prototypes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:19 +01:00
Pierre-Louis Bossart
0af1fcea05
ASoC: Intel: Baytrail: (cosmetic) align function parameters
Fix cppcheck warning:

sound/soc/intel/baytrail/sst-baytrail-ipc.c:339:8: style:inconclusive:
Function 'sst_byt_stream_new' argument 3 names different: declaration
'get_write_position' definition
'notify_position'. [funcArgNamesDifferent]

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:18 +01:00
Pierre-Louis Bossart
cfe8cc9419
ASoC: Intel: Atom: (cosmetic) align parameters
Fix cppcheck warnings and use same function parameters in headers and
C code.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:17 +01:00
Pierre-Louis Bossart
7b99434c2c
ASoC: Intel: Atom: sst_pvt: simplify return handling
Fix cppcheck warning:

sound/soc/intel/atom/sst/sst_pvt.c:201:9: warning: Identical condition
and return expression 'retval', return value is always 0
[identicalConditionAfterEarlyExit]
 return retval;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:16 +01:00
Pierre-Louis Bossart
b66a056e15
ASoC: Intel: Atom: sst_loader: remove always-true condition
Fix cppcheck warning:

sound/soc/intel/atom/sst/sst_loader.c:401:43: style: Redundant
condition: If 'EXPR == 4', the comparison 'EXPR != 3' is always
true. [redundantCondition]

 if (sst_drv_ctx->sst_state !=  SST_RESET ||
                                          ^

In this case, if sst_state == SST_SHUTDOWN then the first test is
already true. 2014 bug, yay.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:15 +01:00
Pierre-Louis Bossart
eeb460f212
ASoC: Intel: Atom: remove useless assignment
Fix cppcheck warning:

sound/soc/intel/atom/sst/sst.c:52:20: style: Variable 'size' is
assigned a value that is never used. [unreadVariable]
 unsigned int size = 0;
                   ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:14 +01:00
Pierre-Louis Bossart
5ab56a2243
ASoC: Intel: Atom: platform-pcm: fix redundant return
Fix cppcheck warning

 return ret_val;
        ^
sound/soc/intel/atom/sst-mfld-platform-pcm.c:384:6: note: If condition 'ret_val' is true, the function will return/exit
 if (ret_val)
     ^
sound/soc/intel/atom/sst-mfld-platform-pcm.c:387:9: note: Returning identical expression 'ret_val'
 return ret_val;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:13 +01:00
Pierre-Louis Bossart
f3352e6b7c
ASoC: Intel: Atom: sst_pvt: remove redundant initialization
Fix cppcheck warning:

sound/soc/intel/atom/sst/sst_pvt.c:201:9: warning: Identical condition
and return expression 'retval', return value is always 0
[identicalConditionAfterEarlyExit]
 return retval;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:12 +01:00
Pierre-Louis Bossart
30701e0f3b
ASoC: Intel: Atom: remove redundant initialization
Fix cppcheck warnings:

sound/soc/intel/atom/sst/sst.c:427:13: style: Variable 'ret' is
assigned a value that is never used. [unreadVariable]
 int i, ret = 0;
            ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:11 +01:00
Pierre-Louis Bossart
4e3aab3217
ASoC: Intel: Atom: sst: remove useless NULL assignment
Fix cppcheck warnings:

sound/soc/intel/atom/sst/sst.c:373:2: warning: Assignment of function
parameter has no effect outside the function. Did you forget
dereferencing it? [uselessAssignmentPtrArg]
 ctx = NULL;
 ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:11 +01:00
Pierre-Louis Bossart
b0754c55ad
ASoC: Intel: Atom: platform-pcm: remove redundant assignment
fix cppcheck warning:

sound/soc/intel/atom/sst-mfld-platform-pcm.c:387:9: warning: Identical
condition and return expression 'ret_val', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret_val;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:10 +01:00
Pierre-Louis Bossart
b0a2a93dc3
ASoC: Intel: Atom: compress: remove redundant assignment
Fix cppcheck warning:

sound/soc/intel/atom/sst-mfld-platform-compress.c:46:14: style:
Variable 'ret_val' is assigned a value that is never
used. [unreadVariable]
 int ret_val = 0;
             ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:09 +01:00
Pierre-Louis Bossart
c6a6586126
ASoC: Intel: Atom: sst-atom-controls: remove redundant assignments
cppcheck complains of a possible NULL pointer dereference but setting
a pointer before using list_for_each_entry() is not useful.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18 11:50:08 +01:00
Adam Thomson
78013a1cf2
ASoC: da7219: Fix clock handling around codec level probe
Previously the driver would use devm_* related functions at
the codec level probe() to allocate clock resources for MCLK
and the DAI clocks exposed by the device. This caused issues
when registering clocks on a re-probe (no device level
remove/prove involved) as the devm_* resources were never
freed up so the clocks were still registered from the previous
codec level probe().

This commit updates the clock handling for MCLK usage and DAI
clock provision to fix this discrepancy and allow the codec level
probe/remove functionality to operate as intended.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/b92c461baeed27a6cd92e59e36a55c2547218683.1597164865.git.Adam.Thomson.Opensource@diasemi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:48:45 +01:00
Adam Thomson
aa5b18d1c2
ASoC: da7219: Move soft reset handling to codec level probe
As part of the reorganisation of the device level and codec
level probe functionlity, the soft reset handling should really
reside at the codec level and after the instantiation of supplies.
This commit makes the relevant changes to support this change of
scope including the remove of devm_* functions being called for
regulator instantiation at the codec level.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/f7603a4855647429b754ce76f887ec441622015c.1597164865.git.Adam.Thomson.Opensource@diasemi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:48:44 +01:00
Adam Thomson
21f279f34c
ASoC: da7219: Move required devm_* allocations to device level code
In preparation for cleanup of device level and codec level probe
funcitonality, all necessary devm_* allocations and fw retrieval
functions are moved to the I2C probe level code.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/7a9a2ead6e37820a6025c0a62dc45952d5032ab7.1597164865.git.Adam.Thomson.Opensource@diasemi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:48:43 +01:00
Srinivas Kandagatla
a08cd56a45
ASoC: q6asm-dai: add support to copy callback
During gapless playback, its possible for previous track to
end at unaligned boundary, starting next track on the same
boundary can lead to unaligned address exception in dsp.

So implement copy callback for finer control on the buffer offsets.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-11-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:38 +01:00
Srinivas Kandagatla
ee941a338a
ASoC: q6asm-dai: add gapless support
Add support to gapless playback by implementing metadata,
next_track, drain and partial drain support.

Gapless on Q6ASM is implemented by opening 2 streams in a single
q6asm stream and toggling them on next track.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:38 +01:00
Srinivas Kandagatla
5b39363e54
ASoC: q6asm-dai: prepare set params to accept profile change
rearrange code so that it will be easy to change the codec
profile at runtime. This means moving exiting set_params
to an internal wrapper which can be called when codec
profile changes.

This is also preparing the code for easy to use in gapless cases.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-9-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:37 +01:00
Srinivas Kandagatla
135bd5ea19
ASoC: q6asm-dai: add next track metadata support
This patch adds support to metadata required to do a gapless playback.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:36 +01:00
Srinivas Kandagatla
983b8864f6
ASoC: q6asm: add support to gapless flag in q6asm open
This patch adds support to gapless flag to q6asm_open_write().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:35 +01:00
Srinivas Kandagatla
3937612978
ASoC: q6asm: add support to remove intial and trailing silence
This patch adds support to ASM_DATA_CMD_REMOVE_INITIAL_SILENCE
and ASM_DATA_CMD_REMOVE_TRAILING_SILENCE q6asm command to support
compressed metadata for gapless playback.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:34 +01:00
Srinivas Kandagatla
50d4e2146c
ASoC: q6asm: add length to write command token
Add length to write command packet token so that we can track exactly
how many bytes are consumed by DSP in the command reply.

This is useful in some use-cases where the end of the file/stream
is not aligned with period size.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:33 +01:00
Srinivas Kandagatla
e0c078a8da
ASoC: q6asm: use flags directly from q6asm-dai
use flags set by q6asm-dais directly!

This will be useful gapless case where write needs a special flag to indicate
that last buffer.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:32 +01:00
Srinivas Kandagatla
789e3b6c52
ASoC: q6asm: make commands specific to streams
Each ASM session can have multiple streams attached to it,
current design was to allow only one static stream id 1 per each session.
However for use-case like gapless, we would need 2 streams to open per session.

This patch converts all the q6asm apis to take stream id as argument
to allow multiple streams to open on a single session, This is useful
for gapless playback cases.

Now the dai driver can specify which stream id for each command.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:31 +01:00
Srinivas Kandagatla
99b7db5f6d
ASoC: q6asm: rename misleading session id variable
Each q6asm session can have multiple streams, mixing usage of these
names in variable are bit misleading to reader, so rename them accordingly.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 18:29:30 +01:00
Michael Sit Wei Hong
9c3bab3c4f
ASoC: Intel: KMB: Enable TDM audio capture
Enable I2S TDM audio capture for Intel Keem Bay platform.
The I2S TDM will support 4 channel and 8 channel audio capture only.
4 channel and 8 channel audio capture operates only in slave mode.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200811041836.999-2-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 17:44:31 +01:00
Michael Sit Wei Hong
9d4befff5a
ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset
Moving GPIO reset to a later stage and before clock registration to
ensure that the host system and codec clocks are in sync. If the host
register clock values prior to gpio reset, the last configured codec clock
is registered to the host. The codec then gets gpio resetted setting the
codec clocks to their default value, causing a mismatch. Host system will
skip clock setting thinking the codec clocks are already at the requested
rate.

ADC reset is added to ensure the next audio capture does not have
undesired artifacts. It is probably related to the original code
where the probe function resets the ADC prior to 1st record.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200812094631.4698-4-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:36:24 +01:00
Michael Sit Wei Hong
d1c859d314
ASoC: codec: tlv3204: Increased maximum supported channels
Increased maximum supported channel to 8 channels for audio capture
running in TDM mode.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200812094631.4698-3-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:36:23 +01:00
Michael Sit Wei Hong
dcd79364bf
ASoC: codec: tlv3204: Enable 24 bit audio support
Enable 24 bit in 32 bit container audio support.
Using the params_physical_width to differentiate
24 bit in 32 bit container and 24 bit in 24 bit container modes.
Use the sample rate, bit depth and channel parameters to
calculate the bit clock needed.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200812094631.4698-2-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:36:22 +01:00
Samuel Holland
7829e68d55
ASoC: sun50i-codec-analog: Enable DAPM for earpiece switch
By including the earpiece mute switch in the DAPM graph, both the
earpiece amplifier and the Mixer/DAC inputs can be powered off when
the earpiece is muted.

While the widget is really just a simple switch, it is represented
as a "mixer with named controls" to avoid including the widget name
in the kcontrol name. Otherwise, it is not possible to give the widget
an accurate, descriptive name without changing the kcontrol name
seen by userspace (which should be stable).

The mute switch is between the source selection and the amplifier,
as per the diagram in the SoC manual.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200726025334.59931-9-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:17 +01:00
Samuel Holland
95d34762f2
ASoC: sun50i-codec-analog: Enable DAPM for line out switch
By including the line out mute switch in the DAPM graph, the
Mixer/DAC inputs can be powered off when the line output is muted.

The line outputs have an unusual routing scheme. The left side mute
switch is between the source selection and the amplifier, as usual.
The right side source selection comes *after* its amplifier (and
after the left side amplifier), and its mute switch controls
whichever source is currently selected. This matches the diagram in
the SoC manual.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-8-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:17 +01:00
Samuel Holland
dd8286a349
ASoC: sun50i-codec-analog: Make line out routes stereo
This matches the hardware more accurately, and is necessary for
including the (stereo) line out mute switch in the DAPM graph.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-7-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:16 +01:00
Samuel Holland
4b9f39e14c
ASoC: sun50i-codec-analog: Enable DAPM for headphone switch
By including the headphone mute switch to the DAPM graph, both the
headphone amplifier and the Mixer/DAC inputs can be powered off when
the headphones are muted.

The mute switch is between the source selection and the amplifier,
as per the diagram in the SoC manual.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-6-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:15 +01:00
Samuel Holland
241a578a9e
ASoC: sun50i-codec-analog: Make headphone routes stereo
This matches the hardware more accurately, and is necessary for
including the (stereo) headphone mute switch in the DAPM graph.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-5-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:14 +01:00
Samuel Holland
cababecb33
ASoC: sun50i-codec-analog: Group and sort mixer routes
Sort the controls in the same order as the bits in the register. Then
group the routes by sink, and sort them in the same order as the
controls. This makes it much easier to verify that all mixer inputs are
accounted for.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-4-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:13 +01:00
Samuel Holland
9b7612bb75
ASoC: sun50i-codec-analog: Gate the amplifier clock during suspend
The clock must be running for the zero-crossing mute functionality.
However, it must be gated for VDD-SYS to be turned off during system
suspend. Disable it in the suspend callback, after everything has
already been muted, to avoid pops when muting/unmuting outputs.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-3-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:12 +01:00
Samuel Holland
ad5b7f69a0
ASoC: sun50i-codec-analog: Fix duplicate use of ADC enable bits
The same enable bits are currently used for both the "Left/Right ADC"
and the "Left/Right ADC Mixer" widgets. This happens to work in practice
because the widgets are always enabled/disabled at the same time, but
each register bit should only be associated with a single widget.

To keep symmetry with the DAC widgets, keep the bits on the ADC widgets,
and remove them from the ADC Mixer widgets.

Fixes: 42371f327d ("ASoC: sunxi: Add new driver for Allwinner A64 codec's analog path controls")
Reported-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200726025334.59931-2-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 16:19:11 +01:00
Pierre-Louis Bossart
9c7deb0576
ASoC: Intel: bytcht_cx2072x: simplify return handling
Fix cppcheck warning:

sound/soc/intel/boards/bytcht_cx2072x.c:102:9: warning: Identical
condition and return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:42:59 +01:00
Pierre-Louis Bossart
1e6444271c
ASoC: Intel: rename shadowed variable for all broadwell boards
Fix cppcheck warnings:

sound/soc/intel/boards/bdw-rt5650.c:91:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

sound/soc/intel/boards/bdw-rt5677.c:144:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

sound/soc/intel/boards/broadwell.c:91:23: style: Local variable
'channels' shadows outer variable [shadowVariable]

This was fixed earlier in other machine drivers but keeps coming back
with copy/paste.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:42:58 +01:00
Pierre-Louis Bossart
2e3e0bc378
ASoC: SOF: Intel: hda-codec: move variable used conditionally
Cppcheck reports the following warning:

sound/soc/sof/intel/hda-codec.c:122:20: style: Unused variable: codec
[unusedVariable]
 struct hda_codec *codec;
                   ^

Move declaration inside a conditionally-compiled block.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:42:57 +01:00
Pierre-Louis Bossart
11ec0edc64
ASOC: SOF: Intel: hda-codec: move unused label to correct position
Cppcheck reports the following warning:

sound/soc/sof/intel/hda-codec.c:191:1: style: Label 'error' is not
used. [unusedLabel]

This label is indeed only used conditionally, move it where it's
actually used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:42:56 +01:00
Samuel Holland
7518805fb6
ASoC: sun8i-codec: Add a quirk for LRCK inversion
On the A64, as tested using the PinePhone, the current code causes the
left/right channels to be swapped during I2S playback from the CPU on
AIF1, and breaks DSP_A communication with the modem on AIF2. Both of
these are fixed when LRCK is no longer inverted.

Trusting that the comment in the code is correct, the existing behavior
is kept for the A33.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200726012557.38282-5-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:21:57 +01:00
Samuel Holland
e47d2dcd88
ASoC: sun8i-codec: Add missing mixer routes
The sun8i-codec driver provides ALSA controls for enabling/disabling
each of the inputs to the AIF1 Slot 0 and DAC mixers. For two of these
inputs (ADC->DAC and AIF1 DA0->AIF1 AD0), the audio source is
implemented, so the mixer inputs can be used.

However, because the DAPM routes are missing, these mixer inputs only
work when both the source and the mixer happen to be part of other
active audio paths. Adding the appropriate routes makes these ALSA
controls function all of the time.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200726012557.38282-4-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:21:56 +01:00
Samuel Holland
90cac93297
ASoC: sun8i-codec: Fix DAPM to match the hardware topology
The A33/A64 digital codec has 4 physical inputs and 4 physical outputs:
3 AIFs/DAIs and one ADC/DAC pair. Internal routing is accomplished by
a 4-channel mixer connected to each output.

The analog and digital sides of the ADC/DAC are in separate ASoC
components, so card-level DAPM routes (provided in the device tree) are
necessary to connect them together. Currently, these routes are wrong.

For AIF1 Playback, the correct topology is:

         ||<<============ sun8i-codec ===========>>||
         ||                                        ||
 CPU DAI -> AIF1 DA0 -> DAC Mixer -> DAC (digital) -> DAC (analog)
         ||                                        ||

but the driver and device trees currently describe:

         ||                                        ||
 CPU DAI -> AIF1 DA0 -------------------------------> DAC (analog)
         ||     \--> DAC Mixer -> ??? [dead end]   ||

For AIF1 Capture, there is an additional problem, because the Mixer
route is backward. The topology should be:

              ||                                             ||
 ADC (analog) -> ADC (digital) -> AIF1 AD0 Mixer -> AIF1 AD0 -> CPU DAI
              ||                                             ||

but the driver and device trees currently describe:

              ||                                             ||
 ADC (analog) -> AIF1 AD0 ------------------------------------> CPU DAI
              ||     \--> ADC Mixer -> ??? [dead end]        ||

The ADC/DAC are only powered because AIF1 AD0 (capture) has supply
routes from the ADC, and AIF1 DA0 (playback) has supply routes from the
DAC. However, neither set of supply routes matches the hardware
topology. Audio can be routed among AIF1/2/3 without using the ADC or
DAC at all; and audio can be routed from the ADC to the DAC without
using any AIFs (via the "ADC Digital DAC Playback Switch"). Because the
DAPM routes are wrong, both of these use cases are currently broken.

This commit adds the necessary widgets and routes to represent the real
hardware topology, with functionality equivalent to the current driver.

For the existing "allwinner,sun8i-a33-codec" compatible, widgets with
the old names are kept as wrappers around the new widgets, so existing
device trees will continue to work. For "allwinner,sun50i-a64-codec",
the old widgets can be omitted, because no device trees yet use that
compatible.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200726012557.38282-3-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 15:21:55 +01:00
Shengjiu Wang
9355a7b189
ASoC: fsl_sai: Replace synchronous check with fsl_sai_dir_is_synced
As new function fsl_sai_dir_is_synced is included for checking if
stream is synced by the opposite stream, then replace the existing
synchronous checking with this new function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200805063413.4610-4-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:56:51 +01:00
Shengjiu Wang
7b3bee091e
ASoC: fsl_sai: Drop TMR/RMR settings for synchronous mode
Tx synchronous with Rx: The RMR is the word mask register, it is used
to mask any word in the frame, it is not relating to clock generation,
So it is no need to be changed when Tx is going to be enabled.

Rx synchronous with Tx: The TMR is the word mask register, it is used
to mask any word in the frame, it is not relating to clock generation,
So it is no need to be changed when Rx is going to be enabled.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200805063413.4610-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:56:50 +01:00
Shengjiu Wang
94741eba63
ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger()
Current code enables TCSR.TE and RCSR.RE together, and disable
TCSR.TE and RCSR.RE together in trigger(), which only supports
one operation mode:
1. Rx synchronous with Tx: TE is last enabled and first disabled

Other operation mode need to be considered also:
2. Tx synchronous with Rx: RE is last enabled and first disabled.
3. Asynchronous mode: Tx and Rx are independent.

So the enable TCSR.TE and RCSR.RE sequence and the disable
sequence need to be refined accordingly for #2 and #3.

There is slightly against what RM recommennds with this change.
For example in Rx synchronous with Tx mode, case "aplay 1.wav;
arecord 2.wav" enable TE before RE. But it should be safe to
do so, judging by years of testing results.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200805063413.4610-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:56:49 +01:00
Rohit kumar
b05372c84d
ASoC: qcom: lpass-platform: Use platform_get_irq
platform_get_irq_byname() is used when there is list
of interrupts in the device node. As lpass-platform
has only one interrupt entry, use platform_get_irq()
instead.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Link: https://lore.kernel.org/r/1597402388-14112-12-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:33 +01:00
Rohit kumar
93dbbd6571
ASoC: qcom: lpass-cpu: Use platform_get_resource
platform_get_resource_byname() is used when there
is list of reg entries. As lpass-cpu node has only
one reg entry, use platform_get_resource() instead.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-11-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:32 +01:00
Ajit Pandey
24caf8d9eb
ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio
Add platform driver for configuring sc7180 lpass core I2S and
DMA configuration to support playback & capture to external codecs
connected over primary & secondary MI2S interfaces.

Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-10-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:31 +01:00
Rohit kumar
753a6e1794
ASoC: qcom: lpass-cpu: fix concurrency issue
i2sctl register value is set to 0 during hw_free(). This
impacts any ongoing concurrent session on the same i2s
port. As trigger() stop already resets enable bit to 0,
there is no need of explicit hw_free. Removing it to
fix the issue.

Fixes: 80beab8e1d ("ASoC: qcom: Add LPASS CPU DAI driver")
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-7-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:30 +01:00
Rohit kumar
b5022a36d2
ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers
I2SCTL and DMACTL registers has different bits alignment for newer
LPASS variants of SC7180 soc. Use REG_FIELD_ID() to define the
reg_fields in platform specific file and removed shifts and mask
macros for such registers from header file.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Link: https://lore.kernel.org/r/1597402388-14112-6-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:29 +01:00
Rohit kumar
5fd188215d
ASoC: qcom: lpass-platform: fix memory leak
lpass_pcm_data is never freed. Free it in close
ops to avoid memory leak.

Fixes: 022d00ee0b ("ASoC: lpass-platform: Fix broken pcm data usage")
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-5-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:28 +01:00
Ajit Pandey
784771863a
ASoC: qcom: lpass-platform: Replace card->dev with component->dev
We are allocating dma memory for component->dev but trying to mmap
such memory for substream->pcm->card->dev. Replace device argument
in mmap with component->dev to fix this.

Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-4-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:27 +01:00
Rohit kumar
a503567d70
ASoC: qcom: lpass-cpu: Move ahbix clk to platform specific function
Ahbix clock is optional clock and not needed for all platforms.
Move it to lpass-apq8016/ipq806x as it is not needed for sc7180.

Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-3-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:26 +01:00
Ajit Pandey
1220f6a76e
ASoC: qcom: Add common array to initialize soc based core clocks
LPASS variants have their own soc specific clocks that needs to be
enabled for MI2S audio support. Added a common variable in drvdata to
initialize such clocks using bulk clk api. Such clock names is
defined in variants specific data and needs to fetched during init.

Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-2-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 14:39:25 +01:00
Stephen Boyd
653bdab267
ASoC: rt5682: Use clk_hw based APIs for registration
The (new?) style of clk registration uses clk_hw based APIs so that we
can more easily see the difference between clk providers and clk
consumers. Use the clk_hw based APIs to do this and migrate to devm for
the clkdev creation so that we can reduce the amount of code.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Cc: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20200804000531.920688-4-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 13:33:44 +01:00
Stephen Boyd
edbd24ea1e
ASoC: rt5682: Drop usage of __clk_get_name()
The __clk_get_name() API is deprecated. Use clk_hw_get_name() or
proper registration techniques to avoid it.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Cc: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20200804000531.920688-3-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 13:33:44 +01:00
Stephen Boyd
0b95aa8e8a
ASoC: rt5682: Use dev_dbg() in rt5682_clk_check()
I see a spew of "sysclk/dai not set correctly" whenever I cat
/sys/kernel/debug/clk/clk_summary on my device. This is because the
master pointer isn't set yet in this driver. A user isn't going to be
able to do much if this check is failing so this error message isn't
really an error, it's more of a kernel debug message. Lower the priority
to dev_dbg() so that it isn't so noisy.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Cc: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20200804000531.920688-2-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 13:33:43 +01:00
Mark Brown
549ade5721
Merge existing fixes from asoc/for-5.9 2020-08-17 12:42:43 +01:00
Dinghao Liu
062fa09f44
ASoC: intel: Fix memleak in sst_media_open
When power_up_sst() fails, stream needs to be freed
just like when try_module_get() fails. However, current
code is returning directly and ends up leaking memory.

Fixes: 0121327c1a ("ASoC: Intel: mfld-pcm: add control for powering up/down dsp")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813084112.26205-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 12:28:57 +01:00
Sylwester Nawrocki
f082bb59b7
ASoC: wm8994: Avoid attempts to read unreadable registers
The driver supports WM1811, WM8994, WM8958 devices but according to
documentation and the regmap definitions the WM8958_DSP2_* registers
are only available on WM8958. In current code these registers are
being accessed as if they were available on all the three chips.

When starting playback on WM1811 CODEC multiple errors like:
"wm8994-codec wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5"
can be seen, which is caused by attempts to read an unavailable
WM8958_DSP2_PROGRAM register. The issue has been uncovered by recent
commit "e2329ee ASoC: soc-component: add soc_component_err()".

This patch adds a check in wm8958_aif_ev() callback so the DSP2 handling
is only done for WM8958.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200731173834.23832-1-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 12:28:56 +01:00
Srinivas Kandagatla
ff69c97ef8
ASoC: msm8916-wcd-analog: fix register Interrupt offset
For some reason interrupt set and clear register offsets are
not set correctly.
This patch corrects them!

Fixes: 585e881e5b ("ASoC: codecs: Add msm8916-wcd analog codec")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200811103452.20448-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 12:28:55 +01:00
Sylwester Nawrocki
314213c157
ASoC: wm8994: Prevent access to invalid VU register bits on WM1811
The ADC2 and DAC2 are not available on WM1811 device. This patch moves
the ADC2, DAC2 VU bitfields to a separate array so we can skip accessing
them and avoid unreadable register access on WM1811.

This allows to get rid of warnings during boot like:
wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20200804141043.11425-1-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17 12:28:54 +01:00
Srinivas Kandagatla
796a58fe2b
ASoC: q6routing: add dummy register read/write function
Most of the DAPM widgets for DSP ASoC components reuse reg field
of the widgets for its internal calculations, however these are not
real registers. So read/writes to these numbers are not really
valid. However ASoC core will read these registers to get default
state during startup.

With recent changes to ASoC core, every register read/write
failures are reported very verbosely. Prior to this fails to reads
are totally ignored, so we never saw any error messages.

To fix this add dummy read/write function to return default value.

Fixes: e3a33673e8 ("ASoC: qdsp6: q6routing: Add q6routing driver")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200811120205.21805-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-11 14:05:48 +01:00
Srinivas Kandagatla
56235e4bc5
ASoC: q6afe-dai: mark all widgets registers as SND_SOC_NOPM
Looks like the q6afe-dai dapm widget registers are set as "0",
which is a not correct.

As this registers will be read by ASoC core during startup
which will throw up errors, Fix this by making the registers
as SND_SOC_NOPM as these should be never used.

With recent changes to ASoC core, every register read/write
failures are reported very verbosely. Prior to this fails to reads
are totally ignored, so we never saw any error messages.

Fixes: 24c4cbcfac ("ASoC: qdsp6: q6afe: Add q6afe dai driver")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200811120205.21805-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-11 14:05:47 +01:00
Takashi Iwai
efc913c8fb
ASoC: Make soc_component_read() returning an error code again
Along with the recent unification of snd_soc_component_read*()
functions, the behavior of snd_soc_component_read() was changed
slightly; namely it returns the register read value directly, and even
if an error happens, it returns zero (but it prints an error
message).  That said, the caller side can't know whether it's an error
or not any longer.

Ideally this shouldn't matter much, but in practice this seems causing
a regression, as John reported.  And, grepping the tree revealed that
there are still plenty of callers that do check the error code, so
we'll need to deal with them in anyway.

As a quick band-aid over the regression, this patch changes the return
value of snd_soc_component_read() again to the negative error code.
It can't work, obviously, for 32bit register values, but it should be
enough for the known regressions, so far.

Fixes: cf6e26c71b ("ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200810134631.19742-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-11 14:05:46 +01:00
Ravulapati Vishnu vardhan rao
ea7dc09782
ASoC: amd: Replacing component->name with codec_dai->name.
Replacing string compare with "codec_dai->name" instead of comparing with
"codec_dai->component->name" in hw_params because,
Here the component name for codec RT1015 is "i2c-10EC5682:00"
and will never be "rt1015-aif1" as it is codec-dai->name.
So, strcmp() always compares and fails to set the
sysclk,pll,bratio for expected codec-dai="rt1015-aif1".

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200807161046.17932-1-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-10 18:42:48 +01:00
Linus Torvalds
3f9df56480 sound updates for 5.9
This became wide and scattered updates all over the sound tree as
 diffstat shows: lots of (still ongoing) refactoring works in ASoC,
 fixes and cleanups caught by static analysis, inclusive term
 conversions as well as lots of new drivers.  Below are highlights:
 
 ASoC core:
 * API cleanups and conversions to the unified mute_stream() call
 * Simplify I/O helper functions
 * Use helper macros to retrieve RTD from substreams
 
 ASoC drivers:
 * Lots of fixes and cleanups in Intel ASoC drivers
 * Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
   Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
   nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
   boards, TI J721e EVM
 
 ALSA core:
 * Minor code refacotring for SG-buffer handling
 
 HD-audio:
 * Generalization of mute-LED handling with LED classdev
 * Intel silent stream support for HDMI
 * Device-specific fixes: CA0132, Loongson-3
 
 Others:
 * Usual USB- and HD-audio quirks for various devices
 * Fixes for echoaudio DMA position handling
 * Various documents and trivial fixes for sparse warnings
 * Conversion to adapt inclusive terms
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAl8r2C4OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE892xAAg5LyExJUtC127P5zs5pX03FuHhZ/oftEcbO1
 LUDE6VyWoLrHo7dmIvKANF2ppfu2hooyuYhFbOD/Wk2BtzmQq/cvrkzM/fjokXiu
 G4jPbV6hhyV2bJ/zTAXPjr1rQNXbAAzvuyjKs+IufuWSGa3ktRd89xliqSHHVE/T
 L0us45WpvfsaiCWElUvWaM1Fyex6aOBeKV19WjQYzv213CcgFhQr/0HxI8uN4Uxc
 Fd89PRXFVJvPwb1L6hPw2X8Yj8BK+6xWqsHsQhqECkyprrh7o5m5XwqyEdK5NRms
 f5hrisze5h6jqbY8TlvRpZkrJ495Ek1W85FndvRgOM671Y1mMPtC/2qYb1YU/jBO
 yCFq26JNeM/X1W+KJqvCbMwQn5af33pIQ++P18fn0MF1agnOWNHxWa0vaEuFcFAy
 Du8BQ8ovOzHAxKSWwRCakq/pRKijiBdfizOZIDMgSP0g/4oBVWDfA9eGwgQQ35J9
 RlSx+1bm3v5RigPQa/y8B9/+4W50DSrA/q0eMkwE5bYh7Xh05Vapf7khh/vgEsEu
 m7/tKhC26D/RcdbnHxBRH2UARCBNIcbZdsOlIVveX+/6ObyegFZOOzHbDb4huAdD
 G2Q/sFmPuWM+R0J/C9RuMCjhKRQgPCuXDT0CJXrvgORV6BxpONcfcnXb89QbEWw5
 E+eW+/I=
 =sy7n
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This became wide and scattered updates all over the sound tree as
  diffstat shows: lots of (still ongoing) refactoring works in ASoC,
  fixes and cleanups caught by static analysis, inclusive term
  conversions as well as lots of new drivers. Below are highlights:

  ASoC core:
   - API cleanups and conversions to the unified mute_stream() call
   - Simplify I/O helper functions
   - Use helper macros to retrieve RTD from substreams

  ASoC drivers:
   - Lots of fixes and cleanups in Intel ASoC drivers
   - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
     Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
     nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
     boards, TI J721e EVM

  ALSA core:
   - Minor code refacotring for SG-buffer handling

  HD-audio:
   - Generalization of mute-LED handling with LED classdev
   - Intel silent stream support for HDMI
   - Device-specific fixes: CA0132, Loongson-3

  Others:
   - Usual USB- and HD-audio quirks for various devices
   - Fixes for echoaudio DMA position handling
   - Various documents and trivial fixes for sparse warnings
   - Conversion to adopt inclusive terms"

* tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits)
  ALSA: pci: delete repeated words in comments
  ALSA: isa: delete repeated words in comments
  ALSA: hda/tegra: Add 100us dma stop delay
  ALSA: hda: Add dma stop delay variable
  ASoC: hda/tegra: Set buffer alignment to 128 bytes
  ALSA: seq: oss: Serialize ioctls
  ALSA: hda/hdmi: Add quirk to force connectivity
  ALSA: usb-audio: add startech usb audio dock name
  ALSA: usb-audio: Add support for Lenovo ThinkStation P620
  Revert "ALSA: hda: call runtime_allow() for all hda controllers"
  ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
  ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
  ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
  ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
  ALSA: docs: fix typo
  ALSA: doc: use correct config variable name
  ASoC: core: Two step component registration
  ASoC: core: Simplify snd_soc_component_initialize declaration
  ASoC: core: Relocate and expose snd_soc_component_initialize
  ASoC: sh: Replace 'select' DMADEVICES 'with depends on'
  ...
2020-08-06 14:27:31 -07:00
Linus Torvalds
ab5c60b79a Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu:
 "API:
   - Add support for allocating transforms on a specific NUMA Node
   - Introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY for storage users

  Algorithms:
   - Drop PMULL based ghash on arm64
   - Fixes for building with clang on x86
   - Add sha256 helper that does the digest in one go
   - Add SP800-56A rev 3 validation checks to dh

  Drivers:
   - Permit users to specify NUMA node in hisilicon/zip
   - Add support for i.MX6 in imx-rngc
   - Add sa2ul crypto driver
   - Add BA431 hwrng driver
   - Add Ingenic JZ4780 and X1000 hwrng driver
   - Spread IRQ affinity in inside-secure and marvell/cesa"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (157 commits)
  crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR
  hwrng: core - remove redundant initialization of variable ret
  crypto: x86/curve25519 - Remove unused carry variables
  crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and X1000
  dt-bindings: RNG: Add Ingenic RNG bindings.
  crypto: caam/qi2 - add module alias
  crypto: caam - add more RNG hw error codes
  crypto: caam/jr - remove incorrect reference to caam_jr_register()
  crypto: caam - silence .setkey in case of bad key length
  crypto: caam/qi2 - create ahash shared descriptors only once
  crypto: caam/qi2 - fix error reporting for caam_hash_alloc
  crypto: caam - remove deadcode on 32-bit platforms
  crypto: ccp - use generic power management
  crypto: xts - Replace memcpy() invocation with simple assignment
  crypto: marvell/cesa - irq balance
  crypto: inside-secure - irq balance
  crypto: ecc - SP800-56A rev 3 local public key validation
  crypto: dh - SP800-56A rev 3 local public key validation
  crypto: dh - check validity of Z before export
  lib/mpi: Add mpi_sub_ui()
  ...
2020-08-03 10:40:14 -07:00
Mark Brown
58ff5f4db1
Merge series "ASoC: tegra: Fix compile warning with CONFIG_PM=n" from Takashi Iwai <tiwai@suse.de>:
Hi,

this is a trivial patch set to add the missing __maybe_unused for
covering the compile warnings with CONFIG_PM=n.

Takashi

===

Takashi Iwai (5):
  ASoC: tegra: tegra186_dspk: Fix compile warning with CONFIG_PM=n
  ASoC: tegra: tegra210_admaif: Fix compile warning with CONFIG_PM=n
  ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n
  ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n
  ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n

 sound/soc/tegra/tegra186_dspk.c   | 4 ++--
 sound/soc/tegra/tegra210_admaif.c | 4 ++--
 sound/soc/tegra/tegra210_ahub.c   | 4 ++--
 sound/soc/tegra/tegra210_dmic.c   | 4 ++--
 sound/soc/tegra/tegra210_i2s.c    | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

--
2.16.4
2020-08-03 16:25:49 +01:00
Takashi Iwai
9493755d7c
ASoC: fsl: Fix unused variable warning
The variable rtd was left unused in psc_dma_free(), even unnoticed
during conversion to a new style:
  sound/soc/fsl/mpc5200_dma.c:342:30: warning: unused variable 'rtd' [-Wunused-variable]

Drop the superfluous one.

Fixes: 6d1048bc11 ("ASoC: fsl: mpc5200_dma: remove snd_pcm_ops")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803144630.9615-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 16:25:48 +01:00
Takashi Iwai
823279c374
ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_i2s.c:167:12: warning: 'tegra210_i2s_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_i2s.c:179:12: warning: 'tegra210_i2s_runtime_resume' defined but not used [-Wunused-function]

Fixes: c0bfa98349 ("ASoC: tegra: Add Tegra210 based I2S driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-6-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 16:17:08 +01:00
Takashi Iwai
7543f16a04
ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_dmic.c:43:12: warning: 'tegra210_dmic_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_dmic.c:55:12: warning: 'tegra210_dmic_runtime_resume' defined but not used [-Wunused-function]

Fixes: 8c8ff982e9 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-5-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 16:17:07 +01:00
Takashi Iwai
fafac55960
ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_ahub.c:579:12: warning: 'tegra_ahub_runtime_resume' defined but not used [-Wunused-function]

Fixes: 16e1bcc2ca ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 16:17:06 +01:00
Takashi Iwai
1337f2c5f1
ASoC: tegra: tegra210_admaif: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_admaif.c:232:12: warning: 'tegra_admaif_runtime_resume' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function]

Fixes: f74028e159 ("ASoC: tegra: Add Tegra210 based ADMAIF driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 16:17:05 +01:00
Takashi Iwai
b191f01a37
ASoC: tegra: tegra186_dspk: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra186_dspk.c:74:12: warning: 'tegra186_dspk_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra186_dspk.c:86:12: warning: 'tegra186_dspk_runtime_resume' defined but not used [-Wunused-function]

Fixes: 327ef64702 ("ASoC: tegra: Add Tegra186 based DSPK driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 16:17:04 +01:00
Hui Wang
ccff7bd468
ASoC: amd: renoir: restore two more registers during resume
Recently we found an issue about the suspend and resume. If dmic is
recording the sound, and we run suspend and resume, after the resume,
the dmic can't work well anymore. we need to close the app and reopen
the app, then the dmic could record the sound again.

For example, we run "arecord -D hw:CARD=acp,DEV=0 -f S32_LE -c 2
-r 48000 test.wav", then suspend and resume, after the system resume
back, we speak to the dmic. then stop the arecord, use aplay to play
the test.wav, we could hear the sound recorded after resume is weird,
it is not what we speak to the dmic.

I found two registers are set in the dai_hw_params(), if the two
registers are set during the resume, this issue could be fixed.
Move the code of the dai_hw_params() into the pdm_dai_trigger(), then
these two registers will be set during resume since pdm_dai_trigger()
will be called during resume. And delete the empty function
dai_hw_params().

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200730123138.5659-1-hui.wang@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 14:17:34 +01:00
Fabio Estevam
b023666e6c
ASoC: wm8962: Do not remove ADDITIONAL_CONTROL_4 from readable register list
Removing ADDITIONAL_CONTROL_4 from the list of readable registers cause
audio distortion.

This change was sent as a comment below the --- line when submitting
commit 658bb297e3 ("ASoC: wm8962: Do not access WM8962_GPIO_BASE"), so
it was not supposed to get merged.

Keep WM8962_ADDITIONAL_CONTROL_4 inside wm8962_readable_register() to
fix the regression.

Fixes: 658bb297e3 ("ASoC: wm8962: Do not access WM8962_GPIO_BASE")
Reported-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20200803115233.19034-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 14:17:33 +01:00
Shengjiu Wang
f36e8edb95
ASoC: fsl-asoc-card: Remove fsl_asoc_card_set_bias_level function
With this case:
aplay -Dhw:x 16khz.wav 24khz.wav
There is sound distortion for 24khz.wav. The reason is that setting
PLL of WM8962 with set_bias_level function, the bias level is not
changed when 24khz.wav is played, then the PLL won't be reset, the
clock is not correct, so distortion happens.

The resolution of this issue is to remove fsl_asoc_card_set_bias_level.
Move PLL configuration to hw_params and hw_free.

After removing fsl_asoc_card_set_bias_level, also test WM8960 case,
it can work.

Fixes: 708b4351f0 ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1596420811-16690-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-03 14:17:32 +01:00
Mark Brown
84569f329f
Merge remote-tracking branch 'asoc/for-5.9' into asoc-next 2020-07-31 19:54:03 +01:00
Mark Brown
c8f7dbdbaa
Merge remote-tracking branch 'asoc/for-5.8' into asoc-linus 2020-07-31 19:54:01 +01:00
Mark Brown
8e34f1e867
Merge series "ASoC: core: Two step component registration" from Cezary Rojewski <cezary.rojewski@intel.com>:
Provide a mechanism for true two-step component registration. This
mimics device registration flow where initialization is the first step
while addition goes as second in line. Drivers may choose to modify
component's fields before registering component to ASoC subsystem via
snd_soc_add_component.

Patchset achieves status quo - behavior of snd_soc_register_component
remains unchanged.

Cezary Rojewski (3):
  ASoC: core: Relocate and expose snd_soc_component_initialize
  ASoC: core: Simplify snd_soc_component_initialize declaration
  ASoC: core: Two step component registration

 include/sound/soc-component.h         |  3 --
 include/sound/soc.h                   | 11 +++---
 sound/soc/soc-component.c             | 16 ---------
 sound/soc/soc-core.c                  | 52 +++++++++++++++++----------
 sound/soc/soc-generic-dmaengine-pcm.c | 14 +++++---
 sound/soc/stm/stm32_adfsdm.c          |  9 +++--
 6 files changed, 55 insertions(+), 50 deletions(-)

--
2.17.1
2020-07-31 19:36:00 +01:00
Cezary Rojewski
ea029dd8d0
ASoC: core: Two step component registration
Modify snd_soc_add_component so it calls snd_soc_component_initialize
no longer and thus providing true two-step registration. Drivers may
choose to change component's fields before actually adding it to ASoC
subsystem.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20200731144146.6678-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:35:59 +01:00
Cezary Rojewski
7274d4cd85
ASoC: core: Simplify snd_soc_component_initialize declaration
Move 'name' field initialization responsibility back to
snd_soc_component_initialize to prepare snd_soc_add_component function
for being called separatelly as a second registration step.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20200731144146.6678-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:35:58 +01:00
Cezary Rojewski
08ff7209fa
ASoC: core: Relocate and expose snd_soc_component_initialize
To allow for two-step component registration, expose
snd_soc_component_initialize function and move it back to soc-core.c.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20200731144146.6678-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:35:57 +01:00
Laurent Pinchart
2dbf11ec7d
ASoC: sh: Replace 'select' DMADEVICES 'with depends on'
Enabling a whole subsystem from a single driver 'select' is frowned
upon and won't be accepted in new drivers, that need to use 'depends on'
instead. Existing selection of DMADEVICES will then cause circular
dependencies. Replace them with a dependency.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20200731152433.1297-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:17:02 +01:00
Shengjiu Wang
5aef1ff239
ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK
The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on
i.MX7ULP.

Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for
these platform, the FIFO watermark mask should be updated
according to the fifo_depth.

Fixes: a860fac420 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:06:53 +01:00
Jerome Brunet
da3f23fde9
ASoC: meson: cards: deal dpcm flag change
Commit b73287f0b0 ("ASoC: soc-pcm: dpcm: fix playback/capture checks")
changed the meaning of dpcm_playback/dpcm_capture and now requires the
CPU DAI BE to aligned with those flags.

This broke all Amlogic cards with uni-directional backends (All gx and
most axg cards).

While I'm still confused as to how this change is an improvement, those
cards can't remain broken forever. Hopefully, next time an API change is
done like that, all the users will be updated as part of the change, and
not left to fend for themselves.

Fixes: b73287f0b0 ("ASoC: soc-pcm: dpcm: fix playback/capture checks")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200731120603.2243261-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:06:52 +01:00
Pierre-Louis Bossart
4f8721542f
ASoC: core: use less strict tests for dailink capabilities
Previous updates to set dailink capabilities and check dailink
capabilities were based on a flawed assumption that all dais support
the same capabilities as the dailink. This is true for TDM
configurations but existing configurations use an amplifier and a
capture device on the same dailink, and the tests would prevent the
card from probing.

This patch modifies the snd_soc_dai_link_set_capabilities()
helper so that the dpcm_playback (resp. dpcm_capture) dailink
capabilities are set if at least one dai supports playback (resp. capture).

Likewise the checks are modified so that an error is reported only
when dpcm_playback (resp. dpcm_capture) is set but none of the CPU
DAIs support playback (resp. capture).

Fixes: 25612477d2 ('ASoC: soc-dai: set dai_link dpcm_ flags with a helper')
Fixes: b73287f0b0 ('ASoC: soc-pcm: dpcm: fix playback/capture checks')
Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200723180533.220312-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31 19:06:51 +01:00
Mark Brown
14e5ad7d11
Merge series "drop unnecessary list_empty" from Julia Lawall <Julia.Lawall@inria.fr>:
The various list iterators are able to handle an empty list.
The only effect of avoiding the loop is not initializing some
index variables.
Drop list_empty tests in cases where these variables are not
used.

The semantic patch that makes these changes is as follows:
(http://coccinelle.lip6.fr/)

<smpl>
@@
expression x,e;
iterator name list_for_each_entry;
statement S;
identifier i;
@@

-if (!(list_empty(x))) {
   list_for_each_entry(i,x,...) S
- }
 ... when != i
? i = e

@@
expression x,e;
iterator name list_for_each_entry_safe;
statement S;
identifier i,j;
@@

-if (!(list_empty(x))) {
   list_for_each_entry_safe(i,j,x,...) S
- }
 ... when != i
     when != j
(
  i = e;
|
? j = e;
)

@@
expression x,e;
iterator name list_for_each;
statement S;
identifier i;
@@

-if (!(list_empty(x))) {
   list_for_each(i,x) S
- }
 ... when != i
? i = e

@@
expression x,e;
iterator name list_for_each_safe;
statement S;
identifier i,j;
@@

-if (!(list_empty(x))) {
   list_for_each_safe(i,j,x) S
- }
 ... when != i
     when != j
(
  i = e;
|
? j = e;
)

// -------------------

@@
expression x,e;
statement S;
identifier i;
@@

-if (!(list_empty(x)))
   list_for_each_entry(i,x,...) S
 ... when != i
? i = e

@@
expression x,e;
statement S;
identifier i,j;
@@

-if (!(list_empty(x)))
   list_for_each_entry_safe(i,j,x,...) S
 ... when != i
     when != j
(
  i = e;
|
? j = e;
)

@@
expression x,e;
statement S;
identifier i;
@@

-if (!(list_empty(x)))
   list_for_each(i,x) S
 ... when != i
? i = e

@@
expression x,e;
statement S;
identifier i,j;
@@

-if (!(list_empty(x)))
   list_for_each_safe(i,j,x) S
 ... when != i
     when != j
(
  i = e;
|
? j = e;
)
</smpl>

---

 drivers/media/pci/saa7134/saa7134-core.c                      |   14 ++---
 drivers/media/usb/cx231xx/cx231xx-core.c                      |   16 ++----
 drivers/media/usb/tm6000/tm6000-core.c                        |   24 +++-------
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c |   13 ++---
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c    |    5 --
 drivers/net/ethernet/sfc/ptp.c                                |   20 +++-----
 drivers/net/wireless/ath/dfs_pattern_detector.c               |   15 ++----
 sound/soc/intel/atom/sst/sst_loader.c                         |   10 +---
 sound/soc/intel/skylake/skl-pcm.c                             |    8 +--
 sound/soc/intel/skylake/skl-topology.c                        |    5 --
 10 files changed, 53 insertions(+), 77 deletions(-)
2020-07-30 22:54:40 +01:00
Alper Nebi Yasak
d0508b4f16
ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection
PulseAudio (and perhaps other userspace utilities) can not detect any
jack for rk3399_gru_sound as the driver doesn't expose related Jack
kcontrols.

This patch adds two DAPM pins to the headset jack, where the
snd_soc_card_jack_new() call automatically creates "Headphones Jack" and
"Headset Mic Jack" kcontrols from them.

With an appropriate ALSA UCM config specifying JackControl fields for
the "Headphones" and "Headset" (mic) devices, PulseAudio can detect
plug/unplug events for both of them after this patch.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20200721182709.6895-1-alpernebiyasak@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 22:54:39 +01:00
Fabio Estevam
658bb297e3
ASoC: wm8962: Do not access WM8962_GPIO_BASE
According to the WM8962 datasheet, there is no register at address 0x200.

WM8962_GPIO_BASE is just a base address for the GPIO registers and not a
real register, so remove it from wm8962_readable_register().

Also, Register 515 (WM8962_GPIO_BASE + 3) does not exist, so skip
its access.

This fixes the following errors:

wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16
wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200717135959.19212-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 22:54:38 +01:00
Julia Lawall
afd842c031
ASoC: SOF: imx: use resource_size
Use resource_size rather than a verbose computation on
the end and start fields.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

<smpl>
@@ struct resource ptr; @@
- (ptr.end - ptr.start + 1)
+ resource_size(&ptr)
</smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/1595751933-4952-1-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 22:54:37 +01:00
Julia Lawall
a383308e50
ASoC: Intel: drop unnecessary list_empty
list_for_each_entry_safe is able to handle an empty list.
The only effect of avoiding the loop is not initializing the
index variable.
Drop list_empty tests in cases where these variables are not
used.

Note that list_for_each_entry_safe is defined in terms of
list_first_entry, which indicates that it should not be used on an
empty list.  But in list_for_each_entry_safe, the element obtained by
list_first_entry is not really accessed, only the address of its
list_head field is compared to the address of the list head, so the
list_first_entry is safe.

The semantic patch that makes this change is as follows (with another
variant for the no brace case): (http://coccinelle.lip6.fr/)

<smpl>
@@
expression x,e;
iterator name list_for_each_entry_safe;
statement S;
identifier i,j;
@@
-if (!(list_empty(x))) {
   list_for_each_entry_safe(i,j,x,...) S
- }
 ... when != i
     when != j
(
  i = e;
|
? j = e;
)
</smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/1595761112-11003-2-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 22:38:39 +01:00
Mark Brown
39473c2cbd
Merge series "ASoC: Intel: KMB: TDM Enablement patches" from Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>:
This patch series is to enable multiple features on the Keembay Platform

Michael Sit Wei Hong (4):
  ASoC: Intel: KMB: Add 8kHz audio support
  ASoC: Intel: KMB: Rework disable channel function
  ASoC: Intel: KMB: Enable TDM audio capture
  dt-bindings: sound: intel,keembay-i2s: Add channel-max property

 .../bindings/sound/intel,keembay-i2s.yaml     |   8 +
 sound/soc/intel/keembay/kmb_platform.c        | 137 +++++++++++++-----
 sound/soc/intel/keembay/kmb_platform.h        |   1 +
 3 files changed, 112 insertions(+), 34 deletions(-)

--
2.17.1
2020-07-30 21:00:38 +01:00
Mark Brown
3d026a8a59
Merge series "ASoC: meson: tdm fixes" from Jerome Brunet <jbrunet@baylibre.com>:
This patcheset is collection of fixes for the TDM input and output the
axg audio architecture. Its fixes:
 - slave mode format setting
 - g12 and sm1 skew offset
 - tdm clock inversion
 - standard daifmt props names which don't require a specific prefix

Jerome Brunet (4):
  ASoC: meson: axg-tdm-interface: fix link fmt setup
  ASoC: meson: axg-tdmin: fix g12a skew
  ASoC: meson: axg-tdm-formatters: fix sclk inversion
  ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties

 sound/soc/meson/axg-tdm-formatter.c | 11 ++++++-----
 sound/soc/meson/axg-tdm-formatter.h |  1 -
 sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++---------
 sound/soc/meson/axg-tdmin.c         | 16 +++++++++++++++-
 sound/soc/meson/axg-tdmout.c        |  3 ---
 sound/soc/meson/meson-card-utils.c  |  2 +-
 6 files changed, 39 insertions(+), 20 deletions(-)

--
2.25.4
2020-07-30 21:00:36 +01:00
Ravulapati Vishnu vardhan rao
c3936ba9e0
ASoC: amd: Added hw_params support for ALC1015
Adding rt1015 hw_params which set Bit-clock ratio,
PLL and appropriate sys clk specific with RTK1015.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200728160255.31020-6-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:34 +01:00
Ravulapati Vishnu vardhan rao
f7b2651b96
ASoC: amd: Adding DAI LINK for rt1015 codec
DAI link support for RTK 1015 and providing the codec details
depending on the snd_soc_card selected by ACPI ID.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200728160255.31020-5-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:33 +01:00
Ravulapati Vishnu vardhan rao
414e3cab7d
ASoC: amd: Adding support for ALC1015 codec in machine driver
Adding support for ALC1015 RTK codec in machine driver.
Passing specific card structure based on its ACPI ID.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200728160255.31020-4-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:32 +01:00
Ravulapati Vishnu vardhan rao
0fe4b561f7
ASoC: amd: Passing card structure based on codec
Passing specific snd_soc_card structure depending on the ACPI ID.
In future we can add other IDs in the ACPI table and pass the structure.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200728160255.31020-3-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:31 +01:00
Ravulapati Vishnu vardhan rao
9c04b5a48f
ASoC: amd: Renaming snd-soc-card structure and fields
As in future our machine driver supports multiple codecs
So changing naming convention of snd_soc_card struct and its fields.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200728160255.31020-2-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:30 +01:00
Simon Shields
fd0ea9cd96
ASoC: samsung: Add sound support for Midas boards
This patch adds support for voice and BT calls, along with standard
audio output via the speaker, earpiece, headphone jack, HDMI, and
any accessories compatible with Midas boards. This patch also supports
headphone/headset detection and headsets with inline buttons.

[m.szyprowski: adaptation to v5.1+ kernels (DAI links initialization)]
[s.nawrocki: removal of the clk API calls for CODEC MCLK, the jack data
 structure moved to struct midas_priv, coding style and typo fixes,
 conversion to new cpu/codec/dai-node binding]

Signed-off-by: Simon Shields <simon@lineageos.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200728131111.14334-2-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:29 +01:00
Dan Murphy
982f4a4134
ASoC: tlv320adcx140: Move device reset to before programming
Reset the device before programming the registers or all programming
will be lost as the device resets registers to default settings.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200730142419.28205-2-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:27 +01:00
Dan Murphy
806a8afede
ASoC: tlv320adcx140: Fix GPO register start address
The header was updated to align with the data sheet to start the GPO_CFG
at GPO_CFG0.  The code was not updated to the change and therefore the
GPO_CFG0 register was not written to.

Fixes: 6617cff6a0 ("ASoC: tlv320adcx140: Add GPO configuration and drive output config")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200730142419.28205-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:27 +01:00
Michael Sit Wei Hong
d13389849c
ASoC: Intel: KMB: Rework disable channel function
All channels are enabled at boot up, this patch ensures that all
channels are disabled at boot and whenever the function is called.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200730055319.1522-3-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 20:13:41 +01:00
Michael Sit Wei Hong
b81f8df803
ASoC: Intel: KMB: Add 8kHz audio support
Enable 8kHz audio support for Intel Keem Bay platform.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200730055319.1522-2-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 20:13:40 +01:00
Mark Brown
20196e0e38
Merge series "ASoC: meson: tdm fixes" from Jerome Brunet <jbrunet@baylibre.com>:
This patcheset is collection of fixes for the TDM input and output the
axg audio architecture. Its fixes:
 - slave mode format setting
 - g12 and sm1 skew offset
 - tdm clock inversion
 - standard daifmt props names which don't require a specific prefix

Jerome Brunet (4):
  ASoC: meson: axg-tdm-interface: fix link fmt setup
  ASoC: meson: axg-tdmin: fix g12a skew
  ASoC: meson: axg-tdm-formatters: fix sclk inversion
  ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties

 sound/soc/meson/axg-tdm-formatter.c | 11 ++++++-----
 sound/soc/meson/axg-tdm-formatter.h |  1 -
 sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++---------
 sound/soc/meson/axg-tdmin.c         | 16 +++++++++++++++-
 sound/soc/meson/axg-tdmout.c        |  3 ---
 sound/soc/meson/meson-card-utils.c  |  2 +-
 6 files changed, 39 insertions(+), 20 deletions(-)

--
2.25.4
2020-07-30 19:57:10 +01:00
Charles Keepax
5c74c9d34a
ASoC: soc-core: Fix regression causing sysfs entries to disappear
The allocation order of things in soc_new_pcm_runtime was changed to
move the device_register before the allocation of the rtd structure.
This was to allow the rtd allocation to be managed by devm. However
currently the sysfs entries are added by device_register and their
visibility depends on variables within the rtd structure, this causes
the pmdown_time and dapm_widgets sysfs entries to be missing for all
rtds.

Correct this issue by manually calling device_add_groups after the
appropriate information is available.

Fixes: d918a37610 ("ASoC: soc-core: tidyup soc_new_pcm_runtime() alloc order")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200730120715.637-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 19:57:09 +01:00
Jerome Brunet
e44815a295
ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties
Standard dai format property don't need the "amlogic," prefix.
There nothing amlogic specific about them. Just remove it.

Fixes: 435857e015 ("ASoC: meson: align axg card driver with DT bindings documentation")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200729154456.1983396-5-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 19:45:02 +01:00
Jerome Brunet
0d3f01dcdc
ASoC: meson: axg-tdm-formatters: fix sclk inversion
After carefully checking, it appears that both tdmout and tdmin require the
rising edge of the sclk they get to be synchronized with the frame sync
event (which should be a rising edge of lrclk).

TDMIN was improperly set before this patch. Remove the sclk_invert quirk
which is no longer needed and fix the sclk phase.

Fixes: 1a11d88f49 ("ASoC: meson: add tdm formatter base driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200729154456.1983396-4-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 19:45:01 +01:00
Jerome Brunet
80a254394f
ASoC: meson: axg-tdmin: fix g12a skew
After carefully checking the result provided by the TDMIN on the g12a and
sm1 SoC families, the TDMIN skew offset appears to be 3 instead of 2 on the
axg.

Fixes: f01bc67f58 ("ASoC: meson: axg-tdm-formatter: rework quirks settings")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200729154456.1983396-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 19:45:00 +01:00
Jerome Brunet
6878ba91ce
ASoC: meson: axg-tdm-interface: fix link fmt setup
The .set_fmt() callback of the axg tdm interface incorrectly
test the content of SND_SOC_DAIFMT_MASTER_MASK as if it was a
bitfield, which it is not.

Implement the test correctly.

Fixes: d60e4f1e4b ("ASoC: meson: add tdm interface driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200729154456.1983396-2-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 19:44:59 +01:00
Dan Murphy
6617cff6a0
ASoC: tlv320adcx140: Add GPO configuration and drive output config
Add General Purpose Output (GPO) configuration and driver output
configuration.  The GPOs can be configured as a GPO, IRQ, SDOUT or a
PDMCLK output.  In addition the output drive can be configured with
various configurations.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200728160833.24130-2-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-29 14:23:24 +01:00
Dan Murphy
e5448d7ec6
ASoC: tlv320adcx140: Fix various style errors and warnings
Fix white space issues and remove else case where it was not needed.
Convert "static const char *" to "static const char * const"

Fixes: 689c7655b5 ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200728164339.16841-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-29 10:53:52 +01:00
Seung-Woo Kim
92a007944e
ASoC: bcm2835: Silence clk_get() error on -EPROBE_DEFER
Silence clk_get() error with dev_dbg() on -EPROBE_DEFER.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Link: https://lore.kernel.org/r/1595564371-13692-1-git-send-email-sw0312.kim@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28 17:04:07 +01:00
Mark Brown
483e20a01a
Merge series "SOF Fixes for S0iX suspend/resume sequence" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:
This set of patches is required for facilitating system S0ix
entry when the DSP is in D0I3. This first patch adds the missing
CORB/RIRB DMA stop and restart to the suspend/resume sequence along
with powering up/down the links. The second patch ensures that the
FW traces are disabled when the system enters S0ix with the DSP in D0I3.

Marcin Rajwa (2):
  ASoC: SOF: Intel: fix the suspend procedure to support s0ix entry
  ASoC: SOF: Intel: disable traces when switching to S0Ix D0I3

 sound/soc/sof/intel/hda-dsp.c | 48 ++++++++++++++++++++++++++++++++---
 1 file changed, 44 insertions(+), 4 deletions(-)

--
2.25.1
2020-07-28 16:43:36 +01:00
Dan Murphy
f78a97003b
ASoC: tas2562: Update shutdown GPIO property
Update the shutdown GPIO property to be shutdown from shut-down.

Fixes: c173dba44c ("ASoC: tas2562: Introduce the TAS2562 amplifier")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200723160838.9738-2-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28 16:43:34 +01:00
Charles Keepax
3570922c4d
ASoC: madera: Add channel numbers to AIFs
Set the channel number on each AIF widget to allow unused channels not
to be powered up across AIFs.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200728144141.16104-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28 16:43:33 +01:00
Marcin Rajwa
79560b8aeb
ASoC: SOF: Intel: disable traces when switching to S0Ix D0I3
We should always disable DMA trace on S0Ix. When staying at S0-D0I3,
we should enable DMA trace while both DMA Trace debug is enabled and
hda_enable_trace_D0I3_S0 is set. This commit corrects the existed
logic errors about that.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200727183613.1419005-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28 16:22:35 +01:00
Marcin Rajwa
195f101980
ASoC: SOF: Intel: fix the suspend procedure to support s0ix entry
This patch fixes the suspend & resume procedure to allow entry into the
low power states with some streams being active as a wake source - wake on
voice is a perfect example. The current implementation does not stop
the CORB/RIRB DMA and does not power down the HDA links. With firmware's
help, the platform has been able to still enter s0ix state on older
platforms, but the sequence is still incorrect, and the additional
driver actions are needed to ensure correct s0ix behaviour.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200727183613.1419005-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28 16:22:34 +01:00
Mark Brown
950039fcb3
Merge series "ASoC: intel: use asoc_substream_to_rtd()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

I have posted "ASoC: add asoc_substream_to_rtd() macro"
patch-set to ALSA SoC ML (= see Link), and then Pierre-Louis
wanted that Intel patch was separated for boards.

The patches which are not for Intel were already accepted.
This is for Intel, and Intel boards.

Link: https://lore.kernel.org/r/87y2nf0yw2.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/877duz0ysw.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (2):
  ASoC: intel/boards: use asoc_substream_to_rtd()
  ASoC: intel: use asoc_substream_to_rtd()

 sound/soc/intel/atom/sst-mfld-platform-pcm.c     |  6 +++---
 sound/soc/intel/baytrail/sst-baytrail-pcm.c      | 16 ++++++++--------
 sound/soc/intel/boards/bdw-rt5650.c              |  2 +-
 sound/soc/intel/boards/bdw-rt5677.c              |  4 ++--
 sound/soc/intel/boards/broadwell.c               |  2 +-
 sound/soc/intel/boards/bxt_rt298.c               |  2 +-
 sound/soc/intel/boards/byt-rt5640.c              |  2 +-
 sound/soc/intel/boards/bytcht_da7213.c           |  4 ++--
 sound/soc/intel/boards/bytcr_rt5640.c            |  2 +-
 sound/soc/intel/boards/bytcr_rt5651.c            |  2 +-
 sound/soc/intel/boards/cht_bsw_max98090_ti.c     |  2 +-
 sound/soc/intel/boards/cht_bsw_nau8824.c         |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c          |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5672.c          |  2 +-
 sound/soc/intel/boards/cml_rt1011_rt5682.c       |  4 ++--
 sound/soc/intel/boards/ehl_rt5660.c              |  2 +-
 sound/soc/intel/boards/glk_rt5682_max98357a.c    |  2 +-
 sound/soc/intel/boards/haswell.c                 |  2 +-
 sound/soc/intel/boards/kbl_da7219_max98927.c     |  8 ++++----
 sound/soc/intel/boards/kbl_rt5660.c              |  2 +-
 sound/soc/intel/boards/kbl_rt5663_max98927.c     |  4 ++--
 .../intel/boards/kbl_rt5663_rt5514_max98927.c    |  4 ++--
 sound/soc/intel/boards/skl_nau88l25_max98357a.c  |  2 +-
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c    |  2 +-
 sound/soc/intel/boards/skl_rt286.c               |  2 +-
 sound/soc/intel/boards/sof_da7219_max98373.c     |  2 +-
 sound/soc/intel/boards/sof_maxim_common.c        |  4 ++--
 sound/soc/intel/boards/sof_pcm512x.c             |  4 ++--
 sound/soc/intel/boards/sof_rt5682.c              |  4 ++--
 sound/soc/intel/boards/sof_sdw_rt1308.c          |  2 +-
 sound/soc/intel/boards/sof_wm8804.c              |  2 +-
 sound/soc/intel/haswell/sst-haswell-pcm.c        | 12 ++++++------
 sound/soc/intel/keembay/kmb_platform.c           |  2 +-
 sound/soc/intel/skylake/skl-pcm.c                |  8 ++++----
 34 files changed, 62 insertions(+), 62 deletions(-)

--
2.25.1
2020-07-27 14:21:10 +01:00
Stephan Gerhold
34facb0422
ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines
Right now the direction of a DAI has to be specified as a literal
number in the device tree, e.g.:

	dai@0 {
		reg = <0>;
		direction = <2>;
	};

but this does not make it immediately clear that this is a
playback/RX-only DAI.

Actually, q6asm-dai.c has useful defines for this. Move them to the
dt-bindings header to allow using them in the dts(i) files.
The example above then becomes:

	dai@0 {
		reg = <0>;
		direction = <Q6ASM_DAI_RX>;
	};

which is immediately recognizable as playback/RX-only DAI.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200727082502.2341-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-27 14:21:09 +01:00
Akshu Agrawal
1255296cf0
ASoC: AMD: Restore PME_EN state at Power On
PME_EN state needs to restored to the value set by fmw.
For the devices which are not using I2S wake event which gets
enabled by PME_EN bit, keeping PME_EN enabled burns considerable amount
of power as it blocks low power state.
For the devices using I2S wake event, PME_EN gets enabled in fmw and the
state should be maintained after ACP Power On.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200724195600.11798-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-27 14:21:08 +01:00
Kuninori Morimoto
2ab9a40966
ASoC: intel: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87tuxtydcz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-27 14:00:23 +01:00
Kuninori Morimoto
2207b93bc7
ASoC: intel/boards: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87v9i9yddc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-27 14:00:22 +01:00
Tzung-Bi Shih
3aecfc72d7
ASoC: dapm: don't call pm_runtime_* on card device
runtime_usage of sound card has been observed to grow without bound.
For example:
$ cat /sys/devices/platform/sound/power/runtime_usage
46
$ sox -n -t s16 -r 48000 -c 2 - synth 1 sine 440 vol 0.1 | \
  aplay -q -D hw:0,0 -f S16_LE -r 48000 -c 2
$ cat /sys/devices/platform/sound/power/runtime_usage
52

Commit 4e872a4682 ("ASoC: dapm: Don't force card bias level to be
updated") stops to force update bias_level on card.  If card doesn't
provide set_bias_level callback, the snd_soc_dapm_set_bias_level()
is equivalent to NOP for card device.

As a result, dapm_pre_sequence_async() doesn't change the bias_level of
card device correctly.  Thus, pm_runtime_get_sync() would be called in
dapm_pre_sequence_async() without symmetric pm_runtime_put() in
dapm_post_sequence_async().

Don't call pm_runtime_* on card device.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200724070731.451377-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 17:27:53 +01:00
Mark Brown
aa2d1ee766
Merge series "ASoC: qcom: Use qcom_snd_parse_of() for apq8016_sbc" from Stephan Gerhold <stephan@gerhold.net>:
At the moment we have two separate functions to parse the sound card
properties from the device tree: qcom_snd_parse_of() for DPCM and
apq8016_sbc_parse_of() without DPCM. These functions are almost identical
except for a few minor differences.

This patch set extends qcom_snd_parse_of() to handle links without DPCM,
so that we can use one common function for all (qcom) machine drivers.

Stephan Gerhold (7):
  ASoC: qcom: Use devm for resource management
  ASoC: qcom: common: Use snd_soc_dai_link_set_capabilities()
  ASoC: q6afe: Remove unused q6afe_is_rx_port() function
  ASoC: qcom: common: Support parsing links without DPCM
  ASoC: qcom: common: Parse properties with "qcom," prefix
  ASoC: qcom: apq8016_sbc: Use qcom_snd_parse_of()
  ASoC: qcom: common: Avoid printing errors for -EPROBE_DEFER

 sound/soc/qcom/Kconfig       |   1 +
 sound/soc/qcom/apq8016_sbc.c | 120 ++++-------------------------------
 sound/soc/qcom/apq8096.c     |  28 +-------
 sound/soc/qcom/common.c      |  58 ++++++++++-------
 sound/soc/qcom/qdsp6/q6afe.c |   8 ---
 sound/soc/qcom/qdsp6/q6afe.h |   1 -
 sound/soc/qcom/sdm845.c      |  40 ++----------
 7 files changed, 59 insertions(+), 197 deletions(-)

--
2.27.0
2020-07-24 15:22:35 +01:00
Steve Lee
62f2c7797d
ASoC: max98390: update dsm param bin max size
MAX98390_DSM_PARAM_MAX_SIZE is changed to support extended
 register update.

Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20200724085644.9837-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:22:34 +01:00
Steve Lee
aa78570568
ASoC: max98390: Update dsm init sequence and condition.
Modify dsm_init sequence and dsm param bin check condition.
  - Move dsm_init() to after amp init setting to
    make sure dsm init is last setting.
  - dsm param bin check condition changed for extended register setting.

Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20200724060149.19261-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:22:33 +01:00
Jerome Brunet
cc4d8cebbf
ASoC: soc-component: don't report of_xlate_dai_name failures
With commit e2329eeba4 ("ASoC: soc-component: add soc_component_err()")
every error different for ENOTSUPP or EPROBE_DEFER will log an error.

However, as explained in snd_soc_get_dai_name(), this callback may error
to indicate that the DAI is not matched by the component tested. If the
device provides other components, those may still match. Logging an error
in this case is misleading.

Don't use soc_component_ret() in snd_soc_component_of_xlate_dai_name()
to avoid spamming the log.

Fixes: e2329eeba4 ("ASoC: soc-component: add soc_component_err()")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20200723142020.1338740-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:22:32 +01:00
Stephan Gerhold
a63419beaf
ASoC: qcom: common: Avoid printing errors for -EPROBE_DEFER
qcom_snd_parse_of() tends to produce lots of error messages during bootup:

	MultiMedia1: error getting cpu dai name

This happens because the DAIs are not probed until the ADSP remoteproc
has booted, which takes a while. Until it is ready, snd_soc_of_get_dai_name()
returns -EDEFER_PROBE to retry probing later. This is perfectly normal,
so cleanup the kernel log a bit by not printing in case of -EPROBE_DEFER.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-8-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:20 +01:00
Stephan Gerhold
118205d241
ASoC: qcom: apq8016_sbc: Use qcom_snd_parse_of()
Now that we have updated qcom_snd_parse_of() to handle the device
tree bindings used for apq8016_sbc, update the apq8016_sbc driver
to use the common function and remove the duplicated code.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-7-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:19 +01:00
Stephan Gerhold
f0d67fdba5
ASoC: qcom: common: Parse properties with "qcom," prefix
The apq8016_sbc device tree binding uses a "qcom," vendor prefix
for all device tree properties, while qcom_snd_parse_of() uses the
same properties without a prefix.

In the future it would be nice to make this consistent, however,
for backwards compatibility we need to parse both names to allow
apq8016_sbc to use the common qcom_snd_parse_of() function.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-6-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:18 +01:00
Stephan Gerhold
47ea884882
ASoC: qcom: common: Support parsing links without DPCM
So far qcom_snd_parse_of() was only used to parse the device tree
for boards using the QDSP6 driver together with DPCM. apq8016_sbc
uses an almost identical version (apq8016_sbc_parse_of()) which
parses links without DPCM.

Given the similarity of the two functions it is useful to combine
these two. To allow using qcom_snd_parse_of() in apq8016_sbc we
need to support parsing links without DPCM as well.

This is pretty simple: A DPCM link in the device tree is defined using:

  - DPCM frontend: "cpu"
  - DPCM backend:  "cpu", "platform" and "codec"

... while a link without DPCM has "cpu" and "codec" (but no "platform").

Add a few more if conditions to handle links without DPCM correctly.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-5-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:18 +01:00
Stephan Gerhold
0a8c336a1e
ASoC: q6afe: Remove unused q6afe_is_rx_port() function
This reverts commit 4a95737440 ("ASoc: q6afe: add support to get
port direction"), since the function is not needed anymore.

q6afe-dai already exposes the possible directions for a DAI through
the DAI capabilities (playback/capture-only DAI). Now we use
snd_soc_dai_link_set_capabilities() to infer the information
directly from the DAI capabilities.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-4-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:17 +01:00
Stephan Gerhold
627ab55d74
ASoC: qcom: common: Use snd_soc_dai_link_set_capabilities()
Commit a212008925 ("ASoC: qcom: common: set correct directions for dailinks")
introduced a call to q6afe_is_rx_port() to set the dpcm_playback/capture
parameters correctly. This is necessary because those parameters are now
validated to match the capabilities of the DAIs. [1]

The disadvantage of introducing the call to q6afe_is_rx_port() is that
it makes the qcom_snd_parse_of() helper dependent on the QDSP6 driver.
When the ADSP is bypassed (e.g. in apq8016-sbc) QDSP6 is not used.

There is a generic solution for this now: The correct direction for the links
is already defined by the DAI capabilities (e.g. rx ports only support playback).

Commit 25612477d2 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
introduced the snd_soc_dai_link_set_capabilities() function that we can use
to set dpcm_playback/dpcm_capture according to the capabilities of the DAIs.

Use that for both FE/BE DAI links to avoid the dependency on the QDSP6 driver.

[1]: https://lore.kernel.org/alsa-devel/20200616085409.GA110999@gerhold.net/

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-3-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:16 +01:00
Stephan Gerhold
ed3b53e7ff
ASoC: qcom: Use devm for resource management
Simplify the machine drivers for newer SoCs a bit by using the
devm_* function calls that automatically release the resources
when the driver is removed or when probing fails.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200723183904.321040-2-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 15:01:15 +01:00
Steve Lee
dc5fb6d2e8
ASoC: max98390: Fix dac event dapm mixer.
Global EN register guide to off before AMP_EN register
 when amp disable sequence.
  - remove AMP_EN control before max98390_dac_event call

Signed-off-by: Steve Lee <steves.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20200724060058.19201-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-24 14:24:14 +01:00
Mark Brown
d1e2a97b36
Merge series "ASoC: add asoc_substream_to_rtd() macro" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

Many ASoC drivers are getting rtd from substream by

	rtd = substream->private_data

OTOH, we have snd_pcm_substream_chip() macro for it.

	#define snd_pcm_substream_chip(substream) ((substream)->private_data)

But, both are not understandable for reader.
This patch adds new asoc_substream_to_rtd() which is easy to understand.

These are not important, but for readable code.

Kuninori Morimoto (29):
  ASoC: soc-xxx: add asoc_substream_to_rtd()
  ASoC: ux500: use asoc_substream_to_rtd()
  ASoC: ti: use asoc_substream_to_rtd()
  ASoC: tegra: use asoc_substream_to_rtd()
  ASoC: sunxi: use asoc_substream_to_rtd()
  ASoC: stm: use asoc_substream_to_rtd()
  ASoC: sof: use asoc_substream_to_rtd()
  ASoC: sh: use asoc_substream_to_rtd()
  ASoC: samsung: use asoc_substream_to_rtd()
  ASoC: pxa: use asoc_substream_to_rtd()
  ASoC: cirrus: use asoc_substream_to_rtd()
  ASoC: rockchip: use asoc_substream_to_rtd()
  ASoC: amd: use asoc_substream_to_rtd()
  ASoC: fsl: use asoc_substream_to_rtd()
  ASoC: mediatek: use asoc_substream_to_rtd()
  ASoC: atmel: use asoc_substream_to_rtd()
  ASoC: qcom: use asoc_substream_to_rtd()
  ASoC: dwc: use asoc_substream_to_rtd()
  ASoC: intel: use asoc_substream_to_rtd()
  ASoC: meson: use asoc_substream_to_rtd()
  ASoC: au1x: use asoc_substream_to_rtd()
  ASoC: bcm: use asoc_substream_to_rtd()
  ASoC: codecs: use asoc_substream_to_rtd()
  ASoC: generic: use asoc_substream_to_rtd()
  ASoC: sprd: use asoc_substream_to_rtd()
  ASoC: kirkwood: use asoc_substream_to_rtd()
  ASoC: xtensa: use asoc_substream_to_rtd()
  ASoC: mxs: use asoc_substream_to_rtd()
  ASoC: uniphier: use asoc_substream_to_rtd()

 include/sound/soc.h                           |  2 +
 sound/soc/amd/acp-da7219-max98357a.c          | 12 ++--
 sound/soc/amd/acp-pcm-dma.c                   |  2 +-
 sound/soc/amd/acp-rt5645.c                    |  2 +-
 sound/soc/amd/acp3x-rt5682-max9836.c          |  8 +--
 sound/soc/amd/raven/acp3x-i2s.c               |  2 +-
 sound/soc/amd/raven/acp3x-pcm-dma.c           |  6 +-
 sound/soc/atmel/atmel-classd.c                |  8 +--
 sound/soc/atmel/atmel-pcm-dma.c               |  4 +-
 sound/soc/atmel/atmel-pcm-pdc.c               |  2 +-
 sound/soc/atmel/atmel-pdmic.c                 | 10 +--
 sound/soc/atmel/atmel_wm8904.c                |  2 +-
 sound/soc/au1x/db1200.c                       |  2 +-
 sound/soc/au1x/dbdma2.c                       |  2 +-
 sound/soc/au1x/dma.c                          |  2 +-
 sound/soc/bcm/bcm63xx-pcm-whistler.c          | 12 ++--
 sound/soc/bcm/cygnus-pcm.c                    | 16 ++---
 sound/soc/cirrus/edb93xx.c                    |  2 +-
 sound/soc/cirrus/snappercl15.c                |  2 +-
 sound/soc/codecs/rt5677-spi.c                 |  4 +-
 sound/soc/dwc/dwc-pcm.c                       |  2 +-
 sound/soc/fsl/eukrea-tlv320.c                 |  2 +-
 sound/soc/fsl/fsl-asoc-card.c                 |  2 +-
 sound/soc/fsl/fsl_asrc_dma.c                  |  4 +-
 sound/soc/fsl/fsl_dma.c                       |  2 +-
 sound/soc/fsl/fsl_spdif.c                     | 10 +--
 sound/soc/fsl/fsl_ssi.c                       |  8 +--
 sound/soc/fsl/imx-audmix.c                    |  6 +-
 sound/soc/fsl/imx-mc13783.c                   |  2 +-
 sound/soc/fsl/mpc5200_dma.c                   |  8 +--
 sound/soc/fsl/mpc5200_psc_i2s.c               |  2 +-
 sound/soc/fsl/mpc8610_hpcd.c                  |  2 +-
 sound/soc/fsl/mx27vis-aic32x4.c               |  2 +-
 sound/soc/fsl/p1022_ds.c                      |  2 +-
 sound/soc/fsl/p1022_rdk.c                     |  2 +-
 sound/soc/fsl/wm1133-ev1.c                    |  2 +-
 sound/soc/generic/simple-card-utils.c         |  6 +-
 sound/soc/intel/atom/sst-mfld-platform-pcm.c  |  6 +-
 sound/soc/intel/baytrail/sst-baytrail-pcm.c   | 16 ++---
 sound/soc/intel/boards/bdw-rt5650.c           |  2 +-
 sound/soc/intel/boards/bdw-rt5677.c           |  4 +-
 sound/soc/intel/boards/broadwell.c            |  2 +-
 sound/soc/intel/boards/bxt_rt298.c            |  2 +-
 sound/soc/intel/boards/byt-rt5640.c           |  2 +-
 sound/soc/intel/boards/bytcht_da7213.c        |  4 +-
 sound/soc/intel/boards/bytcr_rt5640.c         |  2 +-
 sound/soc/intel/boards/bytcr_rt5651.c         |  2 +-
 sound/soc/intel/boards/cht_bsw_max98090_ti.c  |  2 +-
 sound/soc/intel/boards/cht_bsw_nau8824.c      |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c       |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5672.c       |  2 +-
 sound/soc/intel/boards/cml_rt1011_rt5682.c    |  4 +-
 sound/soc/intel/boards/ehl_rt5660.c           |  2 +-
 sound/soc/intel/boards/glk_rt5682_max98357a.c |  2 +-
 sound/soc/intel/boards/haswell.c              |  2 +-
 sound/soc/intel/boards/kbl_da7219_max98927.c  |  8 +--
 sound/soc/intel/boards/kbl_rt5660.c           |  2 +-
 sound/soc/intel/boards/kbl_rt5663_max98927.c  |  4 +-
 .../intel/boards/kbl_rt5663_rt5514_max98927.c |  4 +-
 .../soc/intel/boards/skl_nau88l25_max98357a.c |  2 +-
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c |  2 +-
 sound/soc/intel/boards/skl_rt286.c            |  2 +-
 sound/soc/intel/boards/sof_da7219_max98373.c  |  2 +-
 sound/soc/intel/boards/sof_maxim_common.c     |  4 +-
 sound/soc/intel/boards/sof_pcm512x.c          |  4 +-
 sound/soc/intel/boards/sof_rt5682.c           |  4 +-
 sound/soc/intel/boards/sof_sdw_rt1308.c       |  2 +-
 sound/soc/intel/boards/sof_wm8804.c           |  2 +-
 sound/soc/intel/haswell/sst-haswell-pcm.c     | 12 ++--
 sound/soc/intel/keembay/kmb_platform.c        |  2 +-
 sound/soc/intel/skylake/skl-pcm.c             |  8 +--
 sound/soc/kirkwood/armada-370-db.c            |  2 +-
 sound/soc/mediatek/common/mtk-afe-fe-dai.c    | 12 ++--
 .../mediatek/common/mtk-afe-platform-driver.c |  2 +-
 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt2701/mt2701-cs42448.c    |  2 +-
 sound/soc/mediatek/mt2701/mt2701-wm8960.c     |  2 +-
 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c    |  4 +-
 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt8173/mt8173-max98090.c   |  2 +-
 .../mediatek/mt8173/mt8173-rt5650-rt5514.c    |  2 +-
 .../mediatek/mt8173/mt8173-rt5650-rt5676.c    |  2 +-
 sound/soc/mediatek/mt8173/mt8173-rt5650.c     |  2 +-
 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c    |  4 +-
 .../mediatek/mt8183/mt8183-da7219-max98357.c  |  8 +--
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   | 12 ++--
 sound/soc/meson/axg-card.c                    |  2 +-
 sound/soc/meson/gx-card.c                     |  2 +-
 sound/soc/meson/meson-card-utils.c            |  2 +-
 sound/soc/meson/meson-codec-glue.c            |  2 +-
 sound/soc/mxs/mxs-sgtl5000.c                  |  2 +-
 sound/soc/pxa/brownstone.c                    |  2 +-
 sound/soc/pxa/corgi.c                         |  4 +-
 sound/soc/pxa/hx4700.c                        |  2 +-
 sound/soc/pxa/imote2.c                        |  2 +-
 sound/soc/pxa/magician.c                      |  6 +-
 sound/soc/pxa/mmp-pcm.c                       |  2 +-
 sound/soc/pxa/poodle.c                        |  4 +-
 sound/soc/pxa/pxa2xx-i2s.c                    |  2 +-
 sound/soc/pxa/spitz.c                         |  4 +-
 sound/soc/pxa/tosa.c                          |  2 +-
 sound/soc/pxa/z2.c                            |  2 +-
 sound/soc/pxa/zylonite.c                      |  2 +-
 sound/soc/qcom/apq8096.c                      |  2 +-
 sound/soc/qcom/lpass-platform.c               | 14 ++---
 sound/soc/qcom/qdsp6/q6asm-dai.c              |  6 +-
 sound/soc/qcom/qdsp6/q6routing.c              |  2 +-
 sound/soc/qcom/sdm845.c                       | 14 ++---
 sound/soc/qcom/storm.c                        |  2 +-
 sound/soc/rockchip/rk3288_hdmi_analog.c       |  2 +-
 sound/soc/rockchip/rk3399_gru_sound.c         |  8 +--
 sound/soc/rockchip/rockchip_i2s.c             |  2 +-
 sound/soc/rockchip/rockchip_max98090.c        |  2 +-
 sound/soc/rockchip/rockchip_rt5645.c          |  2 +-
 sound/soc/samsung/aries_wm8994.c              |  4 +-
 sound/soc/samsung/arndale.c                   |  4 +-
 sound/soc/samsung/h1940_uda1380.c             |  2 +-
 sound/soc/samsung/i2s.c                       |  2 +-
 sound/soc/samsung/jive_wm8750.c               |  2 +-
 sound/soc/samsung/littlemill.c                |  2 +-
 sound/soc/samsung/neo1973_wm8753.c            |  8 +--
 sound/soc/samsung/odroid.c                    |  6 +-
 sound/soc/samsung/pcm.c                       |  4 +-
 sound/soc/samsung/rx1950_uda1380.c            |  2 +-
 sound/soc/samsung/s3c-i2s-v2.c                |  2 +-
 sound/soc/samsung/s3c24xx_simtec.c            |  2 +-
 sound/soc/samsung/s3c24xx_uda134x.c           |  6 +-
 sound/soc/samsung/smartq_wm8987.c             |  2 +-
 sound/soc/samsung/smdk_spdif.c                |  2 +-
 sound/soc/samsung/smdk_wm8580.c               |  2 +-
 sound/soc/samsung/smdk_wm8994.c               |  2 +-
 sound/soc/samsung/smdk_wm8994pcm.c            |  2 +-
 sound/soc/samsung/snow.c                      |  2 +-
 sound/soc/samsung/spdif.c                     |  6 +-
 sound/soc/samsung/tm2_wm5110.c                |  8 +--
 sound/soc/sh/dma-sh7760.c                     | 12 ++--
 sound/soc/sh/fsi.c                            |  2 +-
 sound/soc/sh/migor.c                          |  4 +-
 sound/soc/sh/rcar/core.c                      |  4 +-
 sound/soc/soc-component.c                     | 20 +++---
 sound/soc/soc-dai.c                           |  8 +--
 sound/soc/soc-dapm.c                          |  6 +-
 sound/soc/soc-generic-dmaengine-pcm.c         |  4 +-
 sound/soc/soc-link.c                          | 12 ++--
 sound/soc/soc-pcm.c                           | 62 +++++++++----------
 sound/soc/soc-utils.c                         |  2 +-
 sound/soc/sof/intel/hda-dai.c                 | 10 +--
 sound/soc/sof/intel/hda-dsp.c                 |  2 +-
 sound/soc/sof/intel/hda-pcm.c                 |  2 +-
 sound/soc/sof/pcm.c                           | 18 +++---
 sound/soc/sprd/sprd-pcm-dma.c                 |  2 +-
 sound/soc/stm/stm32_adfsdm.c                  | 12 ++--
 sound/soc/stm/stm32_sai_sub.c                 |  2 +-
 sound/soc/sunxi/sun4i-codec.c                 | 12 ++--
 sound/soc/sunxi/sun4i-spdif.c                 |  2 +-
 sound/soc/tegra/tegra_alc5632.c               |  2 +-
 sound/soc/tegra/tegra_max98090.c              |  2 +-
 sound/soc/tegra/tegra_rt5640.c                |  2 +-
 sound/soc/tegra/tegra_rt5677.c                |  2 +-
 sound/soc/tegra/tegra_sgtl5000.c              |  2 +-
 sound/soc/tegra/tegra_wm8753.c                |  2 +-
 sound/soc/tegra/tegra_wm8903.c                |  2 +-
 sound/soc/tegra/trimslice.c                   |  2 +-
 sound/soc/ti/davinci-evm.c                    |  6 +-
 sound/soc/ti/davinci-vcif.c                   |  4 +-
 sound/soc/ti/j721e-evm.c                      |  6 +-
 sound/soc/ti/n810.c                           |  4 +-
 sound/soc/ti/omap-abe-twl6040.c               |  4 +-
 sound/soc/ti/omap-mcbsp.c                     |  4 +-
 sound/soc/ti/omap-twl4030.c                   |  2 +-
 sound/soc/ti/omap3pandora.c                   |  2 +-
 sound/soc/ti/osk5912.c                        |  2 +-
 sound/soc/ti/rx51.c                           |  4 +-
 sound/soc/uniphier/aio-dma.c                  |  6 +-
 sound/soc/ux500/mop500_ab8500.c               |  8 +--
 sound/soc/ux500/ux500_pcm.c                   |  2 +-
 sound/soc/xtensa/xtfpga-i2s.c                 |  2 +-
 177 files changed, 397 insertions(+), 395 deletions(-)

--
2.25.1
2020-07-23 19:52:30 +01:00
Shengjiu Wang
08b54b5e38
ASoC: fsl-asoc-card: Support configuring dai fmt from DT
Support same propeties as simple card for configuring fmt
from DT.
In order to make this change compatible with old DT, these
properties are optional.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1595302910-19688-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:27 +01:00
Shengjiu Wang
c8361757a7
ASoC: fsl_esai: add IRQF_SHARED for devm_request_irq
ESAI interfaces may share same interrupt line with EDMA on
some platforms (e.g. i.MX8QXP, i.MX8QM).
Add IRQF_SHARED flag to allow sharing the irq among several
devices

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1595476808-28927-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:26 +01:00
Sameer Pujar
f9ec176cd6
ASoC: tegra: Fix build error due to 64-by-32 division
Build errors are seen on 32-bit platforms because of a plain 64-by-32
division. For example, following build erros were reported.

"ERROR: modpost: "__udivdi3" [sound/soc/tegra/snd-soc-tegra210-dmic.ko]
 undefined!"
"ERROR: modpost: "__divdi3" [sound/soc/tegra/snd-soc-tegra210-dmic.ko]
 undefined!"

This can be fixed by using div_u64() helper from 'math64.h' header.

Fixes: 8c8ff982e9 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1595492011-2411-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:25 +01:00
Randy Dunlap
83249952ff
ASoC: ti: fix SND_SOC_J721E_EVM warnings & errors
SND_SOC_J721E_EVM should not select SND_SOC_PCM3168A_I2C when I2C
is not enabled. That causes build errors, so make this driver's
symbol depend on I2C.

WARNING: unmet direct dependencies detected for SND_SOC_PCM3168A_I2C
  Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && I2C [=n]
  Selected by [m]:
  - SND_SOC_J721E_EVM [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && (DMA_OMAP [=y] || TI_EDMA [=m] || TI_K3_UDMA [=n] || COMPILE_TEST [=y]) && (ARCH_K3_J721E_SOC [=n] || COMPILE_TEST [=y])

../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: data definition has no type or storage class
 module_i2c_driver(pcm3168a_i2c_driver);
 ^~~~~~~~~~~~~~~~~
../sound/soc/codecs/pcm3168a-i2c.c:59:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int]
../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: parameter names (without types) in function declaration
../sound/soc/codecs/pcm3168a-i2c.c:49:26: warning: ‘pcm3168a_i2c_driver’ defined but not used [-Wunused-variable]
 static struct i2c_driver pcm3168a_i2c_driver = {
                          ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Fixes: 6748d05590 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/e74c690c-c7f8-fd42-e461-4f33571df4ef@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:25 +01:00
Alexander A. Klimov
3323a148fd
ASoC: omap: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718112403.13709-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:24 +01:00
James Schulman
779bedff9b
ASoC: wm_adsp: Support new metadata block ID's
Coefficient files now support additional metadata blocks, these
contain machine parsable text strings describing the parameters
contained in the coefficient file.

Signed-off-by: James Schulman <james.schulman@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200723110321.16382-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:23 +01:00
Alexander A. Klimov
1ce8f643ed
ASoC: fsl: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718111209.11760-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:22 +01:00
Alexander A. Klimov
f68440508d
ASoC: ti: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718110857.11520-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:21 +01:00
Kuninori Morimoto
382683c4a1
ASoC: uniphier: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sgdnyoea.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:43 +01:00
Kuninori Morimoto
3359128d7f
ASoC: mxs: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tuy3yoef.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:43 +01:00
Kuninori Morimoto
8d08d9b00a
ASoC: xtensa: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9ijyoek.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:42 +01:00
Kuninori Morimoto
6501cad63a
ASoC: kirkwood: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wo2zyoeo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:41 +01:00
Kuninori Morimoto
1581db969c
ASoC: sprd: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2nfyoes.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:40 +01:00
Kuninori Morimoto
9ae035e289
ASoC: generic: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zh7vyoex.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:39 +01:00
Kuninori Morimoto
3e3b62950a
ASoC: codecs: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871rl70yse.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:38 +01:00
Kuninori Morimoto
0359c834a2
ASoC: bcm: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87365n0ysi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:37 +01:00
Kuninori Morimoto
e287d0464b
ASoC: au1x: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kq30ysm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:36 +01:00
Kuninori Morimoto
371a014d42
ASoC: meson: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zaj0ysr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:35 +01:00
Kuninori Morimoto
a7c7ff1a47
ASoC: dwc: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878sff0yt0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:34 +01:00
Kuninori Morimoto
fdc9a2e469
ASoC: qcom: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6zv0yt5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:33 +01:00
Kuninori Morimoto
b1839ebf13
ASoC: atmel: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blkb0ytd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:33 +01:00
Kuninori Morimoto
0cd08b10ae
ASoC: mediatek: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87d04r0yth.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:32 +01:00
Kuninori Morimoto
9f5f078aed
ASoC: fsl: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eep70ytr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:31 +01:00
Kuninori Morimoto
ded0054359
ASoC: amd: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ft9n0ytv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:30 +01:00
Kuninori Morimoto
5c5eb29e8a
ASoC: rockchip: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7u30yu1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:29 +01:00
Kuninori Morimoto
d42df9400f
ASoC: cirrus: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87imej0yu5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:28 +01:00
Kuninori Morimoto
83b95c2fc0
ASoC: pxa: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0yz0yua.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:27 +01:00
Kuninori Morimoto
c101ce8883
ASoC: samsung: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfjf0yuf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:26 +01:00