Commit graph

966239 commits

Author SHA1 Message Date
V Sujith Kumar Reddy
60a973862f
ASoC: qcom: sc7180: Register shutdown handler for lpass platform
Register shutdown handler to stop sc7180 lpass platform driver
and to disable audio clocks.

Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Link: https://lore.kernel.org/r/1605292702-25046-1-git-send-email-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16 20:06:56 +00:00
V Sujith Kumar Reddy
313ebec48d
ASoC: qcom: lpass-sc7180: Add 32 bit format support for capture
Add 32 bit format support for capture in lpass-sc7180
snd_soc_dai_driver capabilities. Need to add contstraints
in machine driver so that only specific format allowed.

Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Signed-off-by: Srinivasa Rao Manidadapu <srivasam@codeaurora.org>
Link: https://lore.kernel.org/r/1605512955-7017-1-git-send-email-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16 20:04:34 +00:00
Kai Vehmanen
6c2b6bb0d3
ASoC: SOF: Intel: initial support for Alderlake-S
Add Kconfig entries, PCI ID and chip info for Alderlake-S product.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201116142642.2106067-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16 20:03:34 +00:00
Jerome Brunet
299fe9937d
ASoC: meson: fix COMPILE_TEST error
When compiled with CONFIG_HAVE_CLK, the kernel need to get provider for the
clock API. This is usually selected by the platform and the sound drivers
should not really care about this. However COMPILE_TEST is special and the
platform required may not have been selected, leading to this type of
error:

