Commit Graph

43464 Commits

Author SHA1 Message Date
Peter Ujfalusi
3b99852f4c
ASoC: SOF: Intel: hda: Skip IMR boot after a firmware crash or boot failure
To make sure that we start from a clean state next time when the DSP is
powered up after a firmware crash or boot failure we must skip the IMR
booting attempt.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220823124359.24865-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:41 +01:00
Peter Ujfalusi
a337c20127
ASoC: SOF: ipc4-loader: Verify ext manifest magic number
Firmware image must start with an extended manifest. Add a check to make
sure that the image does contain it.

The magic number (the first u32 of a firmware image if manifest is present)
for an IPC4 image must be 0x31454124 (ASCI "$AE1").

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220823124219.927-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:38 +01:00
Pierre-Louis Bossart
1332d2078a
ASoC: SOF: imx: imx8ulp: declare ops structure as static
Sparse warning:

sound/soc/sof/imx/imx8ulp.c:416:24: error: symbol 'sof_imx8ulp_ops'
was not declared. Should it be static?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220823154027.762889-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:37 +01:00
Shengjiu Wang
837b40293d
ASoC: fsl_sai: Update slots number according to bclk_ratio
The bclk_ratio is set by .set_bclk_ratio API.
bclk_ratio = slots * slot_width
So if slots is not set by .set_tdm_slot, then it can be calculated
by bclk_ratio.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1659681926-13493-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:36 +01:00
Mark Brown
d4a9fd8292
ASoC: SOF: Intel: hda: Correct Firmware State Register use
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

The FSR (Firmware State Register) holds the ROM state information, it does not
contain error information.
The FSR itself is a bit more complicated as well as the state depends on the
module currently in use.

The error code from ROM or the status code from the firmware is located at the
next register.

Fix the handling of the FSR in order to provide usable and human readable (in
most cases) report on the status and error.

Regards,
Peter
---
Peter Ujfalusi (3):
  ASoC: SOF: Intel: hda: Correct the ROM/FW state reporting code
  ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during
    bootup
  ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions

 sound/soc/sof/intel/hda-loader.c |  10 +--
 sound/soc/sof/intel/hda.c        | 147 ++++++++++++++++++++++++++-----
 sound/soc/sof/intel/hda.h        |  69 +++++++++++++--
 3 files changed, 194 insertions(+), 32 deletions(-)

--
2.37.0
2022-08-23 19:48:41 +01:00
Mark Brown
78f0ecf3c3
Introduce sof_of_machine_select
Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we introduce function sof_of_machine_select for SOF
2022-08-23 19:48:39 +01:00
Chunxu Li
2dec9e09e9
ASoC: SOF: mediatek: Add sof_mt8186_machs for mt8186
Add .of_machines field sof_mt8186_machs for mt8186

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220805070449.6611-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 18:22:43 +01:00
Chunxu Li
6ace85b983
ASoC: SOF: Introduce function sof_of_machine_select
From current design in sof_machine_check and snd_sof_new_platform_drv,
the SOF can only support ACPI type machine.

1. In sof_machine_check if there is no ACPI machine exist, the function
will return -ENODEV directly, that's we don't expected if we do not
base on ACPI machine.

2. In snd_sof_new_platform_drv the component driver need a driver name
to do ignore_machine, currently the driver name is obtained from
machine->drv_name, and the type of machine is snd_soc_acpi_mach.

So we add a new function named sof_of_machine_select that we can pass
sof_machine_check and obtain info required by snd_sof_new_platform_drv.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220805070449.6611-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 18:22:29 +01:00
Peter Ujfalusi
8613753a68
ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions
All code have been switched to use the new FSR defines and macros for
ROM/FW state tracking.
The old definitions can be dropped now.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220712125734.30512-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 14:10:02 +01:00
Peter Ujfalusi
43a03d2470
ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootup
Switch to use the newly added FSR (Firmware State Register) definitions
for DSP state handling and targeting.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220712125734.30512-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 14:10:01 +01:00
Shengjiu Wang
8863057540
ASoC: fsl_sai: Add support multi fifo sdma script
With disabling combine mode, the multiple successive
FIFO registers or non successive FIFO registers of SAI module
can work with the sdma multi fifo script.

This patch is to configure the necessary information to
the SDMA engine driver for support multi fifo script.

