]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
4 years agoASoC: dt-bindings: ti, j721e-cpb-audio: Document support for j7200-cpb
Peter Ujfalusi [Thu, 10 Sep 2020 12:41:09 +0000 (15:41 +0300)]
ASoC: dt-bindings: ti, j721e-cpb-audio: Document support for j7200-cpb

j721e or j7200 SOM can be attached to the same Common Processor Board (CPB)

With the j7200 SOM only the 48KHz family parent clock is available and
McASP0 is used for the audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200910124110.19361-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ASoC: q6dsp: Add support to Codec Ports." from Srinivas Kandagatla...
Mark Brown [Thu, 10 Sep 2020 12:29:30 +0000 (13:29 +0100)]
Merge series "ASoC: q6dsp: Add support to Codec Ports." from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

LPASS IP on SoCs like SM8250 has Digital Codec part integrated into it.
This ports are exposed in Q6DSP as Codec ports. This patchset adds
support to those q6afe ports along with q6routing and q6afe-dai.

This patchset has been tested along with other patches on
Qualcomm Robotics RB5 Platform with Soundwire and WSA8815 Codec.

Thanks,
srini

Srinivas Kandagatla (8):
  ASoC: q6dsp: q6afe: add support to Codec DMA ports
  ASoC: q6dsp: q6routing: add support to Codec DMA ports
  ASoC: q6dsp: q6afe: prepare afe_apr_send_pkt to take response opcode
  ASoC: q6dsp: q6afe: add global q6afe waitqueue
  ASoC: q6dsp: q6afe: add lpass hw voting support
  ASoC: q6dsp: q6afe: update q6afe_set_param to support global clocks
  ASoC: q6dsp: q6afe: add codec lpass clocks
  ASoC: q6dsp: q6afe-dai: add support to Codec DMA ports

 include/dt-bindings/sound/qcom,q6afe.h |  22 ++
 sound/soc/qcom/qdsp6/q6afe-dai.c       | 229 ++++++++++++++++++
 sound/soc/qcom/qdsp6/q6afe.c           | 308 +++++++++++++++++++++++--
 sound/soc/qcom/qdsp6/q6afe.h           |  33 ++-
 sound/soc/qcom/qdsp6/q6routing.c       | 121 +++++++++-
 5 files changed, 689 insertions(+), 24 deletions(-)

--
2.21.0

4 years agoASoC: q6dsp: q6afe-dai: add support to Codec DMA ports
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:32 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe-dai: add support to Codec DMA ports

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-9-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6afe: add codec lpass clocks
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:31 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe: add codec lpass clocks

LPASS now has integrated codec control whose clocks are controlled by Q6DSP.
This patch adds support to those clocks.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6afe: update q6afe_set_param to support global clocks
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:30 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe: update q6afe_set_param to support global clocks

Previously there was no case where we need to set clock or send commands
that are not associated with q6afe ports, now we have cases like clock
voting and clock consumers like codecs that needed these clocks.

update q6afe_set_param() to support such cases, including token passing.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6afe: add lpass hw voting support
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:29 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe: add lpass hw voting support

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6afe: add global q6afe waitqueue
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:28 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe: add global q6afe waitqueue

In some cases like clocks q6afe would have to process commands
without an associated q6afe port, in such cases waitqueue is
required at global level to wait for the command to finish.
This patch also adds the command result to go with this waitqueue.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6afe: prepare afe_apr_send_pkt to take response opcode
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:27 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe: prepare afe_apr_send_pkt to take response opcode

Update afe_apr_send_pkt() to take response opcode that it should wait for.
This is helpful in cases where we expect response other than the
actual command opcode.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6routing: add support to Codec DMA ports
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:26 +0000 (11:17 +0100)]
ASoC: q6dsp: q6routing: add support to Codec DMA ports

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: q6dsp: q6afe: add support to Codec DMA ports
Srinivas Kandagatla [Thu, 10 Sep 2020 10:17:25 +0000 (11:17 +0100)]
ASoC: q6dsp: q6afe: add support to Codec DMA ports

New LPASS supports various codec macros, DSP firmware already
has support to those ports. Add corresponding configuration
support to those ports in adsp drivers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200910101732.23484-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: dt-bindings: rt1015p: add document
Tzung-Bi Shih [Thu, 10 Sep 2020 04:29:49 +0000 (12:29 +0800)]
ASoC: dt-bindings: rt1015p: add document

Adds DT binding document for rt1015p.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200910042949.3795682-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt1015p: add codec driver
Tzung-Bi Shih [Thu, 10 Sep 2020 04:29:48 +0000 (12:29 +0800)]
ASoC: rt1015p: add codec driver

Adds rt1015p codec driver.

Rt1015p is a rt1015 variant.
- It doesn't support I2C.
- It only supports S24, 48kHz, 64FS.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200910042949.3795682-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: add DT bindings for Microchip S/PDIF TX Controller
Codrin Ciubotariu [Wed, 9 Sep 2020 14:53:47 +0000 (17:53 +0300)]
ASoC: add DT bindings for Microchip S/PDIF TX Controller

This patch adds DT bindings for the new Microchip S/PDIF TX Controller
embedded inside sama7g5 SoCs.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200909145348.367033-1-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: mchp-spdiftx: add driver for S/PDIF TX Controller
Codrin Ciubotariu [Wed, 9 Sep 2020 14:53:48 +0000 (17:53 +0300)]
ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller

The new SPDIF TX controller is a serial port compliant with the IEC-
60958 standard. It also supports programmable User Data and Channel
Status fields.