> aiu-encoder-spdif.c:(.text+0x3a0): undefined reference to `clk_set_parent'

Since we need a sane provider of the API with COMPILE_TEST, depends on
COMMON_CLK.

Fixes: 6dc4fa179f ("ASoC: meson: add axg fifo base driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20201116172423.546855-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16 20:03:33 +00:00
Dan Carpenter
7141f25f14
ASoC: qcom: sc7180: initialize the "no_headphone" variable
The "no_headphone" variable is never set to "false" so it could be
uninitialized.

Fixes: e936619b7c ("ASoC: qcom: sc7180: Modify machine driver for sound card")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201116125950.GA44063@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16 20:03:33 +00:00
Mark Brown
85288b3bf1
Merge series "ASoC: use inclusive language for bclk/fsync/topology" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
The SOF (Sound Open Firmware) tree contains a lot of references in
topology files to 'codec_slave'/'codec_master' terms, which in turn
come from alsa-lib and ALSA/ASoC topology support at the kernel
level. These terms are no longer compatible with the guidelines
adopted by the kernel community [1], standard organizations, and need
to change in backwards-compatible ways.

The main/secondary terms typically suggested in guidelines don't mean
anything for clocks, this patchset suggests instead the use of
'provider' and 'consumer' terms, with the 'codec' prefix kept to make
it clear that the codec is the reference. The CM/CS suffixes are also
replaced by CP/CC.

It can be argued that the change of suffix is invasive, but finding a
replacement that keeps the M and S shortcuts has proven difficult in
quite a few contexts.

The previous definitions are kept for backwards-compatibility so this
change should not have any functional impact. It is suggested that new
contributions only use the new terms but there is no requirement to
transition immediately to the new definitions for existing code. Intel
will however update all its past contributions related to bit
clock/frame sync configurations immediately.

This patchset contains the kernel changes only, the alsa-lib changes
were shared separately.

Feedback welcome
~Pierre

[1] https://lkml.org/lkml/2020/7/4/229

Pierre-Louis Bossart (4):
  ASoC: topology: use inclusive language for bclk and fsync
  ASoC: SOF: use inclusive language for bclk and fsync
  ASoC: Intel: atom: use inclusive language for SSP bclk/fsync
  ASoC: Intel: keembay: use inclusive language for bclk and fsync

 include/sound/soc-dai.h                  | 32 +++++++++++++++---------
 include/sound/sof/dai.h                  | 16 ++++++++----
 include/uapi/sound/asoc.h                | 22 ++++++++++------
 sound/soc/intel/atom/sst-atom-controls.c | 12 ++++-----
 sound/soc/intel/atom/sst-atom-controls.h |  4 +--
 sound/soc/intel/keembay/kmb_platform.c   | 22 ++++++++--------
 sound/soc/intel/keembay/kmb_platform.h   |  8 +++---
 sound/soc/soc-topology.c                 | 24 +++++++++---------
 sound/soc/sof/topology.c                 | 18 ++++++-------
 9 files changed, 89 insertions(+), 69 deletions(-)

--
2.25.1
2020-11-13 16:04:13 +00:00
Oder Chiou
33ee67b47b
ASoC: rt5682: Add a new property to the device tree.
The patch adds a new property to the drice tree for the DMIC clcok driving.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20201113055400.11242-2-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13 14:22:10 +00:00
Oder Chiou
7416f6bc5f
ASoC: rt5682: Add a new property for the DMIC clock driving
The patch adds a new property to set the DMIC clock driving.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20201113055400.11242-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13 14:22:09 +00:00
Pierre-Louis Bossart
a6e9717a71
ASoC: Intel: keembay: use inclusive language for bclk and fsync
Use 'clock provider' and 'clock consumer' terms.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13 14:22:08 +00:00
Pierre-Louis Bossart
84b53a366e
ASoC: Intel: atom: use inclusive language for SSP bclk/fsync
Use 'provider' and 'consumer' terms.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13 14:22:07 +00:00
Pierre-Louis Bossart
df132fa9da
ASoC: SOF: use inclusive language for bclk and fsync
Mirror alsa-lib definitions w/ codec_provider (CP) and
codec_consumer (CC).

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13 14:22:06 +00:00
Pierre-Louis Bossart
f026c12300
ASoC: topology: use inclusive language for bclk and fsync
Mirror suggested changes in alsa-lib.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13 14:22:05 +00:00
Mark Brown
a5a8ac3ca0
Merge series "ASoC: SOF: Kconfig corrections" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Three cosmetic patches and a fix for a randconfig issue.

v2: rebase to remove git am issue (worked with --3way before)

Pierre-Louis Bossart (1):
  ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG

Randy Dunlap (3):
  ASoC: SOF: imx: fix Kconfig punctuation
  ASoC: SOF: Kconfig: fix Kconfig punctuation and wording
  ASoC: SOF: Intel: fix Kconfig punctuation and wording

 sound/soc/sof/Kconfig       | 42 ++++++++++++------------
 sound/soc/sof/imx/Kconfig   | 10 +++---
 sound/soc/sof/intel/Kconfig | 64 ++++++++++++++++++-------------------
 3 files changed, 58 insertions(+), 58 deletions(-)

--
2.25.1
2020-11-12 19:35:50 +00:00
Mark Brown
9c2368e353
Merge series "Support SC7180 sound card variation without headset" from xuyuqing <xuyuqing@huaqin.corp-partner.google.com>:
Use compatible string to let machine driver handle the case
where ALC5682 headset codec is replaced with ADAU7002 dmic codec

xuyuqing (2):
  ASoC: google: dt-bindings: add new compatible for sc7180-coachz
  ASoC: qcom: sc7180: Add machine driver for sound card

 .../bindings/sound/google,sc7180-trogdor.yaml |  4 +-
 sound/soc/qcom/Kconfig                        |  1 +
 sound/soc/qcom/sc7180.c                       | 86 ++++++++++++++++---
 3 files changed, 77 insertions(+), 14 deletions(-)

--
2.25.1
2020-11-12 19:35:49 +00:00
Mark Brown
3c3650274f
Merge series "ASoC: soundwire: SDCA device quirk and cleanups" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Add one quirk to handle new TigerLake-SDCA device and cleanup code.

Pierre-Louis Bossart (4):
  ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
  ASoC: codecs: rt*.c: remove useless pointer cast
  ASoC: rt711: remove warnings
  ASoC: codecs: max98373-sdw: align regmap use with other codecs

 sound/soc/codecs/max98373-sdw.c  |  2 +-
 sound/soc/codecs/rt1308-sdw.c    |  2 +-
 sound/soc/codecs/rt5682-sdw.c    |  2 +-
 sound/soc/codecs/rt700.c         |  2 +-
 sound/soc/codecs/rt711-sdw.c     | 15 ++++++++-------
 sound/soc/codecs/rt711.c         |  2 +-
 sound/soc/codecs/rt715.c         |  2 +-
 sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++
 8 files changed, 24 insertions(+), 13 deletions(-)

--
2.25.1
2020-11-12 19:35:48 +00:00
Mark Brown
76462effbd
Merge series "ASoC: Fix error handling in wm899x" from Zhang Qilong <zhangqilong3@huawei.com>:
The first patch fixed a wrong free in wm8997_probe. The
remaining three patches fixed PM disable depth imbalance
on error handling.

Zhang Qilong (4):
  ASoC: arizona: Fix a wrong free in wm8997_probe
  ASoC: arizona: Fix PM disable depth imbalance on error
  ASoC: wm8994: Fix PM disable depth imbalance on error
  ASoC: wm8998: Fix PM disable depth imbalance on error

 sound/soc/codecs/wm8994.c | 6 +++++-
 sound/soc/codecs/wm8997.c | 8 ++++++--
 sound/soc/codecs/wm8998.c | 4 +++-
 3 files changed, 14 insertions(+), 4 deletions(-)

--
2.25.4
2020-11-12 19:35:47 +00:00
Fabio Estevam
c31da0b196
ASoC: imx-ssi: Remove unused driver
The imx-ssi driver was only used by i.MX non-DT platforms.

Since 5.10-rc1, i.MX has been converted to a DT-only platform and all
board files are gone.

Remove the imx-ssi audio driver as there are no more users at all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-6-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:42 +00:00
Fabio Estevam
ffc64110b7
ASoC: fsl: eukrea: Remove the SND_SOC_IMX_SSI selection
SND_SOC_IMX_SSI was only used by i.MX non-DT platforms.

SND_SOC_EUKREA_TLV320 already selects the SND_SOC_FSL_SSI symbol,
which is enough.

Remove the unneeded SND_SOC_IMX_SSI selection.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:41 +00:00
Fabio Estevam
83e7e22786
ASoC: imx-mc13783: Remove unused driver
The imx-mc13783 was used on imx27-pdk and imx31-pdk non-DT platforms.

Since 5.10-rc1, i.MX has been converted to a DT-only platform and all
board files are gone.

Remove the imx-mc13783 audio machine driver as there is no user at all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:40 +00:00
Fabio Estevam
440534a0ec
ASoC: phycore-ac97: Remove unused driver
Since commit e1324ece2a ("ARM: imx: Remove i.MX35 board files"), the
MACH_PCM043 and MACH_PCA100 non-DT platform are no longer supported,
so get rid of their machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:40 +00:00
Fabio Estevam
3fbb01fb58
ASoC: mx27vis-aic32x4: Remove unused driver
Since commit 879c0e5e0a ("ARM: imx: Remove i.MX27 board files"), the
MACH_IMX27_VISSTRIM_M10 non-DT platform is no longer supported,
so get rid of its machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:39 +00:00
Fabio Estevam
9c9fd07eb4
ASoC: wm1133-ev1: Remove unused driver
Since commit c93197b004 ("ARM: imx: Remove i.MX31 board files"), the
MACH_MX31ADS_WM1133_EV1 non-DT platform is no longer supported,
so get rid of its machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:38 +00:00
Pierre-Louis Bossart
358f0ac1f2
ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG
SND_INTEL_DSP_CONFIG is selected by the HDaudio, Skylake and SOF
drivers. When the HDaudio link is not selected as a option, this
Kconfig option is not touched and will default to whatever other
drivers selected. In the case e.g. where HDaudio is compiled as
built-in, the linker will complain:

ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe':
sof-pci-dev.c:(.text+0x5c): undefined reference to
`snd_intel_dsp_driver_probe'

