Commit graph

935566 commits

Author SHA1 Message Date
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
Takashi Iwai
103f528d3b ASoC: Updates for v5.9
The biggest changes here one again come from Mormioto-san who has
 continued his dilligent work cleaning up long standing issues in the
 APIs, it's particularly nice to see the transition from digital_mute()
 to mute_stream() finally completed. There's also been a lot of work on
 the x86 code again, this time a big focus has been on cleaning up some
 issues identified by various static tests, and on the Freescale systems.
 Otherwise the biggest thing has been a lot of driver additions:
 
  - Convert users of digital_mute() to mute_stream().
  - Simplify I/O helper functions.
  - Add a helper for getting the RTD from a substream.
  - Many, many fixes and cleanups to the x86 code.
  - New drivers for Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim
    MAX98360A and MAX98373 Soundwire, several Mediatek boards, nVidia
    Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards (some
    of the first phones I worked on!) and TI J721e EVM.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl8n96MTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0FApB/sFAbX/RWXiH5fBRQnGsfvLznORx9pA
 90xR+BgpybawRgTk4Bi87sY5lBI44S4OwUqqI58D+/GD7uchgY2Z2m+4flF9GbDU
 VTOvChqL0ZpDh2Crr2+BkSlVjZsA3h0e86W/0qoq3/q4dgb7ZfcLJ2w7A+UDq+kP
 tKKqi3mTxXuM78N3Vp8/IobIRpo/fi3Oy2aB+WOiAUD6rV88yzx+QgNkvzwvTcpm
 y8ejr2zYPYLHLshUh2S7HJaGyX7NjggGVaUolJtfGT+ArAP6j3JIxikC3Mr9TImd
 qaX2BsHNE1XARK8KQXA5qTP7++RlewSSxblpoVRFZwV70On9/L5W4GPp
 =OO0s
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v5.9

The biggest changes here one again come from Mormioto-san who has
continued his dilligent work cleaning up long standing issues in the
APIs, it's particularly nice to see the transition from digital_mute()
to mute_stream() finally completed. There's also been a lot of work on
the x86 code again, this time a big focus has been on cleaning up some
issues identified by various static tests, and on the Freescale systems.
Otherwise the biggest thing has been a lot of driver additions:

 - Convert users of digital_mute() to mute_stream().
 - Simplify I/O helper functions.
 - Add a helper for getting the RTD from a substream.
 - Many, many fixes and cleanups to the x86 code.
 - New drivers for Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim
   MAX98360A and MAX98373 Soundwire, several Mediatek boards, nVidia
   Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards (some
   of the first phones I worked on!) and TI J721e EVM.
2020-08-03 14:41:43 +02:00
Hui Wang
07c9983b56 Revert "ALSA: hda: call runtime_allow() for all hda controllers"
This reverts commit 9a6418487b ("ALSA: hda: call runtime_allow()
for all hda controllers").

The reverted patch already introduced some regressions on some
machines:
 - on gemini-lake machines, the error of "azx_get_response timeout"
   happens in the hda driver.
 - on the machines with alc662 codec, the audio jack detection doesn't
   work anymore.

Fixes: 9a6418487b ("ALSA: hda: call runtime_allow() for all hda controllers")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208511
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200803064638.6139-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 09:28:41 +02:00
Connor McAdams
7fe3530427 ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
The ca0113 command had the wrong group_id, 0x48 when it should've been
0x30. The front microphone selection should now work.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-3-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:12:17 +02:00
Connor McAdams
cc5edb1bd3 ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
Add a new quirk ID for the Recon3D, as tested by me.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:12:02 +02:00
Connor McAdams
a00dc409de ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
When the ZxR headphone gain control was added, the ca0132_switch_get
function was not updated, which meant that the changes to the control
state were not saved when entering/exiting alsamixer.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-1-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:11:40 +02:00
Takashi Iwai
3b5d1afd1f Merge branch 'for-next' into for-linus 2020-08-03 08:10:08 +02:00
Huacai Chen
f1ec5be17b ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
There are several Loongson-3 based laptops produced by CZC or Lemote,
they use alc269/alc662 codecs and need specific pin-tables, this patch
add their pin-tables.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1596360400-32425-1-git-send-email-chenhc@lemote.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-02 11:49:07 +02:00
Julia Lawall
2ac82e20e2 ALSA: docs: fix typo
GFP_KRENEL -> GFP_KERNEL

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Link: https://lore.kernel.org/r/1596224129-7699-1-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-01 11:34:12 +02:00
Julia Lawall
7f3ecf4759 ALSA: doc: use correct config variable name
CONFIG_PCM_XRUN_DEBUG should be CONFIG_SND_PCM_XRUN_DEBUG

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Link: https://lore.kernel.org/r/1596223701-7558-1-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-01 11:34:02 +02: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
Kuninori Morimoto
4d1976c799
ASoC: dt-bindings: ak4613: switch to yaml base Documentation
This patch switches from .txt base to .yaml base Document.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87mu4cxlo2.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87o8pf3923.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/873659bpbk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:35 +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
Sylwester Nawrocki
f61d06ae99
ASoC: samsung: Document DT bindings for Midas sound subsystem
This patch adds documentation of DT biding for the Midas sound complex.
Partially based on the *txt version by Simon Shields <simon@lineageos.org>.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200728131111.14334-1-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:28 +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
Kailang Yang
5649625344 ALSA: hda/realtek - Fixed HP right speaker no sound
HP NB right speaker had no sound output.
This platform was connected to I2S Amp for speaker out.(None Realtek I2S Amp IC)
EC need to check codec GPIO1 pin to initial I2S Amp.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/01285f623ac7447187482fb4a8ecaa7c@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-30 10:15:51 +02: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
63b0383f3c
dt-bindings: tlv320adcx140: Add GPO config and drive config
Add properties for configuring the General Purpose Outputs (GPO). The
GPOs. There are 2 settings for each GPO, configuration and the output drive
type.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200728160833.24130-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-29 14:23:23 +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