This IP is embedded in Microchip's sama7g5 SoC.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20200909145348.367033-2-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: txx9: Replace tasklet with work
Takashi Iwai [Thu, 3 Sep 2020 10:47:49 +0000 (12:47 +0200)]
ASoC: txx9: Replace tasklet with work

The tasklet is an old API that should be deprecated, usually can be
converted to another decent API.  In ASoC TXx9 ACLC driver, a tasklet
is still used for offloading the hardware reset function.  It can be
achieved gracefully with a work queued, too.

This patch replaces the tasklet usage in TXx9 ACLC driver with a
simple work.  The conversion is fairly straightforward.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200903104749.21435-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sh: Replace tasklet with work
Takashi Iwai [Thu, 3 Sep 2020 10:47:48 +0000 (12:47 +0200)]
ASoC: sh: Replace tasklet with work

The tasklet is an old API that should be deprecated, usually can be
converted to another decent API.  In ASoC SH SIU driver, a tasklet is
still used for offloading the hardware reset function.  It can be
achieved gracefully with a work queued, too.

This patch replaces the tasklet usage in SH SIU driver with a simple
work.  The conversion is fairly straightforward.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200903104749.21435-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl: Replace tasklet with work
Takashi Iwai [Thu, 3 Sep 2020 10:47:47 +0000 (12:47 +0200)]
ASoC: fsl: Replace tasklet with work

The tasklet is an old API that should be deprecated, usually can be
converted to another decent API.  In ASoC FSL ESAI CPU DAI driver, a
tasklet is still used for offloading the hardware reset function.
It can be achieved gracefully with a work queued, too.

This patch replaces the tasklet usage in fsl esai driver with a simple
work.  The conversion is fairly straightforward.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200903104749.21435-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge branch 'topic/tasklet-convert' of https://git.kernel.org/pub/scm/linux/kernel...
Mark Brown [Wed, 9 Sep 2020 14:20:17 +0000 (15:20 +0100)]
Merge branch 'topic/tasklet-convert' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.10

4 years agoMerge series "ASoC: qcom: common: Parse auxiliary devices from device tree" from...
Mark Brown [Tue, 8 Sep 2020 14:50:13 +0000 (15:50 +0100)]
Merge series "ASoC: qcom: common: Parse auxiliary devices from device tree" from Stephan Gerhold <stephan@gerhold.net>:

In some cases we need to probe additional audio components that do
not appear as part of the DAI links specified in the device tree.
Examples for this are auxiliary devices such as analog amplifiers
or codecs.

The ASoC core provides a way to probe these components by adding
them to snd_soc_card->aux_dev.

This patch set allows specifying them in the device tree through
a new "aux-devs" property.

v1: https://lore.kernel.org/linux-arm-msm/20200819091533.2334-1-stephan@gerhold.net/
Changes in v2:
  - Fix value type in device tree bindings:
    aux-devs should be array of phandles without any arguments, so change
    <phandles with arguments> -> <array of phandles>

Stephan Gerhold (2):
  ASoC: dt-bindings: qcom: Document "aux-devs" property
  ASoC: qcom: common: Parse auxiliary devices from device tree

 .../devicetree/bindings/sound/qcom,apq8016-sbc.txt        | 7 +++++++
 Documentation/devicetree/bindings/sound/qcom,apq8096.txt  | 8 ++++++++
 Documentation/devicetree/bindings/sound/qcom,sdm845.txt   | 8 ++++++++
 sound/soc/qcom/common.c                                   | 4 ++++
 4 files changed, 27 insertions(+)

--
2.28.0

4 years agoASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe()
Yu Kuai [Tue, 25 Aug 2020 13:02:24 +0000 (21:02 +0800)]
ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe()

if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have
a corresponding put_device(). Thus add a jump target to fix the exception
handling for this function implementation.

Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20200825130224.1488694-1-yukuai3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: qcom: common: Parse auxiliary devices from device tree
Stephan Gerhold [Wed, 26 Aug 2020 09:51:41 +0000 (11:51 +0200)]
ASoC: qcom: common: Parse auxiliary devices from device tree

In some cases we need to probe additional audio components that do
not appear as part of the DAI links specified in the device tree.
Examples for this are auxiliary devices such as analog amplifiers
or codecs.

The ASoC core provides a way to probe these components by adding
them to snd_soc_card->aux_dev. We can use the snd_soc_of_parse_aux_devs()
function to parse them from the device tree.

As an example for this, some MSM8916 smartphones have an analog
speaker amplifier connected to the HPHR output. With the new property
this can be modelled as follows:

speaker-amp: audio-amplifier {
compatible = "simple-audio-amplifier";
enable-gpios = <&msmgpio 114 GPIO_ACTIVE_HIGH>;
sound-name-prefix = "Speaker Amp";
};

&sound {
aux-devs = <&speaker_amp>;
audio-routing = "Speaker Amp IN", "HPHR";
};

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200826095141.94017-3-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: dt-bindings: qcom: Document "aux-devs" property
Stephan Gerhold [Wed, 26 Aug 2020 09:51:40 +0000 (11:51 +0200)]
ASoC: dt-bindings: qcom: Document "aux-devs" property

In some cases we need to probe additional audio components that do
not appear as part of the DAI links specified in the device tree.
Examples for this are auxiliary devices such as analog amplifiers
or codecs.

To make them work they need to be added as part of "aux-devs"
and connected to some other audio component using the audio routes
configurable using "(qcom,)audio-routing".

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200826095141.94017-2-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: mt6359: fix failed to parse DT properties
Tzung-Bi Shih [Tue, 8 Sep 2020 07:00:44 +0000 (15:00 +0800)]
ASoC: mt6359: fix failed to parse DT properties

