summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-23ASoC: dt-bindings: Add missing (unevaluated|additional)Properties on child nodesRob Herring
In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically). Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220823145649.3118479-8-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23ASoC: SOF: ipc4-loader: Verify ext manifest magic numberPeter Ujfalusi
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-23ASoC: SOF: imx: imx8ulp: declare ops structure as staticPierre-Louis Bossart
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-23ASoC: fsl_sai: Update slots number according to bclk_ratioShengjiu Wang
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-23ASoC: SOF: Intel: hda: Correct Firmware State Register useMark Brown
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-23Introduce sof_of_machine_selectMark Brown
Merge series from Chunxu Li <chunxu.li@mediatek.com>: In these patches, we introduce function sof_of_machine_select for SOF
2022-08-23ASoC: SOF: mediatek: Add sof_mt8186_machs for mt8186Chunxu Li
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-23ASoC: SOF: Introduce function sof_of_machine_selectChunxu Li
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-23ASoC: SOF: Intel: hda: Drop no longer used ROM state definitionsPeter Ujfalusi
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-23ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootupPeter Ujfalusi
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-23ASoC: fsl_sai: Add support multi fifo sdma scriptShengjiu Wang
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-23ASoC: SOF: compress: Remove dai_posn variableDaniel Baluta
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: c1a731c71359 ("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-23ASoC: atmel_ssc_dai: Remove the unneeded result variableye xingchen
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-23ASoC: mediatek: mt8186: rename sound card namechunxu.li
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-22ASoC: samsung: Use iio_get_channel_type() accessor.Jonathan Cameron
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-22ASoC: soc-pcm.c: summarize related settings at soc_new_pcm()Kuninori Morimoto
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-19ASoC: mediatek: support SOF for mt8186Mark Brown
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-19ASoC: amd: acp: remove unnecessary NULL checksDan Carpenter
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-19ASoC: Change handling of unimplemented set_bclk_ratioMartin Povišer
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-19ASoC: amd: acp: add a label to make error path more cleanYang Yingliang
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-19ASoC: amd: acp: switch to use dev_err_probe()Yang Yingliang
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-19ASoC: amd: acp: add missing platform_device_unregister() in acp_pci_probe()Yang Yingliang
Add missing platform_device_unregister() in error path in acp_pci_probe(). Fixes: c49f5e74a11e ("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-19ASoC: SOF: imx: Add i.MX8ULP HW supportZhang Peng
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-19dt-bindings: dsp: fsl: Add SOF compatile string for i.MX8ULPShengjiu Wang
Add SOF compatile string "fsl,imx8ulp-dsp" for supporting DSP device on i.MX8ULP platform. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/1660787634-28550-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-da7219-max98357Chunxu Li
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-19ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-rt1019-rt5682sChunxu Li
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-19ASoC: mediatek: mt8186: support DSP downlinkChunxu Li
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-17ASoC: fsl_sai: Remove unnecessary FIFO reset in ISRShengjiu Wang
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: e2681a1bf5ae ("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-17ASoC: cs42l42: Some small code improvementsMark Brown
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: This is a collection of minor improvements to the code or comments.
2022-08-17ASoC: soc-utils-test: Add test for snd_soc_params_to_bclk()Richard Fitzgerald
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-17Enable timestamp support for SOF compress driverMark Brown
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-17ASoC/soundwire: log actual PING status on resume issuesMark Brown
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-17ASoC: cs42l42: Use snd_soc_tdm_params_to_bclk()Richard Fitzgerald
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-17ASoC: cs42l42: Fix comment typo in cs42l42_slow_start_put()Richard Fitzgerald
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-17ASoC: cs42l42: Move cs42l42_supply_names to .c fileRichard Fitzgerald
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-17ASoC: cs42l42: Add include dependencies to cs42l42.hRichard Fitzgerald
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-17ASoC: cs42l42: Don't include kernel.hRichard Fitzgerald
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-17ASoC: codecs: show PING status on resume failuresPierre-Louis Bossart
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-17soundwire: add sdw_show_ping_status() helperPierre-Louis Bossart
This helper provides an optional delay parameter to wait for devices to resync in case of errors, and checks that devices are indeed attached on the bus. 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-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17soundwire: intel/cadence: expose PING status in manager opsPierre-Louis Bossart
Simple indirection to existing register. 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-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17soundwire: add read_ping_status helper definition in manager opsPierre-Louis Bossart
The existing manager ops provide callbacks to transfer read/write commands, but don't allow for direct access to PING status register. This is accessible in all existing IP, and would help diagnose timeouts or resume issues by reporting the 'true' status instead of the internal status reported by the IP. 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-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17ASoC: core: remove setting platform_max in kcontrol macrosSrinivas Kandagatla
platform_max should not be set by the driver, its intended for machine drivers or DT to override the max value for platform specific reasons. So remove setting this from Kcontrol macros. Setting this to max in these macros would limit the range when min value is less then zero. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220816172129.6661-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17ASoC: tlv320adcx140: Add a new kcontrolKevin Lu
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-17ASoC: qcom: qdsp6: q6prm: add new clocksSrinivas Kandagatla
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-17ASoC: Variable type completionXin Gao
'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-17ASoC: codecs: es8326: change es8326_regmap_config to staticYang Yingliang
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-17ASoC: SOF: compress: Add support for computing timestampsLaurentiu Mihalcea
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-17ASoC: SOF: compress: Save channel count and sample bytesLaurentiu Mihalcea
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-17ASoC: SOF: compress: Introduce sof_compr_streamDaniel Baluta
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-17ASoC: SOF: compress: Remove byte offset computationDaniel Baluta
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>