Adding the select for all HDaudio platforms, regardless of whether
they rely on the HDaudio link or not, solves the problem.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 82d9d54a6c ('ALSA: hda: add Intel DSP configuration / probe code')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 17:18:00 +00:00
Randy Dunlap
66e1b65128
ASoC: SOF: Intel: fix Kconfig punctuation and wording
Add periods at the end of sentences in help text.
Insert a "not" in one place.
Fix help text indentation.
Remove a duplicate "Intel(R)" in one place.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 17:17:59 +00:00
Randy Dunlap
aff581aee8
ASoC: SOF: Kconfig: fix Kconfig punctuation and wording
Add periods at the end of sentences in help text.
Drop "a" in one place where it is not needed.
Fix a verb.
Add some capitalization.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 17:17:58 +00:00
Randy Dunlap
724d53f6a0
ASoC: SOF: imx: fix Kconfig punctuation
Add periods at the end of sentences in help text.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201112164425.25603-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 17:17:57 +00:00
Kai Vehmanen
0c7f946d6b
ASoC: SOF: loader: do not warn about unknown firmware headers
The firmware extended data IPC and manifest structures are designed to
be extendable without breaking the driver-firmware ABI. Driver should
not raise a warning in case a new header type is detected at
firmware boot. There are already checks for IPC ABI compatibility in
snd_sof_ipc_valid() and if the versions are deemed compatible, extra
fields in IPC messages should not trigger warnings.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Karol Trzciński <karolx.trzcinski@linux.intel.com>
Link: https://lore.kernel.org/r/20201111173321.1933452-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:56 +00:00
Dharageswari R
e7ee770a3f
ASoC: Intel: Boards: tgl_max98373: add dpcm_capture flag for speaker_smart_amp
Smart_amp_speaker device has the playback stream and capture stream
associated to it. Hence add the dpcm_capture = 1 flag while dailink
creation.
This patches fixes:
ERR kernel [timestamp] SSP1-Codec: ASoC: no backend capture stream

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201109210958.84198-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:55 +00:00
Pierre-Louis Bossart
f184892613
ASoC: codecs: max98373-sdw: align regmap use with other codecs
It's not clear why this driver has an additional call to
regmap_mark_dirty(), remove to align with others.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:54 +00:00
Pierre-Louis Bossart
17f6433192
ASoC: rt711: remove warnings
cppcheck complains, use separate loop variable for sink and source ports

