Commit graph

1088936 commits

Author SHA1 Message Date
Ranjani Sridharan
5da0590a09
ASoC: SOF: sof-audio: Set up widgets from source to sink
For IPC3, the order of setting up the widgets associated with a PCM
doesn't matter. But for IPC4, widgets must be set up from the source to
the sink in order. In order to accommodate this, change the
sof_widget_list_setup/free() functions to set up/free widgets starting
with the source widget all the way to the sink widget for all pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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/20220426171743.171061-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-29 13:05:56 +01:00
Ranjani Sridharan
33a3facdf8
ASoC: SOF: sof-audio: reset route status before freeing widget
This is in preparation for IPC4 which requires that the route be reset
before the widget is freed. For IPC3, there is nothing more to be done
other than setting the route status. So it is OK to be moved before the
widget is freed.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220426171743.171061-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-29 13:05:55 +01:00
Ranjani Sridharan
48d2a1ceae
ASoC: SOF: Add a new op to set up volume table
Add a new op set_up_volume_table for control IPC ops. Define and set
the op for IPC3.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220426171743.171061-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-29 13:05:54 +01:00
Hans de Goede
ce216cfa84
ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408
Add a quirk for the HP Pro Tablet 408, this BYTCR tablet has no CHAN
package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which
is the default for BYTCR devices.

It also uses DMIC1 for the internal mic rather then the default IN3
and it uses JD2 rather then the default JD1 for jack-detect.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211485
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220427134918.527381-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-28 13:20:35 +01:00
Mark Brown
3838bf828b
ASoC: sh: rz-ssi: Trivial fixes
Merge series from Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>:

This patch series aims to fix trivial issues found in rz-ssi driver.
2022-04-27 23:01:24 +01:00
Mark Brown
87e291075d
ASoC: SOF: use pm_runtime_resume_and_get()
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

simplify code pattern as recommended by Mark Brown.
2022-04-27 23:01:23 +01:00
Lad Prabhakar
767e6f2620
ASoC: sh: rz-ssi: Release the DMA channels in rz_ssi_probe() error path
DMA channels requested by rz_ssi_dma_request() in rz_ssi_probe() were
never released in the error path apart from one place. This patch fixes
this issue by calling rz_ssi_release_dma_channels() in the error path.

Fixes: 26ac471c53 ("ASoC: sh: rz-ssi: Add SSI DMAC support")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220426074922.13319-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 17:22:50 +01:00
Lad Prabhakar
91686a3984
ASoC: sh: rz-ssi: Propagate error codes returned from platform_get_irq_byname()
Propagate error codes returned from platform_get_irq_byname() instead of
returning -ENODEV. platform_get_irq_byname() may return -EPROBE_DEFER, to
handle such cases propagate the error codes.

While at it drop the dev_err_probe() messages as platform_get_irq_byname()
already does this for us in case of error.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220426074922.13319-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 17:22:49 +01:00
Lad Prabhakar
17a1fef58c
ASoC: sh: rz-ssi: Drop SSIFSR_TDC and SSIFSR_RDC macros
The mask values of SSIFSR_TDC and SSIFSR_RDC macros are incorrect and
they are unused in the file so just drop them.

Reported-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220426074922.13319-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 17:22:48 +01:00
Tinghan Shen
9ce170dc9c
ASoC: SOF: mediatek: Fix allyesconfig build error
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o:(.opd+0x18): multiple
definition of `adsp_clock_on';
sound/soc/sof/mediatek/mt8195/mt8195-clk.o:(.opd+0x60): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o: in function
`.adsp_clock_on':

ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o:(.opd+0x30): multiple
definition of `adsp_clock_off';
sound/soc/sof/mediatek/mt8195/mt8195-clk.o:(.opd+0x78): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o: in function
`.adsp_clock_off':

ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o:(.opd+0x0): multiple
definition of `sof_hifixdsp_boot_sequence';
sound/soc/sof/mediatek/mt8195/mt8195-loader.o:(.opd+0x0): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o: in function
`.sof_hifixdsp_boot_sequence':

ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o:(.opd+0x18): multiple
definition of `sof_hifixdsp_shutdown';
 sound/soc/sof/mediatek/mt8195/mt8195-loader.o:(.opd+0x18): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o: in function
`.sof_hifixdsp_shutdown':