Mt6359 platform device is instantiated by mfd_add_devices().  In the
case, dev->of_node is NULL so that mt6359_parse_dt() always fails to
parse the desired DT properties.

Gets the DT properties via dev->parent->of_node.

Fixes: 8061734ab654 ("ASoC: mediatek: mt6359: add codec driver")
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200908070044.1142644-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO
Dharageswari R [Tue, 8 Sep 2020 09:28:25 +0000 (12:28 +0300)]
ASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO

This patch implements the snd_sof_bytes_ext_volatile_get() to read the
actual parameters from DSP by sending the SOF_IPC_COMP_GET_DATA IPC
for the kcontrol of type SOF_TPLG_KCTL_BYTES_VOLATILE_RO.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200908092825.1813847-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: topology: Add support for WO and RO TLV byte kcontrols
Dharageswari R [Tue, 8 Sep 2020 09:28:24 +0000 (12:28 +0300)]
ASoC: topology: Add support for WO and RO TLV byte kcontrols

This patch adds support for write-only and read-only TLV byte kcontrols
by checking for appropriate get/put IO handlers.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200908092825.1813847-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: ti: Kconfig: Allow the j721e machine driver to be used on K3 platform
Peter Ujfalusi [Tue, 8 Sep 2020 11:32:04 +0000 (14:32 +0300)]
ASoC: ti: Kconfig: Allow the j721e machine driver to be used on K3 platform

The initial machine driver supports only j721e-cpb and the ivi addon, but
other EVMs for different K3 SoC can have similar audio setup which can
be supported by the driver with small or no modification.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200908113204.12012-1-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ASoC: sun8i-codec driver cleanup" from Samuel Holland <samuel@sholland...
Mark Brown [Mon, 7 Sep 2020 14:29:00 +0000 (15:29 +0100)]
Merge series "ASoC: sun8i-codec driver cleanup" from Samuel Holland <samuel@sholland.org>:

Now that the fixes series is merged, here is a series of small cleanups
to the sun8i-codec driver. These help shorten the patch stack for the
next series, which will add support for the other two DAIs in this
codec: AIF2 and AIF3.

Samuel Holland (9):
  ASoC: sun8i-codec: Remove extraneous widgets
  ASoC: sun8i-codec: Fix AIF1 MODCLK widget name
  ASoC: sun8i-codec: Fix AIF1_ADCDAT_CTRL field names
  ASoC: sun8i-codec: Fix AIF1_MXR_SRC field names
  ASoC: sun8i-codec: Fix ADC_DIG_CTRL field name
  ASoC: sun8i-codec: Fix field bit number indentation
  ASoC: sun8i-codec: Sort masks in a consistent order
  ASoC: sun8i-codec: Attach the bus clock to the regmap
  ASoC: sun8i-codec: Manage module clock via DAPM

 sound/soc/sunxi/sun8i-codec.c | 104 ++++++++++++----------------------
 1 file changed, 37 insertions(+), 67 deletions(-)

--
2.26.2

4 years agoMerge series "ASoC: SOF: component UUID support for 5.10" from Kai Vehmanen <kai...
Mark Brown [Mon, 7 Sep 2020 14:28:59 +0000 (15:28 +0100)]
Merge series "ASoC: SOF: component UUID support for 5.10" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:

This series adds support for UUID based component identification
in SOF. UUIDs provide a more scalable alternative to the old
component type based approach to identify which DSP components
should be loaded.

More detailed description of UUID usage in SOF is available in:
https://thesofproject.github.io/latest/developer_guides/uuid/

UUID support is an incremental update to the SOF IPC interface. Driver
remains compatible with pre-UUID (ABI <3.17) firmware versions.

Keyon Jie (16):
  ASoC: SOF: tokens: add token for component UUID
  ASoC: SOF: add comp_ext to struct snd_sof_widget
  ASoC: SOF: topology: create component extended tokens
  ASoC: SOF: topology: parse comp_ext_tokens for all widgets
  ASoC: SOF: use the sof_ipc_comp reserved bytes for extended data
  ASoC: SOF: topology: add helper for setting up IPC component
  ASoC: SOF: append extended data to sof_ipc_comp_dai
  ASoC: SOF: append extended data to sof_ipc_comp_mixer
  ASoC: SOF: append extended data to sof_ipc_comp_volume
  ASoC: SOF: append extended data to sof_ipc_comp_host
  ASoC: SOF: append extended data to sof_ipc_comp_src
  ASoC: SOF: append extended data to sof_ipc_comp_asrc
  ASoC: SOF: append extended data to sof_ipc_comp_tone
  ASoC: SOF: append extended data to sof_ipc_comp_process
  ASoC: SOF: append extended data to sof_ipc_comp_mux
  ASoC: SOF: topology: make process type optional

 include/sound/sof/topology.h    |  12 +-
 include/uapi/sound/sof/tokens.h |   1 +
 sound/soc/sof/sof-audio.c       |  23 +++-
 sound/soc/sof/sof-audio.h       |   3 +
 sound/soc/sof/topology.c        | 208 ++++++++++++++++++++------------
 5 files changed, 161 insertions(+), 86 deletions(-)

--
2.27.0

4 years agoMerge series "ASoC: Add sdw stream operations to dailink ops." from Bard Liao <yung...
Mark Brown [Mon, 7 Sep 2020 14:28:58 +0000 (15:28 +0100)]
Merge series "ASoC: Add sdw stream operations to dailink ops." from Bard Liao <yung-chuan.liao@linux.intel.com>:

Sdw stream operation APIs can be called once per stream. Move these
operations to dailink ops. The linked series is "soundwire: Remove sdw
stream operations from Intel soundwire dai".

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Changes in v3:
 - s/ASOC/ASoC