sound/soc/codecs/rt711-sdw.c:382:4: style: Variable 'i' is reassigned
a value before the old one has been used. [redundantAssignment]
 i = 0;
   ^
sound/soc/codecs/rt711-sdw.c:371:4: note: i is assigned
  i++;
   ^
sound/soc/codecs/rt711-sdw.c:382:4: note: i is overwritten
 i = 0;
   ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:53 +00:00
Pierre-Louis Bossart
4a55000722
ASoC: codecs: rt*.c: remove useless pointer cast
Pointer cast is not necessary, remove.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:52 +00:00
Pierre-Louis Bossart
488cdbd893
ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
Add quirks for jack detection, rt715 DAI and number of speakers.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20201111214318.150529-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:51 +00:00
xuyuqing
e936619b7c
ASoC: qcom: sc7180: Modify machine driver for sound card
Bypass set jack because there is no jack on coachz.
Create route for dmic.

Signed-off-by: xuyuqing <xuyuqing@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20201112014328.695232-3-xuyuqing@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:13 +00:00
xuyuqing
80e2b1208d
ASoC: google: dt-bindings: add new compatible for sc7180-coachz
Add devicetree bindings for coachz in documentation file

Signed-off-by: xuyuqing <xuyuqing@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20201112014328.695232-2-xuyuqing@huaqin.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:15:12 +00:00
Zhang Qilong
5e7aace13d
ASoC: arizona: Fix a wrong free in wm8997_probe
In the normal path, we should not free the arizona,
we should return immediately. It will be free when
call remove operation.

Fixes: 31833ead95 ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Reported-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111130923.220186-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 15:14:37 +00:00
Mark Brown
c5abd7770d
Merge series "Fix PM disable depth imbalance on error" from Zhang Qilong <zhangqilong3@huawei.com>:
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. This series of patches
fixed it.

Zhang Qilong (3):
  ASoC: wm8994: Fix PM disable depth imbalance on error
  ASoC: wm8997: Fix PM disable depth imbalance on error
  ASoC: wm8998: Fix PM disable depth imbalance on error

 sound/soc/codecs/wm8994.c | 6 +++++-
 sound/soc/codecs/wm8997.c | 9 +++++++--
 sound/soc/codecs/wm8998.c | 4 +++-
 3 files changed, 15 insertions(+), 4 deletions(-)

--
2.25.4
2020-11-11 15:44:29 +00:00
Jiaxin Yu
2aff94e47d
ASoC: mediatek: mt8192: skip first time data at the beginning of DMIC recording
We can choose to drop away any length of data from the beginning according
to project needs. Some projects don't want to throw away any data, because
they want to use recorded data to do echo cancellation, so they have to
make sure that they are aligned with the reference data as much as
possible. Or there are other algorithms in the upper layer to eliminate
this noise. Or some projects want to eliminate this noise form the kernel
layer. However, the minimum recommended value is 50ms to skip pop noise.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1605062722-8711-1-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11 12:35:12 +00:00
Shane.Chien
6b0e12a5c6
ASoC: Remove mt6359_platform_driver_remove
remove mt6359_platform_driver_remove due to it is
useless.

Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1605068096-12587-1-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11 12:35:11 +00:00
Jon Hunter
34d3daba23
ASoC: tegra: Don't warn on probe deferral
Deferred probe is an expected return value for snd_soc_register_card().
Given that the driver deals with it properly, there's no need to output
a warning that may potentially confuse users.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20201111103245.152189-1-jonathanh@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11 12:35:10 +00:00
Zhang Qilong
193aa0a043
ASoC: wm8998: Fix PM disable depth imbalance on error
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context.