'words_per_fifo' is the channels for each dataline
'n_fifos_src' and 'n_fifos_dst' are the fifo number
'stride_fifos_src' and 'stride_fifos_dst' are the stride
between enable FIFOs
'maxburst' is the multiply of datalines

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1661218573-2154-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:53 +01:00
Daniel Baluta
d45f552a1e
ASoC: SOF: compress: Remove dai_posn variable
dai_posn is set but never used. Initial intention was
to use dai_posn to shorthen one code line but it looks fine
without it too.

Fixes: c1a731c713 ("ASoC: SOF: compress: Add support for computing timestamps")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220822174937.254873-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:52 +01:00
ye xingchen
62bd431bac
ASoC: atmel_ssc_dai: Remove the unneeded result variable
Return the value from asoc_ssc_init() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220823075335.209072-1-ye.xingchen@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:51 +01:00
chunxu.li
e8ee449bd7
ASoC: mediatek: mt8186: rename sound card name
The field 'topology_shortname' in 'snd_soc_card' is defined as char[32],
Current card name will be truncated when SOF is enabled, so rename the
sound card name.

Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220823090735.12176-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:50 +01:00
Jonathan Cameron
94f0727483
ASoC: samsung: Use iio_get_channel_type() accessor.
struct iio_chan_spec is meant to be opaque to IIO consumer drivers
which should only use the interfaces in linux/iio/consumer.h.
Use the provided accessor function to find get the type of the
channel instead of directly reading it form the structure.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20220821160914.2207116-1-jic23@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-22 14:07:22 +01:00
Kuninori Morimoto
4d45d944e8
ASoC: soc-pcm.c: summarize related settings at soc_new_pcm()
soc_new_pcm() sets pcm->no_device_suspend, but it sets other pcm->xxx
at the same function with different timing.
pcm->no_device_suspend setup timing has no effect. This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bksdgflq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-22 14:07:21 +01:00
Mark Brown
a59bf85191
ASoC: mediatek: support SOF for mt8186
Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we add SOF support for mt8186 which have HiFi5 DSP
inside.
2022-08-19 23:46:57 +01:00
Dan Carpenter
a74ec0bf5b
ASoC: amd: acp: remove unnecessary NULL checks
The list iterator can never be NULL.  Delete the bogus NULL checks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yv8ePUuBfzaRu6xV@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:20:00 +01:00
Martin Povišer
ceff365a29
ASoC: Change handling of unimplemented set_bclk_ratio
If a 'set_bclk_ratio' call is attempted on a DAI not implementing the
method, make it an -ENOSUPP error instead of -EINVAL. Assume the DAI can
still be okay with the ratio, just does not care to register a handler.

No current in-tree users of snd_soc_dai_set_bclk_ratio seem to inspect
the return value, but -ENOSUPP disables an error print from within the
common soc_dai_ret return filter. With the new behavior a machine
driver can do a blanket 'set_bclk_ratio' on all DAIs on a bus, some of
which may care about the ratio, some of which may not.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220818165336.76403-1-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:59 +01:00
Yang Yingliang
fd8ec75207
ASoC: amd: acp: add a label to make error path more clean
Move platform_device_unregister() to a new label to make code more clean.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:58 +01:00
Yang Yingliang
f89a8c5bb3
ASoC: amd: acp: switch to use dev_err_probe()
Use dev_err_probe() to simplify code and print error code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:57 +01:00
Yang Yingliang
6a4ce20fd7
ASoC: amd: acp: add missing platform_device_unregister() in acp_pci_probe()
Add missing platform_device_unregister() in error path in acp_pci_probe().

Fixes: c49f5e74a1 ("ASoC: amd: acp: Add error handling cases")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:56 +01:00
Zhang Peng
fb5319af6a
ASoC: SOF: imx: Add i.MX8ULP HW support
This adds skeleton support for the audio DSP hardware found on
NXP i.MX8ULP platform.

On i.MX8ULP resources (clocks, power, etc) are managed by the
System Integration Module in LPAV domain and XRDC which is handled
by arm trusted firmware.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/1660787634-28550-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:55 +01:00
Chunxu Li
9398381a39
ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-da7219-max98357
1. Add widgets, routes and dai-links required by SOF

