summaryrefslogtreecommitdiff
path: root/sound/soc/fsl
AgeCommit message (Collapse)Author
2025-05-16ASoC: fsl_xcvr: update platform driver nameShengjiu Wang
XCVR driver is not only used for i.MX8MP platform, so update driver name to make it more generic. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250516080334.3272878-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: fsl_rpmsg: Allocate a smaller buffer size for capture streamChancel Liu
If both playback and capture streams have large buffer size in low power audio case, the total size will exceed the maximum buffer size for this sound card. Capture stream doesn't need so large buffer size in fact. So calculate a reasonable smaller buffer size and allocate it for capture stream. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20250421105701.2273588-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: fsl_rpmsg: Configure CPU DAI for card that sits on rpmsg-micfil-channelChancel Liu
Sound card that sits on rpmsg-micfil-channel has different settings on CPU DAI. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20250421105701.2273588-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-25ASoC: fsl: don't set link->platform if not neededKuninori Morimoto
imx_card_parse_of() allocs 2 components for CPU/Platform (A) static int imx_card_parse_of(...) { ... for_each_child_of_node(...) { dlc = devm_kzalloc(...); ... link->cpus = &dlc[0]; (A) link->platforms = &dlc[1]; } ... } The link might be used as DPCM backend, in such case, link->plaforms will be not used. The driver overwrite it as Dummy DAI (B). } else if (!strncmp(link->name, "HiFi-ASRC-BE", 12)) { /* DPCM backend */ link->no_pcm = 1; link->platforms->of_node = NULL; (B) link->platforms->name = "snd-soc-dummy"; } If it was not used for generic DMAEngine, we can just remove it. By this patch, created dlc (A) will be just wasted, but it won't leak. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87cydfr1z6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-24ASoC: Merge up fixesMark Brown
They have build/application dependencies for some new changes coming in.
2025-04-16ASoC: fsl_rpmsg: Remove useless return variableChen Ni
Remove unnecessary return variable and compress the return logic. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250416041431.546370-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()Chenyuan Yang
Incorrect types are used as sizeof() arguments in devm_kcalloc(). It should be sizeof(dai_link_data) for link_data instead of sizeof(snd_soc_dai_link). This is found by our static analysis tool. Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com> Link: https://patch.msgid.link/20250406210854.149316-1-chenyuan0y@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-10ASoC: fsl: fsl_qmc_audio: Reset audio data pointers on TRIGGER_START eventHerve Codina
On SNDRV_PCM_TRIGGER_START event, audio data pointers are not reset. This leads to wrong data buffer usage when multiple TRIGGER_START are received and ends to incorrect buffer usage between the user-space and the driver. Indeed, the driver can read data that are not already set by the user-space or the user-space and the driver are writing and reading the same area. Fix that resetting data pointers on each SNDRV_PCM_TRIGGER_START events. Fixes: 075c7125b11c ("ASoC: fsl: Add support for QMC audio") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20250410091643.535627-1-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06ASoC: fsl_sai: separate set_tdm_slot() for tx and rxShengjiu Wang
The transmitter and receiver of SAI can be used for different slot number and slot width configuration, so refine fsl_sai_set_dai_tdm_slot(), add fsl_sai_set_dai_tdm_slot_tx() for tx and fsl_sai_set_dai_tdm_slot_rx() for rx. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250328085744.1893434-5-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06ASoC: fsl_sai: separate 'is_dsp_mode' for tx and rxShengjiu Wang
The transmitter and receiver of SAI can be used for different dsp modes, then 'is_dsp_mode' needs to be separated. Expand 'is_dsp_mode' to array 'is_dsp_mode[]' to support different configuration of tx and rx. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250328085744.1893434-4-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06ASoC: fsl_sai: add xlate_tdm_slot_mask() callbackShengjiu Wang
With DPCM case, for example ASRC->SAI->AMIX, the SAI can be codec dai device in backend, but __soc_pcm_hw_params() will get the tdm_mask for channel constraint, tdm_mask is set by snd_soc_dai_set_tdm_slot() from slot number, but SAI supports flexible channel number with fixed slot number, so add an empty xlate_tdm_slot_mask() callback to avoid the channel constraint in __soc_pcm_hw_params(). Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250328085744.1893434-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06ASoC: fsl_sai: allow to set mclk rate with zero clk_idShengjiu Wang
If clk_id is zero, it means FSL_SAI_CLK_BUS in fsl_sai_set_dai_sysclk(), as the clk[FSL_SAI_CLK_BUS]'s rate can't be changed, there is no rate changed for mclk. But with audio-graph-card, the clk_id is always zero, in order to allow to set mclk rate with zero clk_id, update the condition to be if clk_id is zero, then set the FSL_SAI_CLK_MAST1's rate. This would not change the original function for master mode. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250328085744.1893434-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-06ASoC: fsl_asrc_dma: get codec or cpu dai from backendShengjiu Wang
With audio graph card, original cpu dai is changed to codec device in backend, so if cpu dai is dummy device in backend, get the codec dai device, which is the real hardware device connected. The specific case is ASRC->SAI->AMIX->CODEC. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250319033504.2898605-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-05treewide: Switch/rename to timer_delete[_sync]()Thomas Gleixner
timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree over and remove the historical wrapper inlines. Conversion was done with coccinelle plus manual fixups where necessary. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-04-04Merge tag 'sound-fix-6.15-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of device-specific fixes that have been gathered since the previous pull: - A few more HD-audio quirks and fixups - A series of Qualcomm AudioReach fixes - Various small fixes for ASoC rt5665, WSA, SOF and Cirrus" * tag 'sound-fix-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Fix built-in mic on another ASUS VivoBook model ALSA: hda/realtek - Support mute led function for HP platform ASoC: imx-card: Add NULL check in imx_card_probe() ASoC: codecs: rt5665: Fix some error handling paths in rt5665_probe() ASoC: q6apm-dai: make use of q6apm_get_hw_pointer ASoC: qdsp6: q6apm-dai: fix capture pipeline overruns. ASoC: qdsp6: q6apm-dai: set 10 ms period and buffer alignment. ASoC: q6apm: add q6apm_get_hw_pointer helper ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs ASoC: SOF: hda/ptl: Move mic privacy change notification sending to a work ALSA/hda: intel-sdw-acpi: Remove (explicitly) unused header ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx ALSA: hda/tas2781: Upgrade calibratd-data writing code to support Alpha and Beta dsp firmware ASoC: qdsp6: q6asm-dai: fix q6asm_dai_compr_set_params error path ALSA: hda/realtek: Fix built-in mic breakage on ASUS VivoBook X515JA ASoC: sma1307: Fix error handling in sma1307_setting_loaded() ASoC: codecs: wsa884x: Correct VI sense channel mask ASoC: codecs: wsa883x: Correct VI sense channel mask firmware: cs_dsp: Ensure cs_dsp_load[_coeff]() returns 0 on success
2025-04-01ASoC: imx-card: Add NULL check in imx_card_probe()Henry Martin
devm_kasprintf() returns NULL when memory allocation fails. Currently, imx_card_probe() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250401142510.29900-1-bsdhenrymartin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-26Merge tag 'sound-6.15-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "We've received lots of commits at this time, as a result of various cleanup and refactoring works as well as a few new drivers and the generic SoundWire support. Most of changes are device-specific, little about the core changes. Some highlights below: Core: - A couple of (rather minor) race fixes in ALSA sequencer code - A regression fix in ALSA timer code that may lead to a deadlock ASoC: - A large series of code conversion to use modern terminology for the clocking configuration - Conversions of PM ops with the modern macros in all ASoC drivers - Clarification of the control operations - Prepartory work for more generic SoundWire SCDA controls - Support for AMD ACP 7.x, AWINC WM88166, Everest ES8388, Intel AVS PEAKVOL and GAIN DSP modules Mediatek MT8188 DMIC, NXP i.MX95, nVidia Tegra interconnects, Rockchip RK3588 S/PDIF, Texas Instruments SN012776 and TAS5770L, and Wolfson WM8904 DMICs Others: - Conversions of PM ops with the modern macros in the rest drivers - USB-audio quirks and fixes for Presonus Studio, DJM-A9, CME - HD-audio quirks and fixes ASUS, HP, Lenovo, and others" * tag 'sound-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (651 commits) ALSA: hda: tas2781-i2c: Remove unnecessary NULL check before release_firmware() ALSA: hda: cs35l56: Remove unnecessary NULL check before release_firmware() ALSA: hda/realtek: Bass speaker fixup for ASUS UM5606KA ALSA: hda/realtek: Fix built-in mic assignment on ASUS VivoBook X515UA ALSA: hda/realtek: Add support for various HP Laptops using CS35L41 HDA ALSA: timer: Don't take register_mutex with copy_from/to_user() ASoC: SDCA: Correct handling of selected mode DisCo property ASoC: amd: yc: update quirk data for new Lenovo model ALSA: hda/realtek: fix micmute LEDs on HP Laptops with ALC3247 ALSA: hda/realtek: fix micmute LEDs on HP Laptops with ALC3315 ASoC: SOF: mediatek: Commonize duplicated functions ASoC: dmic: Fix NULL pointer dereference ASoC: wm8904: add DMIC support ASoC: wm8904: get platform data from DT ASoC: dt-bindings: wm8904: Add DMIC, GPIO, MIC and EQ support ASoC: wm8904: Don't touch GPIO configs set to 0xFFFF of: Add of_property_read_u16_index ALSA: oxygen: Fix dependency on CONFIG_PM_SLEEP ASoC: ops: Apply platform_max after deciding control type ASoC: ops: Remove some unnecessary local variables ...
2025-03-25Merge tag 'timers-cleanups-2025-03-23' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer cleanups from Thomas Gleixner: "A treewide hrtimer timer cleanup hrtimers are initialized with hrtimer_init() and a subsequent store to the callback pointer. This turned out to be suboptimal for the upcoming Rust integration and is obviously a silly implementation to begin with. This cleanup replaces the hrtimer_init(T); T->function = cb; sequence with hrtimer_setup(T, cb); The conversion was done with Coccinelle and a few manual fixups. Once the conversion has completely landed in mainline, hrtimer_init() will be removed and the hrtimer::function becomes a private member" * tag 'timers-cleanups-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits) wifi: rt2x00: Switch to use hrtimer_update_function() io_uring: Use helper function hrtimer_update_function() serial: xilinx_uartps: Use helper function hrtimer_update_function() ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup() RDMA: Switch to use hrtimer_setup() virtio: mem: Switch to use hrtimer_setup() drm/vmwgfx: Switch to use hrtimer_setup() drm/xe/oa: Switch to use hrtimer_setup() drm/vkms: Switch to use hrtimer_setup() drm/msm: Switch to use hrtimer_setup() drm/i915/request: Switch to use hrtimer_setup() drm/i915/uncore: Switch to use hrtimer_setup() drm/i915/pmu: Switch to use hrtimer_setup() drm/i915/perf: Switch to use hrtimer_setup() drm/i915/gvt: Switch to use hrtimer_setup() drm/i915/huc: Switch to use hrtimer_setup() drm/amdgpu: Switch to use hrtimer_setup() stm class: heartbeat: Switch to use hrtimer_setup() i2c: Switch to use hrtimer_setup() iio: Switch to use hrtimer_setup() ...
2025-03-17ASoC: fsl: Convert to RUNTIME_PM_OPS() and coTakashi Iwai
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr() This optimizes slightly when CONFIG_PM is disabled, too. Cc: Shengjiu Wang <shengjiu.wang@gmail.com> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-60-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-05ASoC: Merge up fixesMark Brown
Merge branch 'for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-6.15 to avoid a bunch of add/add conflicts.
2025-03-04ASoC: fsl_audmix: support audio graph card for audmixMark Brown
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: Change 'dais' property to be optional, that fsl_audmix device can be linked with SAI device by audio graph card.
2025-03-03ASoC: fsl_audmix: register card device depends on 'dais' propertyShengjiu Wang
In order to make the audmix device linked by audio graph card, make 'dais' property to be optional. If 'dais' property exists, then register the imx-audmix card driver. otherwise, it should be linked by audio graph card. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250226100508.2352568-5-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: fsl: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/871pvlh4qs.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: imx-card: support playback or capture onlyMark Brown
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: Be similar to audio graph card, support playback or capture only for imx-audio-card. imx-card can't directly refer to audio-graph-port.yaml, because it is not based on 'ports'. Add playback-only and capture-only property directly
2025-02-24ASoC: fsl: Rename stream name of SAI DAI driverChancel Liu
If stream names of DAI driver are duplicated there'll be warnings when machine driver tries to add widgets on a route: [ 8.831335] fsl-asoc-card sound-wm8960: ASoC: sink widget CPU-Playback overwritten [ 8.839917] fsl-asoc-card sound-wm8960: ASoC: source widget CPU-Capture overwritten Use different stream names to avoid such warnings. DAI names in AUDMIX are also updated accordingly. Fixes: 15c958390460 ("ASoC: fsl_sai: Add separate DAI for transmitter and receiver") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://patch.msgid.link/20250217010437.258621-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24ASoC: imx-card: Add playback_only or capture_only supportShengjiu Wang
With the DPCM case, the backend only support capture or playback, then the linked frontend can only support capture or playback, but frontend can't automatically enable only capture or playback, it needs the input from dt-binding. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://patch.msgid.link/20250217021715.284951-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24ASoC: fsl: fsl_qmc_audio: Remove unnecessary bool conversionsThorsten Blum
Remove unnecessary bool conversions and simplify the code. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20250223202741.1916-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-18ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup()Nam Cao
hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Patch was created by using Coccinelle. Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://lore.kernel.org/all/ed4be9ec380a688291e3fc9b24f8c38a3f07a143.1738746904.git.namcao@linutronix.de
2025-02-13ASoC: imx-audmix: remove cpu_mclk which is from cpu dai deviceShengjiu Wang
When defer probe happens, there may be below error: platform 59820000.sai: Resources present before probing The cpu_mclk clock is from the cpu dai device, if it is not released, then the cpu dai device probe will fail for the second time. The cpu_mclk is used to get rate for rate constraint, rate constraint may be specific for each platform, which is not necessary for machine driver, so remove it. Fixes: b86ef5367761 ("ASoC: fsl: Add Audio Mixer machine driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250213070518.547375-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-11ASoC: fsl_micfil: Add decimation filter bypass mode supportShengjiu Wang
When decimation filter bypass mode is enabled, PDM data can be written into FIFO directly without any processing. The interface of this mode is DSD big endian format, when user needs this format, then this mode is enabled. This mode is only for the i.MX943 platform currently. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250206030306.2618620-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-03ASoC: fsl_micfil: Enable default case in micfil_set_quality()Nikita Zhandarovich
If 'micfil->quality' received from micfil_quality_set() somehow ends up with an unpredictable value, switch() operator will fail to initialize local variable qsel before regmap_update_bits() tries to utilize it. While it is unlikely, play it safe and enable a default case that returns -EINVAL error. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: bea1d61d5892 ("ASoC: fsl_micfil: rework quality setting") Cc: stable@vger.kernel.org Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru> Link: https://patch.msgid.link/20250116142436.22389-1-n.zhandarovich@fintech.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-22ASoC: fsl_asrc_m2m: select CONFIG_DMA_SHARED_BUFFERArnd Bergmann
Randconfig builds without dmabuf result in this link error from the fasl-asrc driver: ERROR: modpost: "dma_buf_put" [sound/core/snd-compress.ko] undefined! ERROR: modpost: "dma_buf_export" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined! Add the missing 'select' statement. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250122065330.1423248-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-20ASoC: fsl_asrc_m2m: return error value in asrc_m2m_device_run()Shengjiu Wang
The asrc_m2m_device_run() function is the main process function of converting, the error need to be returned to user, that user can handle error case properly. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250120081938.2501554-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-20ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspendShengjiu Wang
ASRC memory to memory cases and memory to peripheral cases are sharing the same pair pools, the pairs got for m2m suspend function may be used for memory to peripheral, which is handled memory to peripheral driver and can't be handled in memory to memory suspend function. Use the "pair->dma_buffer" as a flag for memory to memory case, when it is allocated, handle the suspend operation for the related pairs. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250120081938.2501554-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-14ASoC: fsl_micfil: Add i.MX943 platform supportShengjiu Wang
On i.MX943, the FIFO data address is changed to 0x20~0x3c, compared to previous version, there is a minus 4 offset, so add a new regmap configuration for it. And the bit width of CICOSR is changed to 5 bits, from bit 16th to 20th in REG_MICFIL_CTRL2 register, so update its definition header file. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20250114102720.3664667-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-13ASoC: fsl_mqs: Add i.MX943 platform supportShengjiu Wang
There are two MQS instances on the i.MX943 platform. The definition of bit positions in the control register are different. In order to support these MQS modules, define two compatible strings to distinguish them. On i.MX943 one instance is in Always-on mix, another is in Wakeup-mix. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250113090321.3193464-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-09ASoC: Use of_property_present() for non-boolean propertiesRob Herring (Arm)
The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20250109182303.3973082-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-01-08ASoC: Merge up v6.13-rc6Mark Brown
This helps several of my boards in CI.
2024-12-18ASoC: fsl_asrc_m2m: force cast for snd_pcm_format_t typeShengjiu Wang
Fix sparse warnings: fsl_asrc_m2m.c:360:45: sparse: warning: incorrect type in argument 1 (different base types) fsl_asrc_m2m.c:360:45: sparse: expected restricted snd_pcm_format_t [usertype] pcm_forma fsl_asrc_m2m.c:360:45: sparse: got unsigned int [usertype] format fsl_asrc_m2m.c:361:41: sparse: warning: incorrect type in assignment (different base types) fsl_asrc_m2m.c:361:41: sparse: expected restricted snd_pcm_format_t fsl_asrc_m2m.c:361:41: sparse: got unsigned int [usertype] format fsl_asrc_m2m.c:365:45: sparse: warning: incorrect type in argument 1 (different base types) fsl_asrc_m2m.c:365:45: sparse: expected restricted snd_pcm_format_t [usertype] pcm_forma fsl_asrc_m2m.c:365:45: sparse: got unsigned int [usertype] pcm_format fsl_asrc_m2m.c:366:42: sparse: warning: incorrect type in assignment (different base types) fsl_asrc_m2m.c:366:42: sparse: expected restricted snd_pcm_format_t fsl_asrc_m2m.c:366:42: sparse: got unsigned int [usertype] pcm_format fsl_asrc_m2m.c:595:54: sparse: warning: incorrect type in assignment (different base types) fsl_asrc_m2m.c:595:54: sparse: expected unsigned int [usertype] formats fsl_asrc_m2m.c:595:54: sparse: got restricted snd_pcm_format_t [assigned] [usertype] k Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412180043.PAA4t4sQ-lkp@intel.com/ Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20241218024358.3022635-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-16Merge tag 'soc-fixes-6.13' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC fixes from Arnd Bergmann: "Three small fixes for the soc tree: - devicetee fix for the Arm Juno reference machine, to allow more interesting PCI configurations - build fix for SCMI firmware on the NXP i.MX platform - fix for a race condition in Arm FF-A firmware" * tag 'soc-fixes-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: dts: fvp: Update PCIe bus-range property firmware: arm_ffa: Fix the race around setting ffa_dev->properties firmware: arm_scmi: Fix i.MX build dependency
2024-12-13ASoC: fsl: add memory to memory function for ASRCMark Brown
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: This function is base on the accelerator implementation for compress API: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode") Audio signal processing also has the requirement for memory to memory similar as Video. This asrc memory to memory (memory ->asrc->memory) case is a non real time use case. User fills the input buffer to the asrc module, after conversion, then asrc sends back the output buffer to user. So it is not a traditional ALSA playback and capture case. Because we had implemented the "memory -> asrc ->i2s device-> codec" use case in ALSA. Now the "memory->asrc->memory" needs to reuse the code in asrc driver, so the patch 1 and patch 2 is for refining the code to make it can be shared by the "memory->asrc->memory" driver. Other change is to add memory to memory support for two kinds of i.MX ASRC modules.
2024-12-13ASoC: fsl_easrc: register m2m platform deviceShengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-7-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-13ASoC: fsl_asrc: register m2m platform deviceShengjiu Wang
Register m2m platform device, that user can use M2M feature. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-6-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-13ASoC: fsl_asrc_m2m: Add memory to memory functionShengjiu Wang
Implement the ASRC memory to memory function using the compress framework, user can use this function with compress ioctl interface. This feature can be shared by ASRC and EASRC drivers Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-5-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-13ASoC: fsl_easrc: define functions for memory to memory usageShengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-4-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-13ASoC: fsl_asrc: define functions for memory to memory usageShengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_prepare: prepare for the start step m2m_start: the start step m2m_unprepare: unprepare for stop step, optional m2m_stop: stop step m2m_check_format: check format is supported or not m2m_calc_out_len: calculate output length according to input length m2m_get_maxburst: burst size for dma m2m_pair_suspend: suspend function of pair, optional. m2m_pair_resume: resume function of pair get_output_fifo_size: get remaining data size in FIFO Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20241212074509.3445859-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-11ASoC: fsl_spdif: change IFACE_PCM to IFACE_MIXERShengjiu Wang
As the snd_soc_card_get_kcontrol() is updated to use snd_ctl_find_id_mixer() in commit 897cc72b0837 ("ASoC: soc-card: Use snd_ctl_find_id_mixer() instead of open-coding") which make the iface fix to be IFACE_MIXER. Fixes: 897cc72b0837 ("ASoC: soc-card: Use snd_ctl_find_id_mixer() instead of open-coding") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20241126053254.3657344-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-11ASoC: fsl_xcvr: change IFACE_PCM to IFACE_MIXERShengjiu Wang
As the snd_soc_card_get_kcontrol() is updated to use snd_ctl_find_id_mixer() in commit 897cc72b0837 ("ASoC: soc-card: Use snd_ctl_find_id_mixer() instead of open-coding") which make the iface fix to be IFACE_MIXER. Fixes: 897cc72b0837 ("ASoC: soc-card: Use snd_ctl_find_id_mixer() instead of open-coding") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20241126053254.3657344-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-09ASoC: fsl_sai: Add sample rate constraintChancel Liu
Platforms like i.MX93/91 only have one audio PLL. Some sample rates are not supported. If the PLL source is used for 8kHz series rates, then 11kHz series rates can't be supported. Use fsl_asoc_constrain_rates() to constrain rates according to PLL sources. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241126115440.3929061-5-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-09ASoC: fsl_xcvr: Add sample rate constraintChancel Liu
Platforms like i.MX93/91 only have one audio PLL. Some sample rates are not supported. If the PLL source is used for 8kHz series rates, then 11kHz series rates can't be supported. Use fsl_asoc_constrain_rates() to constrain rates according to PLL sources. This constraint is merely applicable to playback cases on SPDIF only platforms. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20241126115440.3929061-4-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>