Fixes: 31833ead95 ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11 12:35:09 +00:00
Zhang Qilong
b8161cbe55
ASoC: wm8994: Fix PM disable depth imbalance on error
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context.

Fixes: 57e265c8d7 ("ASoC: wm8994: Move runtime PM init to platform device init")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11 12:35:08 +00:00
Mark Brown
0a142f5367
Merge series "Audio Graph Updates" from Sameer Pujar <spujar@nvidia.com>:
This series is a prepraration for using generic graph driver for Tegra210
audio. Tegra audio graph series will be sent in a separate series because
it has some dependency over other series for documentation work. This
series can focus on the generic ASoC driver updates. Below are the summary
of changes done.

 * Support multiple instances of a component. For example there can be
   multiple I2S devices which can use the same component driver.

 * Support open platforms with empty Codec endpoint. Customers can plug
   their own HW and can populate codec endpoint.

 * In a component model there can be many components which can be
   connected together. In such cases Identify no-pcm DPCM DAI links which
   can be used in BE<->BE connections.

 * Expose structures or helpers to be re-used by other similar graph
   drivers.

The series is based on following references where DPCM usgae for Tegra
Audio and simple-card driver proposal were discussed.

 * https://lkml.org/lkml/2020/4/30/519 (DPCM for Tegra)
 * https://lkml.org/lkml/2020/6/27/4 (simple-card driver)

Changelog
=========

v4 -> v5
--------
 * No changes in the core/audio-graph driver patches which are
   part of the current series.
 * Dropped Tegra audio patches and doc patches. This will be
   sent separately once the doc depdendencies are resolved.

v3 -> v4
--------
 * Added new patches to convert graph.txt and audio-graph-card.txt
   to corresponding json-schema files. Later these references
   are used in Tegra audio graph schema.

 * AHUB component binding docs are updated to reflect the usage
   of ports/port/endpoint

 * More common stuff is moved into graph_parse_of() and this is
   used by both generic and Tegra audio graph.

 * DT binding for Tegra audio graph is updated to included "ports { }"

 * As per the suggestion 'void *data' member is dropped from
   'asoc_simple_priv' and instead container method is used to
   maintain required custom data internal to Tegra audio graph.

v2 -> v3
--------
 * Dropped new compatible addition in generic graph driver
   after reviewing it with Morimoto-san. Instead added Tegra
   audio graph driver and new compatibles are added in the same.
 * Added new patches to expose new members for customization
   in audio graph driver.
 * Added new patch for Tegra audio graph driver and related
   documentation.
 * Minor change in below commit where mutex version of helper is used
   "ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM"
 * DT binding is updated to use the newly exposed compatibles
 * No changes in other patches

v1 -> v2
--------
 * Re-organized ports/endpoints description for ADMAIF and XBAR.
   Updated DT patches accordingly.
 * After above change, multiple Codec endpoint support is not
   required and hence dropped for now. This will be considered
   separately if at all required in future.
 * Re-ordered patches in the series.

Sameer Pujar (7):
  ASoC: soc-core: Fix component name_prefix parsing
  ASoC: soc-pcm: Get all BEs along DAPM path
  ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names
  ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM
  ASoC: audio-graph: Support empty Codec endpoint
  ASoC: audio-graph: Expose new members for asoc_simple_priv
  ASoC: audio-graph: Expose helpers from audio graph

 include/sound/graph_card.h           |  16 ++++
 include/sound/simple_card_utils.h    |   3 +
 include/sound/soc.h                  |   1 +
 sound/soc/generic/audio-graph-card.c | 175 ++++++++++++++++++++++++-----------
 sound/soc/soc-core.c                 |   3 +-
 sound/soc/soc-pcm.c                  |   3 +-
 6 files changed, 143 insertions(+), 58 deletions(-)
 create mode 100644 include/sound/graph_card.h