2. Only when adsp phandle could be retrieved from DTS, the SOF related part
of machine driver is executed.

3. Support dai-links could be specified from DTS, so that
we can disable AP side hardware controls when DSP SOF controls the same
audio FE.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220818025113.17144-4-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:52 +01:00
Chunxu Li
4be34e1b70
ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-rt1019-rt5682s
1. Add widgets, routes and dai-links required by SOF

2. Only when adsp phandle could be retrieved from DTS, the SOF related part
of machine driver is executed.

3. Support dai-links could be specified from DTS, so that
we can disable AP side hardware controls when DSP SOF controls the same
audio FE.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220818025113.17144-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:51 +01:00
Chunxu Li
3c15abbed0
ASoC: mediatek: mt8186: support DSP downlink
1. add DSP downlink link widget
2. add DSP to I2S route path

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220818025113.17144-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:50 +01:00
Shengjiu Wang
cb225ac125
ASoC: fsl_sai: Remove unnecessary FIFO reset in ISR
The FIFO reset drops the words in the FIFO, which may cause
channel swap when SAI module is running, especially when the
DMA speed is low. So it is not good to do FIFO reset in ISR,
then remove the operation.

Fixes: e2681a1bf5 ("ASoC: fsl_sai: Add isr to deal with error flag")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1660713867-26921-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 18:05:52 +01:00
Mark Brown
e6f4bddefd
ASoC: cs42l42: Some small code improvements
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

This is a collection of minor improvements to the code or comments.
2022-08-17 18:05:13 +01:00
Richard Fitzgerald
e32e23a2b5
ASoC: soc-utils-test: Add test for snd_soc_params_to_bclk()
snd_soc_params_to_bclk() calculates the BCLK from only the information in
snd_pcm_hw_params. It is therefore a subset of the functionality of
snd_soc_tdm_params_to_bclk() so can use a subset of the test case table.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220817125508.1406651-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 15:19:14 +01:00
Mark Brown
aa16a3dc67
Enable timestamp support for SOF compress driver
Merge series from Daniel Baluta <daniel.baluta@oss.nxp.com>:

This patchseries computes pcm_io_frames from the DAI position reported
by SOF firmware.  Using pcm_io_frames userspace applications can later
compute timestamps for compressed stream.
2022-08-17 15:18:49 +01:00
Mark Brown
1decead8d7
ASoC/soundwire: log actual PING status on resume issues
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

we've been stuck with problems in the dual-amplifier configurations where
one of the two devices seems to become UNATTACHED and never regains sync,
see https://github.com/thesofproject/linux/issues/3638.

This is a rather infrequent issue that may happen once or twice per month,
but still it remains a concern.

One possibility is that the device does lose sync but somehow our hardware
detection fails to see it resync.

This series just adds a basic read directly from the PING frames to help
confirm if yes/no the device regain sync.
2022-08-17 15:18:47 +01:00
Richard Fitzgerald
c2683ecfd1
ASoC: cs42l42: Use snd_soc_tdm_params_to_bclk()
Use the new snd_soc_tdm_params_to_bclk() helper function to
calculate the bclk. This function handles most of the previous
manipulation and makes the code tidier.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220817122347.1356773-6-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:58:50 +01:00
Richard Fitzgerald
db568aab37
ASoC: cs42l42: Fix comment typo in cs42l42_slow_start_put()
Fix "much change together" to "must change together".

It's probably obvious what was meant but it's nice to fix it.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220817122347.1356773-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:58:49 +01:00
Richard Fitzgerald
dbd231732c
ASoC: cs42l42: Move cs42l42_supply_names to .c file
The array of supply name strings doesn't need to be in the header file.
Move it to the .c file.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220817122347.1356773-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:58:48 +01:00
Richard Fitzgerald
b48d1da00f
ASoC: cs42l42: Add include dependencies to cs42l42.h
Make cs42l42.h include the other headers it depends on instead of
assuming that the .c file already included them.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220817122347.1356773-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:58:47 +01:00
Richard Fitzgerald
8ccaa7eb76
ASoC: cs42l42: Don't include kernel.h
kernel.h includes a lot of other headers that we don't need.
Replace with an include of types.h.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220817122347.1356773-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:58:46 +01:00
Pierre-Louis Bossart
917df025e1
ASoC: codecs: show PING status on resume failures
This helper should help identify cases where devices fall off the bus
and don't resync.