Pierre-Louis Bossart (3):
  ASoC: soc-dai: clarify return value for get_sdw_stream()
  ASoC: Intel: sof_sdw: add dailink .trigger callback
  ASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback

 include/sound/soc-dai.h          |  3 +-
 sound/soc/intel/boards/sof_sdw.c | 81 ++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 1 deletion(-)

--
2.17.1

4 years agoASoC: Intel: KeemBay: Fix warning potential ! vs ~ typo
Michael Sit Wei Hong [Fri, 4 Sep 2020 02:09:04 +0000 (10:09 +0800)]
ASoC: Intel: KeemBay: Fix warning potential ! vs ~ typo

To set platform in slave mode setting the MASTER_MODE bit is not needed.
Removing !MASTER_MODE conditional to avoid potential errors and warning.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200904020904.19577-1-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: topology: make process type optional
Keyon Jie [Fri, 4 Sep 2020 13:27:44 +0000 (16:27 +0300)]
ASoC: SOF: topology: make process type optional

As components can be now identified with a UUID based mechanism, the
process type is no longer required. For new DSP components, process and
its component type can be set to SOF_PROCESS_NONE and SOF_COMP_NONE.
Allow this combination in topology load, modify the load time check for
process type to reflect this.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Curtis Malainey <curtis@malainey.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-17-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_mux
Keyon Jie [Fri, 4 Sep 2020 13:27:43 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_mux

Append the extended data to the end of the struct sof_ipc_comp_mux,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-16-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_process
Keyon Jie [Fri, 4 Sep 2020 13:27:42 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_process

Append the extended data to the end of the struct sof_ipc_comp_process,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-15-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_tone
Keyon Jie [Fri, 4 Sep 2020 13:27:41 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_tone

Append the extended data to the end of the struct sof_ipc_comp_tone,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-14-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_asrc
Keyon Jie [Fri, 4 Sep 2020 13:27:40 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_asrc

Append the extended data to the end of the struct sof_ipc_comp_asrc,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-13-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_src
Keyon Jie [Fri, 4 Sep 2020 13:27:39 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_src

Append the extended data to the end of the struct sof_ipc_comp_src,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-12-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_host
Keyon Jie [Fri, 4 Sep 2020 13:27:38 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_host

Append the extended data to the end of the struct sof_ipc_comp_host,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-11-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_volume
Keyon Jie [Fri, 4 Sep 2020 13:27:37 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_volume

Append the extended data to the end of the struct sof_ipc_comp_volume,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-10-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_mixer
Keyon Jie [Fri, 4 Sep 2020 13:27:36 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_mixer

Append the extended data to the end of the struct sof_ipc_comp_mixer,
construct the ipc for COMP_NEW during the topology load stage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-9-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: append extended data to sof_ipc_comp_dai
Keyon Jie [Fri, 4 Sep 2020 13:27:35 +0000 (16:27 +0300)]
ASoC: SOF: append extended data to sof_ipc_comp_dai

Append the extended data to the end of the struct sof_ipc_comp_dai, and
update the ext_data_offset, to construct the IPC for the topology load
and runtime restore.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-8-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: topology: add helper for setting up IPC component
Keyon Jie [Fri, 4 Sep 2020 13:27:34 +0000 (16:27 +0300)]
ASoC: SOF: topology: add helper for setting up IPC component

Add helper to allocate buffer for IPC component, configure the basic
settings, and set up the extended data for the subsequent IPC sending.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-7-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: use the sof_ipc_comp reserved bytes for extended data
Keyon Jie [Fri, 4 Sep 2020 13:27:33 +0000 (16:27 +0300)]
ASoC: SOF: use the sof_ipc_comp reserved bytes for extended data

Use the 32bit reserved member of the struct sof_ipc_comp as the extended
data length, this will help to minimize the ABI change for adding new
extended data to the struct sof_ipc_comp, usually only minor ABI version
bump needed for every update with this new solution.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-6-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: topology: parse comp_ext_tokens for all widgets
Keyon Jie [Fri, 4 Sep 2020 13:27:32 +0000 (16:27 +0300)]
ASoC: SOF: topology: parse comp_ext_tokens for all widgets

Parse comp_ext_tokens in the common sof_widget_ready(), and the
swidget->comp_ext will be used to construct the COMP_NEW ipc in the
subsequent commits.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-5-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: topology: create component extended tokens
Keyon Jie [Fri, 4 Sep 2020 13:27:31 +0000 (16:27 +0300)]
ASoC: SOF: topology: create component extended tokens

Add comp_ext_tokens which will be used to parse all extended tokens,
these tokens will be stored it to struct snd_sof_widget.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: add comp_ext to struct snd_sof_widget
Keyon Jie [Fri, 4 Sep 2020 13:27:30 +0000 (16:27 +0300)]
ASoC: SOF: add comp_ext to struct snd_sof_widget

Add member comp_ext to struct snd_sof_widget, which will be used for
topology extended tokens parsing.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: tokens: add token for component UUID
Keyon Jie [Fri, 4 Sep 2020 13:27:29 +0000 (16:27 +0300)]
ASoC: SOF: tokens: add token for component UUID

Add the definition SOF_TKN_COMP_UUID for the component UUID token, this
shall be used for all types of component in the future.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Manage module clock via DAPM
Samuel Holland [Mon, 31 Aug 2020 03:48:52 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Manage module clock via DAPM

By representing the module clock as a DAPM widget, we ensure that the
clock is only enabled when the module is actually in use, without
additional code in runtime PM hooks.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20200831034852.18841-10-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Attach the bus clock to the regmap
Samuel Holland [Mon, 31 Aug 2020 03:48:51 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Attach the bus clock to the regmap

When attached to the regmap, the bus clock is automatically enabled as
needed to access device registers. This avoids needing code to manage it
separately in the driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20200831034852.18841-9-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Sort masks in a consistent order
Samuel Holland [Mon, 31 Aug 2020 03:48:50 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Sort masks in a consistent order

All other definitions are sorted from largest to smallest bit number.
This makes the AIF1CLK_CTRL mask constants consistent with them.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-8-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Fix field bit number indentation
Samuel Holland [Mon, 31 Aug 2020 03:48:49 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Fix field bit number indentation

Several fields have inconsistent indentation, presumably because the
patch "looked correct" due to the additional "+" character at the
beginning of the line.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-7-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Fix ADC_DIG_CTRL field name
Samuel Holland [Mon, 31 Aug 2020 03:48:48 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Fix ADC_DIG_CTRL field name

This is the enable bit for the "AD"C, not the "DA"C.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-6-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Fix AIF1_MXR_SRC field names
Samuel Holland [Mon, 31 Aug 2020 03:48:47 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Fix AIF1_MXR_SRC field names

Even though they are for the left channel mixer, they are documented as
"MXR_SRC". This matches the naming scheme used for the main DAC. The "R"
is part of the abbreviation for "mixer", not a reference to the channel.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-5-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Fix AIF1_ADCDAT_CTRL field names
Samuel Holland [Mon, 31 Aug 2020 03:48:46 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Fix AIF1_ADCDAT_CTRL field names

They are controlling "AD0" (AIF1 slot 0 ADC), not "DA0".

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-4-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Fix AIF1 MODCLK widget name
Samuel Holland [Mon, 31 Aug 2020 03:48:45 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Fix AIF1 MODCLK widget name

The name should reference "AIF1", not "AFI1".

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-3-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sun8i-codec: Remove extraneous widgets
Samuel Holland [Mon, 31 Aug 2020 03:48:44 +0000 (22:48 -0500)]
ASoC: sun8i-codec: Remove extraneous widgets

This driver is for the digital part of the codec only. The analog part,
including the microphone inputs, is managed by a separate driver. These
widgets look like they were copied from sun4i-codec. Since they do not
perform any function in this driver, remove them.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200831034852.18841-2-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback
Pierre-Louis Bossart [Fri, 4 Sep 2020 18:28:54 +0000 (02:28 +0800)]
ASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback

Add .prepare and .hw_free callback to dailink.

The companion patch for this patch is the removal of stream operations
in the .prepare and .hw_free callbacks at the DAI level in
drivers/soundwire/intel.c

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200904182854.3944-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: Intel: sof_sdw: add dailink .trigger callback
Pierre-Louis Bossart [Fri, 4 Sep 2020 18:28:53 +0000 (02:28 +0800)]
ASoC: Intel: sof_sdw: add dailink .trigger callback

Add trigger functionality to dailink, so far only .startup() and
.shutdown() were implemented at the machine driver level.

The companion patch for this patch is the removal of the trigger
callback at the DAI level in drivers/soundwire/intel.c

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200904182854.3944-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: soc-dai: clarify return value for get_sdw_stream()
Pierre-Louis Bossart [Fri, 4 Sep 2020 18:28:52 +0000 (02:28 +0800)]
ASoC: soc-dai: clarify return value for get_sdw_stream()

Previous changes move to use ERR_PTR(-ENOTSUPP), but it's not clear
what implementations can return in case of errors. Explicitly document
that NULL is not a possible return value, only ERR_PTR with a negative
error code is valid.

Fixes: 308811a327c38 ('ASoC: soc-dai: return proper error for get_sdw_stream()')
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reported-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200904182854.3944-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "ASoC: SOF: multi core support for 5.10" from Kai Vehmanen <kai.vehmanen...
Mark Brown [Fri, 4 Sep 2020 09:30:43 +0000 (10:30 +0100)]
Merge series "ASoC: SOF: multi core support for 5.10" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:

This series extends the multi-core support in SOF. Capability
to specify which core to use, on a per component basis, is added
to topology. The topology load functionality in SOF is modified to
power up/down host controlled cores based on the topology
description.

Guennadi Liakhovetski (2):
  ASoC: SOF: add a "core" parameter to widget loading functions
  ASoC: SOF: support topology components on secondary cores

Ranjani Sridharan (1):
  ASoC: SOF: topology: fix core enable sequence

 include/uapi/sound/sof/tokens.h |   1 +
 sound/soc/sof/pm.c              |   1 +
 sound/soc/sof/sof-audio.c       |  25 ++++
 sound/soc/sof/sof-audio.h       |   5 +
 sound/soc/sof/sof-priv.h        |   3 +
 sound/soc/sof/topology.c        | 210 ++++++++++++++++++++++----------
 6 files changed, 184 insertions(+), 61 deletions(-)

--
2.27.0

4 years agoASoC: samsung-i2s: Add missing properties
Krzysztof Kozlowski [Thu, 3 Sep 2020 20:32:48 +0000 (22:32 +0200)]
ASoC: samsung-i2s: Add missing properties

Usage of "unevaluatedProperties: false" is not correct as it suppresses
warnings about all undocumented properties.  Instead, add all missing
properties.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200903203250.19830-2-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: odroid: Add missing properties
Krzysztof Kozlowski [Thu, 3 Sep 2020 20:32:47 +0000 (22:32 +0200)]
ASoC: odroid: Add missing properties

Usage of "unevaluatedProperties: false" is not correct as it suppresses
warnings about all undocumented properties.  Instead, add all missing
properties.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200903203250.19830-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: topology: fix core enable sequence
Ranjani Sridharan [Wed, 2 Sep 2020 14:07:56 +0000 (17:07 +0300)]
ASoC: SOF: topology: fix core enable sequence

Core power up involves 2 steps: The first step tries to
power up the core by setting the ADSPCS.SPA bit for the host-managed
cores. The second step involves sending the IPC to power up other
cores that are not host managed. The enabled_cores_mask should
be updated only when both these steps are successful. If the
IPC to the DSP fails, the host-managed core that was powered in
step 1 should be powered off before returning the error.

Signed-off-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>
Reviewed-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200902140756.1427005-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: support topology components on secondary cores
Guennadi Liakhovetski [Wed, 2 Sep 2020 14:07:55 +0000 (17:07 +0300)]
ASoC: SOF: support topology components on secondary cores

Currently SOF supports running pipelines on secondary DSP cores in a
limited way. This patch represents the next step in SOF multi-core DSP
support, it adds checks for core ID to individual topology components.
It takes care to power up all the requested cores. More advanced DSP
core power management should be added in the future.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200902140756.1427005-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: add a "core" parameter to widget loading functions
Guennadi Liakhovetski [Wed, 2 Sep 2020 14:07:54 +0000 (17:07 +0300)]
ASoC: SOF: add a "core" parameter to widget loading functions

We want to be able to explicitly assign cores to individual pipeline
components. This patch adds a "core" parameter to widget loading
functions to be sent to the DSP for appropriate component scheduling.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200902140756.1427005-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl_sai: Set SAI Channel Mode to Output Mode
Shengjiu Wang [Thu, 3 Sep 2020 05:53:47 +0000 (13:53 +0800)]
ASoC: fsl_sai: Set SAI Channel Mode to Output Mode

Transmit data pins will output zero when slots are masked or channels
are disabled. In CHMOD TDM mode, transmit data pins are tri-stated when
slots are masked or channels are disabled. When data pins are tri-stated,
there is noise on some channels when FS clock value is high and data is
read while fsclk is transitioning from high to low.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1599112427-22038-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: fsl_sai: Support multiple data channel enable bits
Shengjiu Wang [Tue, 1 Sep 2020 11:01:08 +0000 (19:01 +0800)]
ASoC: fsl_sai: Support multiple data channel enable bits

One data channel is one data line. From imx7ulp, the SAI IP is
enhanced to support multiple data channels.

If there is only two channels input and slots is 2, then enable one
data channel is enough for data transfer. So enable the TCE/RCE and
transmit/receive mask register according to the input channels and
slots configuration.

Move the data channel enablement from startup() to hw_params().

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1598958068-10552-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoALSA: ua101: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:21 +0000 (09:32 +0530)]
ALSA: ua101: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-11-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:20 +0000 (09:32 +0530)]
ALSA: usb-audio: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-10-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoASoC: txx9: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:19 +0000 (09:32 +0530)]
ASoC: txx9: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200902040221.354941-9-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoASoC: siu: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:18 +0000 (09:32 +0530)]
ASoC: siu: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200902040221.354941-8-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoASoC: fsl_esai: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:17 +0000 (09:32 +0530)]
ASoC: fsl_esai: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200902040221.354941-7-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hdsp: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:16 +0000 (09:32 +0530)]
ALSA: hdsp: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-6-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: riptide: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:15 +0000 (09:32 +0530)]
ALSA: riptide: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-5-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/asihpi: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:14 +0000 (09:32 +0530)]
ALSA: pci/asihpi: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-4-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: firewire: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:13 +0000 (09:32 +0530)]
ALSA: firewire: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200902040221.354941-3-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: core: convert tasklets to use new tasklet_setup() API
Allen Pais [Wed, 2 Sep 2020 04:02:12 +0000 (09:32 +0530)]
ALSA: core: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-2-allen.lkml@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoASoC: odroid: Use unevaluatedProperties
Krzysztof Kozlowski [Sun, 30 Aug 2020 11:26:33 +0000 (13:26 +0200)]
ASoC: odroid: Use unevaluatedProperties

Additional properties or nodes actually might appear (e.g.
assigned-clocks) so use unevaluatedProperties to fix dtbs_check warnings
like:

  arch/arm/boot/dts/exynos5422-odroidxu3.dt.yaml: sound:
    'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20200830112633.6732-2-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: midas-audio: Correct parsing sound-dai phandles
Krzysztof Kozlowski [Sun, 30 Aug 2020 11:26:32 +0000 (13:26 +0200)]
ASoC: midas-audio: Correct parsing sound-dai phandles

The "sound-dai" property has cells therefore phandle-array should be
used, even if it is just one phandle.  This fixes dtbs_check warnings
like:

  arch/arm/boot/dts/exynos4412-trats2.dt.yaml: sound: cpu:sound-dai:0:1: missing phandle tag in 0
  arch/arm/boot/dts/exynos4412-trats2.dt.yaml: sound: cpu:sound-dai:0: [158, 0] is too long

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20200830112633.6732-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: samsung-i2s: Use unevaluatedProperties
Krzysztof Kozlowski [Sat, 29 Aug 2020 14:24:57 +0000 (16:24 +0200)]
ASoC: samsung-i2s: Use unevaluatedProperties

Additional properties actually might appear (e.g. power-domains) so use
unevaluatedProperties to fix dtbs_check warnings like:

  arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: i2s@11440000:
    Additional properties are not allowed ('power-domains', '#address-cells', 'interrupts', '#size-cells' were unexpected)

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20200829142501.31478-6-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: rt5682: Prefer async probe
Douglas Anderson [Fri, 28 Aug 2020 23:20:27 +0000 (16:20 -0700)]
ASoC: rt5682: Prefer async probe

The probe of rt5682 is pretty slow.  A quick measurement shows that it
takes ~650 ms on at least one board.  There's no reason to block all
other drivers waiting for this probe to finish.  Set the flag to allow
other drivers to probe while we're probing.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200828162005.1.I4f67f494c4f759b0e5c7f487e040dfdcf16e0876@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: tlv320adcx140: Add digital mic channel enable routing
Dan Murphy [Fri, 28 Aug 2020 11:28:55 +0000 (06:28 -0500)]
ASoC: tlv320adcx140: Add digital mic channel enable routing

Add the audio routing map to enable the digital mic paths when the
analog mic paths are not enabled.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200828112855.10112-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: core: remove artificial component and DAI name constraint
Dmitry Baryshkov [Thu, 27 Aug 2020 20:51:00 +0000 (23:51 +0300)]
ASoC: core: remove artificial component and DAI name constraint

Current fmt_single_name code limits maximum name of a DAI or component
to 32 bytes. On some systems corresponding device names might be longer
than that (e.g.
17300000.remoteproc:glink-edge:apr:apr-service@8:routing). This will
result in duplicate DAI/component names. Rewrite fmt_single_name() to
remove such length limitations.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20200827205100.1479331-1-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "SOF fixes and updates for FW boot" from Ranjani Sridharan <ranjani...
Mark Brown [Thu, 27 Aug 2020 13:43:26 +0000 (14:43 +0100)]
Merge series "SOF fixes and updates for FW boot" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:

This series includes fixes and updates for the FW boot sequence for
Intel platforms.

Ranjani Sridharan (7):
  ALSA: hda: fix VS_LTRC register name
  ASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream
  ASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag()
  ASoC: SOF: Intel: hda: define macro for code loader stream format
  ASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX
  ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms
  ASoC: SOF: Intel: hda: Simplify error handling during FW boot

Yong Zhi (1):
  ASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init()

 include/sound/hda_register.h     |   2 +-
 sound/soc/sof/intel/Makefile     |   2 +-
 sound/soc/sof/intel/cnl.c        |  23 +----
 sound/soc/sof/intel/hda-ipc.h    |   4 +
 sound/soc/sof/intel/hda-loader.c | 145 ++++++++++++++++++-------------
 sound/soc/sof/intel/hda-stream.c |  69 +++++++++++++++
 sound/soc/sof/intel/hda.h        |   6 ++
 sound/soc/sof/intel/tgl.c        | 137 +++++++++++++++++++++++++++++
 sound/soc/sof/sof-pci-dev.c      |   2 +-
 9 files changed, 306 insertions(+), 84 deletions(-)
 create mode 100644 sound/soc/sof/intel/tgl.c

--
2.25.1

4 years agoASoC: soc-core: add snd_soc_find_dai_with_mutex()
Kuninori Morimoto [Wed, 26 Aug 2020 23:55:39 +0000 (08:55 +0900)]
ASoC: soc-core: add snd_soc_find_dai_with_mutex()

commit 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
added snd_soc_dai_link_set_capabilities().
But it is using snd_soc_find_dai() (A) which is required client_mutex (B).
And client_mutex is soc-core.c local.

struct snd_soc_dai *snd_soc_find_dai(xxx)
{
...
(B) lockdep_assert_held(&client_mutex);
...
}

void snd_soc_dai_link_set_capabilities(xxx)
{
...
for_each_pcm_streams(direction) {
...
for_each_link_cpus(dai_link, i, cpu) {
(A) dai = snd_soc_find_dai(cpu);
...
}
...
for_each_link_codecs(dai_link, i, codec) {
(A) dai = snd_soc_find_dai(codec);
...
}
}
...
}

Because of these background, we will get WARNING if .config has CONFIG_LOCKDEP.

WARNING: CPU: 2 PID: 53 at sound/soc/soc-core.c:814 snd_soc_find_dai+0xf8/0x100
CPU: 2 PID: 53 Comm: kworker/2:1 Not tainted 5.7.0-rc1+ #328
Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT)
Workqueue: events deferred_probe_work_func
pstate: 60000005 (nZCv daif -PAN -UAO)
pc : snd_soc_find_dai+0xf8/0x100
lr : snd_soc_find_dai+0xf4/0x100
...
Call trace:
 snd_soc_find_dai+0xf8/0x100
 snd_soc_dai_link_set_capabilities+0xa0/0x16c
 graph_dai_link_of_dpcm+0x390/0x3c0
 graph_for_each_link+0x134/0x200
 graph_probe+0x144/0x230
 platform_drv_probe+0x5c/0xb0
 really_probe+0xe4/0x430
 driver_probe_device+0x60/0xf4

snd_soc_find_dai() will be used from (X) CPU/Codec/Platform driver with
mutex lock, and (Y) Card driver without mutex lock.
This snd_soc_dai_link_set_capabilities() is for Card driver,
this means called without mutex.
This patch adds snd_soc_find_dai_with_mutex() to solve it.

Fixes: 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blixvuab.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: max9867: shutdown codec when changing filter type
Pavel Dobias [Thu, 27 Aug 2020 10:25:28 +0000 (12:25 +0200)]
ASoC: max9867: shutdown codec when changing filter type

Changing filter type without disabling codec results in filter
malfunction. Disable codec when changing filter type.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
Link: https://lore.kernel.org/r/20200827102528.29677-1-dobias@2n.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: AMD: Clean kernel log from deferred probe error messages
Akshu Agrawal [Wed, 26 Aug 2020 18:54:20 +0000 (00:24 +0530)]
ASoC: AMD: Clean kernel log from deferred probe error messages

While the driver waits for DAIs to be probed and retries probing,
have the error messages at debug level instead of error.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200826185454.5545-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: Simplify error handling during FW boot
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:32 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: Simplify error handling during FW boot

Modify cl_stream_prepare() to return a pointer to the prepared stream
if successful or ERR_PTR() otherwise. This would simplify the error
paths in hda_dsp_cl_boot_firmware() and hda_dsp_cl_boot_firmware_iccmax()
to perform the stream cleanup after FW boot. This change also renders
the function get_stream_with_tag() redundant.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:31 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms

Separate the dsp ops for TGL ops to specify the use of ICCMAX
FW boot sequence in the run op. All other ops are identical.
Also separate the TGL descriptors into a separate file to make
it easier to follow.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:30 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX

Define the FW boot sequence for platforms that are recommended
to use ICCMAX. This function uses the existing prepare and cleanup
functions for creating a specially crafted capture stream before
powering up the DSP cores.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: define macro for code loader stream format
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:29 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: define macro for code loader stream format

This will be used for the ICCMAX stream as well.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag()
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:28 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag()

Modify the signature of get_stream_with_tag() to add the direction
as an argument to extend it for using with capture streams.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:27 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream

For some platforms, the recommended HW sequence for FW boot involves
starting a specially crafted capture stream before powering
on the DSP cores. Add a helper function to define the minimal
recommended stream programming sequence for this stream.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init()
Yong Zhi [Wed, 26 Aug 2020 18:45:26 +0000 (11:45 -0700)]
ASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init()

cl_dsp_init() doesn't use the fwdata and fwsize parameters.
Remove it, and update caller accordingly.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoALSA: hda: fix VS_LTRC register name
Ranjani Sridharan [Wed, 26 Aug 2020 18:45:25 +0000 (11:45 -0700)]
ALSA: hda: fix VS_LTRC register name

It should be called VS_LTRP instead.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200826184532.1612070-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "SOF fixes and updates" from Ranjani Sridharan <ranjani.sridharan@linux...
Mark Brown [Wed, 26 Aug 2020 12:19:18 +0000 (13:19 +0100)]
Merge series "SOF fixes and updates" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:

This series includes fixes for error reporting, topology parsing and
runtime PM issues along with updates for DMIC support and IMX platforms.

Iulian Olaru (2):
  ASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata
  ASoC: SOF: sof-of-dev: Add .arch_ops field

Jaska Uimonen (1):
  ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics

Keyon Jie (1):
  ASoC: SOF: topology: fix the ipc_size calculation for process
    component

Rander Wang (1):
  ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work

Ranjani Sridharan (2):
  ASoC: SOF: Intel: hda: report error only for the last ROM init
    iteration
  ASoC: SOF: Intel: hda: add extended rom status dump to error log

 sound/soc/sof/imx/Kconfig        |  2 ++
 sound/soc/sof/imx/imx8.c         | 17 +++++++++----
 sound/soc/sof/imx/imx8m.c        | 10 +++++---
 sound/soc/sof/intel/hda-codec.c  |  4 +--
 sound/soc/sof/intel/hda-loader.c | 42 +++++++++++++++++++-------------
 sound/soc/sof/intel/hda.c        | 26 +++++++++++++++++++-
 sound/soc/sof/topology.c         |  4 +--
 7 files changed, 74 insertions(+), 31 deletions(-)

--
2.25.1

4 years agoASoC: SOF: sof-of-dev: Add .arch_ops field
Iulian Olaru [Tue, 25 Aug 2020 23:50:40 +0000 (16:50 -0700)]
ASoC: SOF: sof-of-dev: Add .arch_ops field

Add .arch_ops field in the sof_imx8x_ops structure.
The inclusion of this field will allow the usage of functions from
sof/core.c in order to print debug information such as the registers and
a stack dump in case of a firmware ops.

The SND_SOC_SOF_XTENSA is added in the imx/Kconfig file so the compilation
is successful.

Signed-off-by: Iulian Olaru <iulianolaru249@yahoo.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200825235040.1586478-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata
Iulian Olaru [Tue, 25 Aug 2020 23:50:39 +0000 (16:50 -0700)]
ASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata

The correct way to save private data is to use sdev->pdata->hw_pdata.
Removed superfluous type-casts.

Signed-off-by: Iulian Olaru <iulianolaru249@yahoo.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200825235040.1586478-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: Intel: hda: add extended rom status dump to error log
Ranjani Sridharan [Tue, 25 Aug 2020 23:50:38 +0000 (16:50 -0700)]
ASoC: SOF: Intel: hda: add extended rom status dump to error log

Dump the extended ROM status information to the error logs
to aid with remote support. The analysis of these logs requires
access to non-public technical information.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200825235040.1586478-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: topology: fix the ipc_size calculation for process component
Keyon Jie [Tue, 25 Aug 2020 23:50:37 +0000 (16:50 -0700)]
ASoC: SOF: topology: fix the ipc_size calculation for process component

The topology private struct is used for token parsing and its size
should not be included to the ipc_size, fix it here though it didn't
cause any real issue as the Firmware won't use this wrong-added data.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200825235040.1586478-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: intel: hda: support also devices with 1 and 3 dmics
Jaska Uimonen [Tue, 25 Aug 2020 23:50:36 +0000 (16:50 -0700)]
ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics

Currently the dmic check code supports only devices with 2 or 4 dmics.
With other dmic counts the function will return 0. Lately we've seen
devices with only 1 dmic thus enable also configurations with 1, and
possibly 3, dmics. Add also topology postfix -1ch and -3ch for new dmic
configuration.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200825235040.1586478-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>