--
2.7.4
2020-11-10 21:36:13 +00:00
Dan Carpenter
4e59dd249c
ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of()
There are two issues in this function.

1) We can't drop the refrences on "cpu", "codec" and "platform" before
   we take the reference.  This doesn't cause a problem on the first
   iteration because those pointers start as NULL so the of_node_put()
   is a no-op.  But on the subsequent iterations, it will lead to a use
   after free.

2) If the devm_kzalloc() allocation failed then the code returned
   directly instead of cleaning up.

Fixes: c1e6414cdc ("ASoC: qcom: common: Fix refcount imbalance on error")
Fixes: 1e36ea360a ("ASoC: qcom: common: use modern dai_link style")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:25 +00:00
Viorel Suman
048751de56
ASoC: fsl_xcvr: fix break condition
The break condition copied by mistake as same
as loop condition in the previous version, but must
be the opposite. So fix it.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/20201102161810.902464-1-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:25 +00:00
Sameer Pujar
e32b100bc6
ASoC: audio-graph: Expose helpers from audio graph
This commit exposes following functions which can be used by a sound
card driver based on generic audio graph driver. Idea is vendors can
have a thin driver and re-use common stuff from audio graph driver.

 - graph_card_probe()
 - graph_parse_of()

In doing so a new header file is added for above. The graph_probe()
function is simplified by moving more common stuff to graph_parse_of().

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-8-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:23 +00:00
Sameer Pujar
d09c774f2f
ASoC: audio-graph: Expose new members for asoc_simple_priv
Add new members in struct 'asoc_simple_priv'. Idea is to leverage
simple or graph card driver as much as possible and vendor can
maintain a thin driver to control the behavior by populating these
newly exposed members.

Following are the members added in 'asoc_simple_priv':

  - 'ops' struct: In some cases SoC vendor drivers may want to
    implement 'snd_soc_ops' callbacks differently. In such cases
    custom callbacks would be used.

  - 'force_dpcm' flag: Right now simple or graph card drivers
    detect DAI links as DPCM links if:

      * The dpcm_selectable is set AND
      * Codec is connected to multiple CPU endpoints or aconvert
        property is used for rate/channels.

    So there is no way to directly specify usage of DPCM alone. So a
    flag is exposed to mark all links as DPCM. Vendor driver can
    set this if required.

  - 'dpcm_selectable': Currently simple or audio graph drivers
    provide a way to enable this for specific compatibles. However
    vendor driver may want to define some additional info. Thus
    expose this variable where vendor drivers can set this if
    required.

Audio graph driver is updated to consider above flags or callbacks.
Subsequent patches in the series illustrate usage for above.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-7-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:22 +00:00
Sameer Pujar
930dd47d74
ASoC: audio-graph: Support empty Codec endpoint
For open platforms, which can support pluggable audio cards, Codec
endpoint is not fixed always. It actually depends on the compatible
HW module that is going to be connected. From SoC side the given I/O
interface is always available. Hence such links have fixed CPU endpoint
but no Codec endpoint. This patch helps to support such links where
user can populate Codec endpoint only and its fields in Platform DT
depending on the plugged HW.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-6-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:21 +00:00
Sameer Pujar
c21cbb526c
ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM
PCM devices are created for FE dai links with 'no-pcm' flag as '0'.
Such DAI links have CPU component which implement either pcm_construct()
or pcm_new() at component or dai level respectively. Based on this,
current patch exposes a helper function to identify such components
and populate 'no_pcm' flag for DPCM DAI link.

This helps to have BE<->BE component links where PCM devices need
not be created for CPU component involved in such links.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:20 +00:00
Sameer Pujar
e6aeb375d2
ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names
For multiple instances of components, using DAI name alone for DAI links
is causing conflicts. Components can define multiple DAIs and hence using
just a device name won't help either. Thus DT device node reference and
DAI names are used to uniquely represent DAI link names.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/1604329814-24779-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:19 +00:00
Sameer Pujar
aa293777bf
ASoC: soc-pcm: Get all BEs along DAPM path
dpcm_end_walk_at_be() stops the graph walk when first BE is found for
the given FE component. In a component model we may want to connect
multiple DAIs from different components. A new flag is introduced in
'snd_soc_card', which when set allows DAI/component chaining. Later
PCM operations can be called for all these listed components for a
valid DAPM path.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-10 17:28:18 +00:00