BugLink: https://github.com/thesofproject/linux/issues/3638
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20220714011043.46059-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:55 +01:00
Kevin Lu
4e82971f7b
ASoC: tlv320adcx140: Add a new kcontrol
Add a new kcontrol for phase calib

Signed-off-by: Kevin Lu <luminlong@139.com>
Link: https://lore.kernel.org/r/20220815112715.21617-1-luminlong@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:29 +01:00
Srinivas Kandagatla
ea15d3bd3c
ASoC: qcom: qdsp6: q6prm: add new clocks
Add support to new clocks that are added in Q6DSP as part of newer version
of LPASS support on SM8450 and SC8280XP.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220816170118.13470-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:28 +01:00
Xin Gao
43a70fb51b
ASoC: Variable type completion
'unsigned int' is better than 'unsigned'.

Signed-off-by: Xin Gao <gaoxin@cdjrlc.com>
Link: https://lore.kernel.org/r/20220816175105.8084-1-gaoxin@cdjrlc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:27 +01:00
Yang Yingliang
5c69f11ce8
ASoC: codecs: es8326: change es8326_regmap_config to static
es8326_regmap_config is only used in es8326.c now, change it to static.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220817091519.2487385-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:26 +01:00
Laurentiu Mihalcea
c1a731c713
ASoC: SOF: compress: Add support for computing timestamps
We compute the number of pcm_io_frames by dividing the
dai position to size of a frame (channels * sample size).

Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220817080529.10864-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:24 +01:00
Laurentiu Mihalcea
3ccbe68877
ASoC: SOF: compress: Save channel count and sample bytes
The purpose of this change is to enable the saving of the
channel count and sample container bytes format parameters for later use
to compute the timestamps.

This is done when setting the compress stream parameters
(in sof_compr_set_params).

Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220817080529.10864-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:23 +01:00
Daniel Baluta
e3091f0a3f
ASoC: SOF: compress: Introduce sof_compr_stream
This will keep SOF compress stream private data. So far
we used snd_compr_tstamp to hold the private data but this
is no longer enough as we need to hold other info like
number of channels or sample bytes.

Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220817080529.10864-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:22 +01:00
Daniel Baluta
bab10ec9fd
ASoC: SOF: compress: Remove byte offset computation
Byte offset is the offset in the ring buffer to the DSP
while posn_offset is an offset inside the stream_box where
we keep position information.

Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220817080529.10864-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17 13:00:21 +01:00
Mark Brown
6256547352
ASoC: Intel: HSW and BDW updates
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Sharing this PR as it touches on cross-driver subjects. Four commits yet
two subject. Given the small delta, decided to combine within single PR
here.
2022-08-16 17:33:11 +01:00
Kai Vehmanen
63d375b9f2
ASoC: SOF: Intel: pci-tgl: use RPL specific firmware definitions
Split out firmware definitions for Intel Raptor Lake platforms.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Suggested-by: Gopal Vamshi Krishna <vamshi.krishna.gopal@intel.com>
Link: https://lore.kernel.org/r/20220816130510.190427-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16 14:48:23 +01:00
Kai Vehmanen
5f3db54cfb
ASoC: Intel: common: add ACPI matching tables for Raptor Lake
Initial support for RPL w/ RT711

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Gopal Vamshi Krishna <vamshi.krishna.gopal@intel.com>
Link: https://lore.kernel.org/r/20220816130510.190427-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16 14:48:22 +01:00
Mark Brown
2d7ea7635a
Add support for linked list to store acp_stream and tdm support.
Merge series from Venkata Prasad Potturu <venkataprasad.potturu@amd.com>:

This patch is to add support for linked list to store acp_stream instead
static array and add tdm support for acp I2S stream.
2022-08-16 14:47:35 +01:00
Pieterjan Camerlynck
3b43a713f6
ASoC: fsl_sai: fix incorrect mclk number in error message
In commit c3ecef21c3 ("ASoC: fsl_sai: add sai master mode support")
the loop was changed to start iterating from 1 instead of 0. The error
message however was not updated, reporting the wrong clock to the user.

Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220813083353.8959-1-pieterjan.camerlynck@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16 13:08:07 +01:00