aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-09ASoC: dt-bindings: davinci-mcbsp: Add the 'ti,T1-framing-{rx/tx}' flagsBastien Curutchet1-0/+14
McBSP's data delay can be configured from 0 to 2 bit clock periods. 0 is used for DSP_B format, 1 for DSP_A format. A data delay of 2 bit clock periods can be used to interface to 'T1 framing' devices where data stream is preceded by a 'framing bit'. This 2 bit clock data delay is not described in the bindings. Add two flags 'ti,T1-framing-[rx/tx]' to enable a data delay of 2 bit clock periods in reception or transmission. Signed-off-by: Bastien Curutchet <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Add S24_LE to supported formatsBastien Curutchet1-13/+21
S24_LE is supported by McBSP but not by the driver. Add S24_LE to driver's supported formats. Using it enables the sign extension in DRR (Data Receive Register). The other formats are kept with the zero extension in DRR. Remove data_type table as it is no longer used. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Link free-run mode to SND_SOC_DAIFMT_[GATED/CONT]Bastien Curutchet1-2/+20
McBSP has free-running mode where serial clocks continue to run during emulation halts. This mode is always enabled by the driver. Set free-running mode when SND_SOC_DAIFMT_CONT is selected by DAI format, unset it when SND_SOC_DAIFMT_GATED is selected. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Enable unexpected frame pulses detectionBastien Curutchet1-3/+3
McBSP can generate a SYNCERR when unexpected frame pulses are detected. The driver always disables this feature and ignore the unexpected frame pulses. Enable the generation of SYNCERR by the McBSP. Unexpected frame pulses are not ignored anymore. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Add handling of BP_FC formatBastien Curutchet1-0/+23
McBSP is able to drive bit clock and consume frame clock but BP_FC format is not handled by McBSP driver. Add BP_FC format support. When BP_FC is selected: - CLKX and CLKR are configured as outputs - The sample rate generator is configured to be able to provide bit clock. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Add TDM supportBastien Curutchet1-5/+87
TDM is not supported by the McBSP driver. The McBSP datasheet does not name explicitly TDM as a supported format but it is possible to configure the McBSP to do TDM if all slots are used by McBSP. Add TDM support. It uses single-phase frame. Slot width is used to compute the McBSP's word length. Implement the set_tdm_slot() hook of snd_soc_dai_ops struct. It only supports TDM if all slots are used by McBSP. The snd_soc_dai_driver's channels_max is updated from 2 to 128. This was tested with BP_FC format on a platform designed off of DAVINCI/OMAP_L138. A check is done in davinci_i2s_set_dai_fmt() to prevent TDM to be used with BC_FC and BC_FP formats. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Delete unnecessary assignmentBastien Curutchet1-1/+0
In davinci_i2s_hw_params(), mcbsp_word_length is set twice to asp_word_length[fmt]. Remove second unnecessary assignment. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Use external clock to drive sample rate generatorBastien Curutchet1-16/+49
McBSP's internal sample rate generator can be programed to be driven by its internal clock or by an external clock source located on CLKS pin. The external clock source case is not handled by the driver. Handle an optional clock related to this external clock source. If present, the driver uses the clock located on CLKS pin as input for the sample rate generator. Thus, the external clock rate is used to compute divisors. If this optional clock is not present, the sample rate generator is driven by the McBSP's functional clock. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Replace dev_err with dev_err_probeBastien Curutchet1-1/+1
In probe(), the dev_err() is used for every returned error. Replace dev_err() with dev_err_probe() where -EPROBE_DEFER can be returned. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: ti: davinci-i2s: Remove the unused clk_input_pin attributeBastien Curutchet2-35/+4
The clk_input_pin attribute of davinci_mcbsp_dev struct is not set since commit 257ade78b601 ("ASoC: davinci-i2s: Convert to use edma-pcm"). Remove the attribute. Keep the behaviour of the MCBSP_CLKR case as MCBSP_CLKR == 0. I can't test the BC_FP format so I added back the initial comment that was removed by commit ec6375533748 ("ASoC: DaVinci: Added selection of clk input pin for McBSP"). This was the last dependency to linux/platform_data/davinci_asp.h so it is not included anymore. Remove the enum mcbsp_clk_input_pin from davinci_asp.h as it is not used anywhere else. Signed-off-by: Bastien Curutchet <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: dt-bindings: davinci-mcbsp: Add optional clockBastien Curutchet1-0/+4
The McBSP uses an internal sample rate generator to provide bit clock or frame clock. This sample rate generator can be programmed to be driven by McBSP's internal clock source or by an external clock source (located on CLKS pin). The external clock source is not described in the bindings. Add an optional clock item that allows to select an external clock as sample rate generator's input. Signed-off-by: Bastien Curutchet <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: dt-bindings: davinci-mcbsp: convert McBSP bindings to yaml schemaBastien Curutchet2-50/+95
Convert the binding for McBSP controllers for TI SoCs from txt to YAML schema. Add properties 'clocks', 'clock-names', 'power-domains' and '#sound-dai-cells' which were missing from the txt file. Add '#sound-dai-cells' and 'clocks' in the example which were missing from the txt file. Signed-off-by: Bastien Curutchet <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: codecs: Rockchip on-SoC codecs should depend on ARCH_ROCKCHIPGeert Uytterhoeven1-0/+3
The various Rockchip embedded audio codecs are only present on Rockchip SoCs. Hence add dependencies on ARCH_ROCKCHIP, to prevent asking the user about these drivers when configuring a kernel without Rockchip SoC support. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://msgid.link/r/6cdbaf4afcf4d2059b257f6cb3a8a61bf5e17688.1712676714.git.geert+renesas@glider.be Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: SOF: Intel: lnl: Add fw_regs area to debugfs mapPeter Ujfalusi1-0/+1
Expose the firmware registers via debugfs. it can be of great help while debugging complex issues. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: SOF: Intel: mtl: Add fw_regs area to debugfs mapPeter Ujfalusi1-0/+1
Expose the firmware registers via debugfs. it can be of great help while debugging complex issues. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-09ASoC: SOF: Intel: tgl: Add fw_regs area to debugfs map for IPC4Peter Ujfalusi1-4/+11
Expose the firmware registers via debugfs. it can be of great help while debugging complex issues. The area is only available with IPC4. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-08ASoC: Intel: sof_rt5682: Fix uninitialized variable in probeDan Carpenter1-1/+1
Initialize "is_legacy_cpu" to false to prevent an uninitialized variable bug. Fixes: 8efcd4864652 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-08Add support for QCM6490 and QCS6490Mark Brown2-0/+4
Merge series from Mohammad Rafi Shaik <[email protected]>: This patchset adds support for sound card on Qualcomm QCM6490 IDP and QCS6490 RB3Gen2 boards.
2024-04-08ASoC: dt-bindings: ti,pcm1681: Convert to dtschemaAnimesh Agarwal2-15/+43
Convert the Texas Instruments PCM1681 bindings to DT schema. Make bindings complete by adding #sound-dai-cells. Signed-off-by: Animesh Agarwal <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-08ASoC: qcom: sc8280xp: Add support for QCM6490 and QCS6490Mohammad Rafi Shaik1-0/+2
Add compatibles for sound card on Qualcomm QCM6490 IDP and QCS6490 RB3Gen2 boards. Signed-off-by: Mohammad Rafi Shaik <[email protected]> Reviewed-by: Srinivas Kandagatla <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-08ASoC: dt-bindings: qcom,sm8250: Add QCM6490 snd QCS6490 sound cardMohammad Rafi Shaik1-0/+2
Document the bindings for the Qualcomm QCM6490 IDP and QCS6490 RB3Gen2 board specific sound card. The bindings are the same as for other newer Qualcomm ADSP sound cards, thus keep them in existing qcom,sm8250.yaml file, even though Linux driver is separate. Signed-off-by: Mohammad Rafi Shaik <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Srinivas Kandagatla <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: SOF: Intel: improve and extend HDaudio-basedMark Brown3-4/+38
Merge series from Pierre-Louis Bossart <[email protected]>: For LunarLake, the SoundWire in-band wake detection is reported with the HDAudio WAKE_EN/WAKE_STS registers. In the existing code, these registers are only handled for HDaudio codecs. Now the same registers have to be handled with care as shared resources. The in-band wake detection mainly used for jack detection. Without this patchset, the SoundWire headset codecs signal an event that would be ignored and not reported.
2024-04-05ASoC: Intel: avs: Fixes and cleanups for 6.10Mark Brown412-1914/+3581
Merge series from Cezary Rojewski <[email protected]>: Set of changes targeting the avs-driver only. No new features, patchset either fixes or fortifies existing code. Patchset starts off with a fix for debugbility on ICL+ platforms which I have forgotten to fixup when providing support for these initially. The next two address copier module initialization, most importantly, silence the gcc 'field-spanning write' false-positive. The following four: 6/13 ASoC: Intel: avs: Replace risky functions with safer variants 7/13 ASoC: Intel: avs: Fix potential integer overflow 8/13 ASoC: Intel: avs: Test result of avs_get_module_entry() 9/13 ASoC: Intel: avs: Remove dead code address problems found out by Coverity static analysis tool. The last two worth mentioning are: recommendation from the firmware team to wake subsystem from D0ix when starting any pipeline -and- shielding against invalid period/buffer sizes. Audio format shall be taken into consideration when calculating either of these. Amadeusz Sławiński (2): ASoC: Intel: avs: Restore stream decoupling on prepare ASoC: Intel: avs: Add assert_static to guarantee ABI sizes Cezary Rojewski (11): ASoC: Intel: avs: Fix debug-slot offset calculation ASoC: Intel: avs: Silence false-positive memcpy() warnings ASoC: Intel: avs: Fix config_length for config-less copiers ASoC: Intel: avs: Fix ASRC module initialization ASoC: Intel: avs: Replace risky functions with safer variants ASoC: Intel: avs: Fix potential integer overflow ASoC: Intel: avs: Test result of avs_get_module_entry() ASoC: Intel: avs: Remove dead code ASoC: Intel: avs: Wake from D0ix when starting streaming ASoC: Intel: avs: Init debugfs before booting firmware ASoC: Intel: avs: Rule invalid buffer and period sizes out sound/soc/intel/avs/avs.h | 1 + sound/soc/intel/avs/cldma.c | 2 +- sound/soc/intel/avs/core.c | 4 +-- sound/soc/intel/avs/icl.c | 12 ++++++--- sound/soc/intel/avs/loader.c | 6 +++-- sound/soc/intel/avs/messages.h | 47 ++++++++++++++++++++++++++++++++-- sound/soc/intel/avs/path.c | 13 ++++------ sound/soc/intel/avs/pcm.c | 34 +++++++++++++++++++++++- sound/soc/intel/avs/probes.c | 14 ++++++---- 9 files changed, 109 insertions(+), 24 deletions(-) -- 2.25.1
2024-04-05ASoC: Intel: avs: Rule invalid buffer and period sizes outCezary Rojewski1-0/+28
While HDAudio controller supports buffer packets up to 128 bytes low, audio format shall be taken into consideration when calculating buffer and period sizes to avoid undesired xruns. As *_size in ALSA terms means frames (channels times bit-depth-bytes), hw_rules can calculate minimal buffer and period sizes solely from sample rate and the number of milliseconds commonly used on the AudioDSP firmware side. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Add assert_static to guarantee ABI sizesAmadeusz Sławiński4-0/+49
In order to make sure that IPC interface is stable use assert_static to check union and struct sizes that describe communication interface. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Init debugfs before booting firmwareCezary Rojewski1-2/+2
When bringing up setups it's vital to have access to debug functionality even if firmware boot fails. As order of probe()ing operations is changed, update remove() procedure accordingly. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Wake from D0ix when starting streamingCezary Rojewski1-0/+4
It is recommended to keep the DSP domain in full-power when starting DMA engines. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Remove dead codeCezary Rojewski1-2/+0
The result of list_next_entry()/list_last_entry() is never null. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Test result of avs_get_module_entry()Cezary Rojewski1-5/+9
While PROBE_MOD_UUID is always part of the base AudioDSP firmware manifest, from maintenance point of view it is better to check the result. Fixes: dab8d000e25c ("ASoC: Intel: avs: Add data probing requests") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Fix potential integer overflowCezary Rojewski1-1/+1
While stream_tag for CLDMA on SKL-based platforms is always 1, function hda_cldma_setup() uses AZX_SD_CTL_STRM() macro which does: stream_tag << 20 what combined with stream_tag type of 'unsigned int' generates a potential overflow issue. Update the field type to fix that. Fixes: 45864e49a05a ("ASoC: Intel: avs: Implement CLDMA transfer") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Replace risky functions with safer variantsCezary Rojewski2-3/+3
strscpy() and snprintf() are the recommended equivalents of their riskier friends. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Fix ASRC module initializationCezary Rojewski1-0/+1
The ASRC module configuration consists of several reserved fields. Zero them out when initializing the module to avoid sending invalid data. Fixes: 274d79e51875 ("ASoC: Intel: avs: Configure modules according to their type") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Fix config_length for config-less copiersCezary Rojewski1-5/+3
Copier's config_length shall always be at least one even if there is no configuration payload to carry. While the firmware treats config_length=0 or 1 in the same manner, the driver shall initialize the module properly. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Silence false-positive memcpy() warningsCezary Rojewski2-3/+3
Commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") enforced strict flex array declarations. This generates false-positive in form of: "memcpy: detected field-spanning write". Avoid it by utilizing the DECLARE_FLEX_ARRAY() macro. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Fix debug-slot offset calculationCezary Rojewski1-3/+2
For resources with ID other than 0 the current calculus is incorrect. Fixes: 275b583d047a ("ASoC: Intel: avs: ICL-based platforms support") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-05ASoC: Intel: avs: Restore stream decoupling on prepareAmadeusz Sławiński1-0/+4
Revert changes from commit b87b8f43afd5 ("ASoC: Intel: avs: Drop superfluous stream decoupling") to restore working streaming during S3. Fixes: b87b8f43afd5 ("ASoC: Intel: avs: Drop superfluous stream decoupling") Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: hda-ctrl: only clear WAKESTS for HDaudio codecsPierre-Louis Bossart1-1/+1
When a PME wake happens due to a SoundWire wake, we currently clear all WAKESTS bits during the resume operation initiated by the PCI subsystem. As a result, we are unable to identify which SoundWire links need to be resumed and don't properly handle jack detection. This patch only clears the WAKESTS bits for the HDaudio codecs detected earlier. Note that we still clear all WAKESTS bits unconditionally in hda_dsp_ctrl_stop_chip(). The existing behavior is potentially racy if e.g. a jack event happens during a suspend routine, but there's a risk of breaking shutdown or reboot sequences so the code is left as is for now. Closes: https://github.com/thesofproject/linux/issues/4687 Co-developed-by: Bard Liao <[email protected]> Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Keqiao Zhang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: hda-codec: preserve WAKEEN valuesPierre-Louis Bossart1-3/+12
Since LunarLake, we use the HDadio WAKEEN/WAKESTS to detect wakes for SoundWire codecs. Unfortunately, the existing code in hda_codec_jack_wake_enable() unconditionally resets the WAKEEN bits. This patch changes the initialization to preserve SoundWire WAKEEN bits. For HDAudio codecs the same strategy is used, WAKEEN is only set when the jacktbl.used property is set. Closes: https://github.com/thesofproject/linux/issues/4687 Co-developed-by: Bard Liao <[email protected]> Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Keqiao Zhang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: lnl: add helper to detect SoundWire wakesPierre-Louis Bossart1-0/+18
The global STATESTS register will provide information on all links. Rather than iterate on all possible links, the helpers only filters the range of possible bits for a quick lookup. The process_wakeen() helper will walk through all the links and deal with wakes. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Rander Wang <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clearPierre-Louis Bossart1-0/+7
For some reason, the programming sequences in the SOF driver do not include a clear of the WAKE_STS bits before resetting the controller. This clear is not formally required by the HDaudio specification, but was added to harden the snd-hda-reset back in 2007. Adding this sequence back avoids an issue reported by the Intel CI. Closes: https://github.com/thesofproject/linux/issues/4889 Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: hda-stream: clarify commentPierre-Louis Bossart1-1/+1
The Yoda grammar and multiple negatives are unclear. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfersPierre-Louis Bossart3-3/+49
The HDaudio stream interrupts are ignored unless the stream is PCM or compressed audio. For alternate non-audio usages, such as code loader or SoundWire BPT case, the IOC interrupt on the last buffer transferred is silently ignored. This patch adds a 'struct completion' for each HDaudio stream. This capability helps detect if the non-audio data transfers completed. There is no performance impact for audio streams. In the code loader case, the code currently starts the DMA and directly checks if the firmware status changes, without checking if the DMA succeeded. With a first pass waiting for the DMA to complete, system validation engineers can gather more precise timing information on firmware boot time or root-cause boot failures more accurately. A timeout of 500ms was selected for the code loader DMA. This is an experimental value which should be more than enough - higher values would certainly be problematic from a usage/latency perspective. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: hda-loader: change signature of code loader helpersPierre-Louis Bossart2-27/+34
We need to reuse cl_prepare, cl_trigger and cl_cleanup helpers from a SoundWire context where only the device information is available. Rather than pass the 'sdev' argument, use get_drvdata() to retrieve the required structure. For consistency, rename hda_cl_stream_prepare() as hda_cl_prepare(). These three helpers are also exported so that they can be referenced from another module. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Intel: hda-loader: add flag to tag ICCMAX streamPierre-Louis Bossart2-6/+6
The existing code conflates capture stream and ICCMAX stream. This isn't going to be true any longer when we add support for SDW BPT RX streams. Add a boolean tag to flag ICCMAX streams. No functionality change, only future-proofing change. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: Drop soc-topology ABI v4 supportMark Brown4-522/+18
Merge series from Cezary Rojewski <[email protected]>: This patchset impacts UAPI. The only known users of the soc-topology ABI v4 are Chromebook configurations. Starting from kernel v5.4, all of them are making use of soc-topology ABI v5. The patchset first removes obsolete code from the Intel's skylake-driver - the driver of choice for the mentioned Chromebooks - and then proceeds with removal of relevant soc-topology.c and uapi bits. Cezary Rojewski (4): ASoC: Intel: Skylake: Remove soc-topology ABI v4 support ASoC: topology: Remove ABI v4 support ASoC: topology: Cleanup after ABI v4 support removal ASoC: topology: Remove obsolete ABI v4 structs include/uapi/sound/asoc.h | 56 ------ include/uapi/sound/skl-tplg-interface.h | 74 -------- sound/soc/intel/skylake/skl-topology.c | 169 ----------------- sound/soc/soc-topology.c | 241 ++---------------------- 4 files changed, 18 insertions(+), 522 deletions(-) -- 2.25.1
2024-04-04ASoC: SOF: Clean up sof_ipc_flood_dfs_write()Dan Carpenter1-6/+11
This function doesn't support partial writes so using simple_write_to_buffer() doesn't really make sense. It's better to just use copy_from_user(). Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: SOF: Disable pointless writes to debugfs fileDan Carpenter1-19/+0
The permissions on this debugfs file are 0444 so it can't be written to. And writing to the file hasn't done anything since commit 6e9548cdb30e ("ASoC: SOF: Convert the generic IPC flood test into SOF client"). Delete the write function. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: topology: Remove obsolete ABI v4 structsCezary Rojewski1-56/+0
There are no users of soc-topology ABI v4 since kernel v5.4 and no kernel code makes use of them. Cc: Curtis Malainey <[email protected]> Cc: Łukasz Majczak <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: topology: Cleanup after ABI v4 support removalCezary Rojewski1-37/+10
Flag 'abi_match' along with several other local variables has no purpose with v4 related members removed. Cc: Curtis Malainey <[email protected]> Cc: Łukasz Majczak <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-04-04ASoC: topology: Remove ABI v4 supportCezary Rojewski1-194/+16
There are no users of soc-topology ABI v4 since kernel v5.4 so remove all v4 -> v5 converters. Cc: Curtis Malainey <[email protected]> Cc: Łukasz Majczak <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>