Fixes: 570c14dc92 ("ASoC: SOF: mediatek: Add mt8186 sof fw loader and
dsp ops")
Fixes: 210b3ab932 ("ASoC: SOF: mediatek: Add mt8186 dsp clock support")

Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Link: https://lore.kernel.org/r/20220427071030.10172-1-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:35 +01:00
Amadeusz Sławiński
79fc62d6b2
ASoC: Intel: avs: Drop direct ACPI dependency
With previous patch this allows for building driver on architectures
without ACPI support present, when building with COMPILE_TEST enabled.

Fixes: 47a1886a61 ("ASoC: Intel: avs: Enable AVS driver only on x86 platforms")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220426200539.894010-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:33 +01:00
Amadeusz Sławiński
2d3694fdee
ALSA: hda: intel-nhlt: Move structs out of #define block
As functions prototypes regerdless of CONFIG options as well as some
code depend on structures defined in sound/intel-nhlt.h header, move
them out of #define block. This allows to compile code depending on
mentioned header with "depends on ACPI || COMPILE_TEST" in Kconfig.

Fixes: 47a1886a61 ("ASoC: Intel: avs: Enable AVS driver only on x86 platforms")
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220426200539.894010-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:32 +01:00
YC Hung
5ab1679d6a
ASoC: SOF: mediatek: mt8195 change ipc timeout as 1 second
The IPC message sending can take longer than the default 500ms during
system boot up due to the concurrent loading of different drivers.
Increase the IPC timeout to 1 second to avoid timeout errors due to
Linux load and scheduling.

Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183459.102251-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:31 +01:00
Pierre-Louis Bossart
afe57ecab5
ASoC: SOF: bump SOF_ABI_MINOR
Commit a0f84dfb3f ("ASoC: SOF: IPC: dai: Expand DAI_CONFIG IPC flags")
did not update the SOF_ABI_MINOR, bump to version 20 before new
changes are added.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183631.102356-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:30 +01:00
Peter Ujfalusi
fd2cea169c
ASoC: SOF: Intel: Do not (wrongly) assume positive return value in IMR path
The cl_dsp_init() returns 0 on success or negative errno on error.
Replace the 'if (ret >= 0)' checks with correct 'if (!ret)` to check for
success.

Fixes: 2a68ff8461 ("ASoC: SOF: Intel: hda: Revisit IMR boot sequence")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220427115159.26177-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:29 +01:00
Pierre-Louis Bossart
d879e94446
ASoC: Intel: atom: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_sync() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183807.102442-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:27 +01:00
Pierre-Louis Bossart
02885dd831
ASoC: SOF: sof-client-ipc-msg-injector: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426184106.102636-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:26 +01:00
Pierre-Louis Bossart
c106f46e83
ASoC: SOF: debug: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426184106.102636-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:25 +01:00
Pierre-Louis Bossart
bf0736e5d4
ASoC: SOF: control: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.

No functional changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426184106.102636-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:24 +01:00
Uwe Kleine-König
6cefb62642
ASoC: pcm1789: Make pcm1789_common_exit() return void
This function returns zero unconditionally, so there isn't any benefit
of returning a value. Make it return void to be able to see at a glance
that the return value of pcm1789_i2c_remove() is always zero.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220425193023.61046-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-26 15:13:43 +01:00
Srinivasa Rao Mandadapu
c85f533d51
ASoC: qcom: SC7280: Update machine driver startup, shutdown callbacks
Update machine driver startup, shutdown callback functions to avoid
sound card registration failure on other platforms.
Without this change, platforms with WCD codec is failing to register
sound card.

Fixes: c5198db82d ("ASoC: qcom: Add driver support for ALC5682I-VS")

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1650374329-7279-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-26 15:13:42 +01:00
Ryan Lee
3a2c9a553f
ASoC: dt-bindings: max98396: add amplifier driver
This patch adds dt-bindings information for Analog Devices MAX98396
and MAX98397 Smart Amplifier.

Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220425173715.1827706-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-26 15:13:41 +01:00
Ryan Lee
b585811367
ASoC: max98396: add amplifier driver
This series of patches adds support for Analog Devices MAX98396
mono amplifier with IV sense. The device provides a PCM interface
for audio data and a standard I2C interface for control data
communication. This driver also supports MAX98397 which is
a variant of MAX98396 with wide input supply range.

Signed-off-by: Ryan Lee <ryan.lee.analog@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220423021558.1773598-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-26 15:13:40 +01:00
Uwe Kleine-König
0e631e065b
ASoC: tas6424: Return zero in remove callback
The only effect of returning an error code in an i2c remove callback
(compared to returning zero) is that the i2c core emits a generic
warning. The device is still removed.

So even if disabling the regulators fails it's sensible to return zero
to suppress the additional generic and little helpful error message.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220425193206.61710-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-26 15:13:38 +01:00
Mark Brown
83f48ad508
ASoC: SOF: Intel: improve HDaudio DAI support
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

The SOF CI and daily tests exposed a number of issues with corner
cases on platforms using the HDaudio DAI, such as UpExtreme boards or
usual HDaudio+DMIC laptops.

This patchset provides improvements for pause_push/pause_release,
suspend-resume, mixing use cases and combinations of all three.

The initial patches provide a cleanup, the last patches improve the
state machine and DMA handling.
2022-04-25 23:51:28 +01:00
Mark Brown
0386dd9140
ASoC: SOF: Rework the firmware ready message handling
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The firmware ready (fw_ready) message is sent by the firmware to notify the host
that it has been booted up and caries additional information about it's
configuration.
All of this is IPC specific, the message itself is IPC version specific and the
information itself also.

Move the code to handle the fw_ready message under ipc3.c since the parsing and
interpretation is IPC specific.

A followup series is going to take care of the rest of the loader.c to make it
IPC agnostic.
2022-04-25 18:34:41 +01:00
Mark Brown
9a2fb6e781
ASoC: Add macros for signed TLV controls with callbacks
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

This adds SOC_DOUBLE_R_S_EXT_TLV and SOC_SINGLE_S_EXT_TLV macros for
signed TLV controls that need custom get/put callbacks. These will be
needed by future Cirrus codec drivers, but are not particularly exotic
so could be useful for others.
2022-04-25 18:22:55 +01:00
Mark Brown
b34a068c02
ASoC: remaining i2c_match_id i2c probe changes
Merge series from Stephen Kitt <steve@sk2.org>:

This series covers all the remaining changes to migrate
sound/soc/codecs i2c probes to probe_new, where the const struct
i2c_client * argument is still used. Instead of relying on the
parameter passed in, i2c_match_id is used instead.

With this set of patches, all the sound/soc/codecs i2c probes use the
new probe definition.

Changes since v1: two missing files were added.

Stephen Kitt (7):
  ASoC: ak*: use i2c_match_id and simple i2c probe
  ASoC: alc56*: use i2c_match_id and simple i2c probe
  ASoC: max980*: use i2c_match_id and simple i2c probe
  ASoC: pcm186x: use i2c_match_id and simple i2c probe
  ASoC: tas*: use i2c_match_id and simple i2c probe
  ASoC: tlv320*: use i2c_match_id and simple i2c probe
  ASoC: tpa6130: use i2c_match_id and simple i2c probe

 sound/soc/codecs/ak4613.c            | 10 +++++----
 sound/soc/codecs/ak4642.c            |  8 ++++---
 sound/soc/codecs/alc5623.c           | 24 +++++++++++----------
 sound/soc/codecs/alc5632.c           | 20 +++++++++--------
 sound/soc/codecs/max98088.c          | 21 +++++++++---------
 sound/soc/codecs/max98090.c          | 23 ++++++++++----------
 sound/soc/codecs/max98095.c          | 19 +++++++++--------
 sound/soc/codecs/pcm186x-i2c.c       | 24 ++++++++++-----------
 sound/soc/codecs/tas2562.c           | 25 +++++++++++-----------
 sound/soc/codecs/tas571x.c           | 11 ++++++----
 sound/soc/codecs/tas5720.c           | 21 +++++++++---------
 sound/soc/codecs/tlv320adc3xxx.c     | 21 +++++++++---------
 sound/soc/codecs/tlv320aic31xx.c     | 32 ++++++++++++++--------------
 sound/soc/codecs/tlv320aic32x4-i2c.c | 11 ++++++----
 sound/soc/codecs/tlv320aic3x-i2c.c   | 25 +++++++++++-----------
 sound/soc/codecs/tpa6130a2.c         | 19 +++++++++--------
 16 files changed, 168 insertions(+), 146 deletions(-)

base-commit: 5d763a740e5b24e4a2ca04317255e7e941876338
--
2.27.0
2022-04-25 18:22:54 +01:00
Mark Brown
85780eb54d
Add support of MediaTek mt8186 to SOF
Merge series from Tinghan Shen <tinghan.shen@mediatek.com>:

Add support of MediaTek mt8186 SoC DSP to SOF.
2022-04-25 18:22:52 +01:00
Tinghan Shen
0e0b83cc7e
ASoC: SOF: mediatek: Add DSP system PM callback for mt8186
Add DSP system PM callback for suspend and resume

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-5-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:04:46 +01:00
Tinghan Shen
210b3ab932
ASoC: SOF: mediatek: Add mt8186 dsp clock support
Add adsp clock on/off support on mt8186 SoC.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-4-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:04:45 +01:00
Tinghan Shen
570c14dc92
ASoC: SOF: mediatek: Add mt8186 sof fw loader and dsp ops
Add mt8186-loader module with ops callback to load and run firmware
on mt8186 SoC.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-3-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:04:44 +01:00
Tinghan Shen
1f0214a86d
ASoC: SOF: mediatek: Add mt8186 hardware support
Add support of SOF on Mediatek mt8186 SoC.
MT8186 has 2 Cortex A76 cores paired with 6 Cortex A55 cores.
It also has Cadence HiFi-5 DSP single core. The IPC communication
between AP and DSP is based on shared DRAM and mailbox interrupt.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-2-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:04:43 +01:00
Minghao Chi
e5737cceee
ASoC: img-i2s-in: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220414085310.2541546-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:00:23 +01:00
Minghao Chi
9470aa1c46
ASoC: img-parallel-out: using pm_runtime_resume_and_get
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420030246.2575629-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:00:22 +01:00
Judy Hsiao
4d9596d421
ASoC: qcom: Use MCLK as RT5682I-VS sysclk source
Both MCLK and BCLK can be the clock source of sysclk via PLL
according to its datasheet.
This patch sets MCLK as the clock source as we use MCLK in the
previous projects.

Fixes: c5198db82d ("ASoC: qcom: Add driver support for ALC5682I-VS")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220419062952.356017-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:00:21 +01:00
Haowen Bai
666b0cad75
ASoC: imx-hdmi: remove useless null check before call of_node_put()
No need to add null check before call of_node_put(), since the
implementation of of_node_put() has done it.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650509120-25377-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 14:00:20 +01:00
Amadeusz Sławiński
5755d0f63c
ASoC: Intel: avs: Depend on SND_INTEL_DSP_CONFIG
In order to enable NHLT support one must select SND_INTEL_DSP_CONFIG,
which will select SND_INTEL_NHLT. Otherwise the file containing NHLT
code doesn't get build leading to errors when linking.

Fixes: 274d79e518 ("ASoC: Intel: avs: Configure modules according to their type")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220425091646.545216-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:06 +01:00
Amadeusz Sławiński
47a1886a61
ASoC: Intel: avs: Enable AVS driver only on x86 platforms
Only supported platform for AVS are x86 machines, so there is no reason
for it to be enabled on other architectures. Allow exception for compile
tests.

Fixes: 274d79e518 ("ASoC: Intel: avs: Configure modules according to their type")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220425091646.545216-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:05 +01:00
Minghao Chi
b1d1b02594
ASoC: img-spdif-out: using pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420030439.2575817-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:04 +01:00
Minghao Chi
6eaaf9bd9b
ASoC: img-spdif-in: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220419110718.2574674-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:03 +01:00
Richard Fitzgerald
430c350099
firmware: cirrus: cs_dsp: Avoid padding bytes in cs_dsp_coeff_ctl
Change the order of members in struct cs_dsp_coeff_ctl to avoid
the compiler having to insert alignment padding bytes. On a x86_64
build this saves 16 bytes per control.

- Pointers are collected to the top of the struct (with the exception of
  priv, as noted below), so that they are inherently aligned.
- The set and enable bitflags are placed together so they can be merged.
- priv is placed at the end of the struct - it is for use by the
  client so it is helpful to make it stand out, and since the compiler
  will always pad the struct size to an alignment multiple putting a
  pointer last won't introduce any more padding.
- struct cs_dsp_alg_region is placed at the end, right before priv, for
  the same reasoning as priv.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220425095159.3044527-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:02 +01:00
Biju Das
cc691ba94c
ASoC: sh: Make SND_SOC_RZ depend on ARCH_RZG2L
The SSI block is identical on Renesas RZ/G2L, RZ/G2UL and RZ/V2L SoC's, so
instead of adding dependency for each SoC's add dependency on ARCH_RZG2L.
The ARCH_RZG2L config option is already selected by ARCH_R9A07G043,
ARCH_R9A07G044 and ARCH_R9A07G054.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220423164443.146299-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:01 +01:00
Minghao Chi
d05040741a
ASoC: fsl_asrc: using pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420030402.2575755-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:59:00 +01:00
Stephen Kitt
988e6870c8
ASoC: tlv320*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

In the context of an i2c probe, i2c_match_id with the module id table
and the probed client never returns null, so removing the null check
on the i2c_device_id pointer is safe.

The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang, except where the existing code already had
a declaration for the of_device_id table.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-7-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:58:56 +01:00
Stephen Kitt
55116b39e5
ASoC: tas*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang, except where the existing code already had
a declaration for the of_device_id table.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-6-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:58:55 +01:00
Stephen Kitt
3577a8a0ac
ASoC: pcm186x: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

The i2c id table is moved up before the probe function, as suggested
by Wolfram Sang.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-5-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:58:54 +01:00
Stephen Kitt
4ac8ebb6cc
ASoC: max980*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

In the context of an i2c probe, i2c_match_id with the module id table
and the probed client never returns null, so removing the null check
on the i2c_device_id pointer is safe.

The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-4-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:58:53 +01:00
Stephen Kitt
9d8f2edd3d
ASoC: alc56*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-3-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:58:52 +01:00
Stephen Kitt
e654a1331f
ASoC: ak*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-2-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-25 13:58:51 +01:00