1679 Commits

Author SHA1 Message Date
Herve Codina
9aa33d5b4a
ASoC: fsl: fsl_qmc_audio: Reset audio data pointers on TRIGGER_START event
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-10 12:24:33 +01:00
Shengjiu Wang
ef5c23ae9a
ASoC: fsl_asrc_dma: get codec or cpu dai from backend
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-06 23:18:18 +01:00
Thomas Gleixner
8fa7292fee treewide: Switch/rename to timer_delete[_sync]()
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-05 10:30:12 +02:00
Linus Torvalds
3551e679c3 sound fixes for 6.15-rc1
A collection of device-specific fixes that have been gathered since
 the previous PR.
 
 - A few more HD-audio quirks and fixups
 - A series of Qualcomm AudioReach fixes
 - Various small fixes for ASoC rt5665, WSA, SOF and Cirrus.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmfvn3YOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9k0BAAwaFh4x8FS3xwgJXDzu/vXaZhFqHRqf6M/JrQ
 cZsUQDy6Zo11xnHDezyjqTWQxHJhgdigorcOhkNGs3GBkg8VqPdFW8xw7czn44pf
 4k8Z5wg3yLsw+ZGOanX3bawqwwm6DrAQoU7tNyefuwpKtLQwz3HYytsy1vygXsth
 E4XigOFuNJCnITFmR5VQdLMz99GEFsF6mixPC5h2s68849O+nibWjFJPt6o3Lolk
 6/L4mbAxIuxxR5OvcI672shu8NmDBb6g4QoXBSJN0SnCZrXmuYTIFAdUhCzFYxNO
 y/naPiMzsHCwRv6rjgkkmUFIywMBSoDiz9IUxAQ2gA1VyJdEyGI+X1n78r8sLWpF
 rXvTgpNIDWMQ+KR0nt7LyT2CjmI6aa78LN4BStCkfeiCNVNuth94+9gmQ2yXhHmx
 Beslfd8bpBPRRrnqJFsso1s5LzItT9LnVIPd6DZ64/WtMit7QNG8dmXuzVuJurYh
 Ezx0tjTPHt5zxMh55TPYh++Ja8uxe4l3SUx5UnMtVLp25aXjx/w8hHXqsESqjlFD
 U/eNtYyY/dZseBChjAQrFnViEh/aXisAZElXORd33DInDVl81OhxQyDD19O9/HtQ
 +qEhgGi6xxh6n0VRPNwVJK2O1v+8Bt2Ssh6g6XACWsof1AjRdjWQu5i58JkD+MhQ
 0twlWLA=
 =fyLx
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-6.15-rc1' of 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-04 07:05:33 -07:00
Henry Martin
93d34608fd
ASoC: imx-card: Add NULL check in imx_card_probe()
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-04-01 17:01:10 +01:00
Linus Torvalds
e50da555ca sound updates for 6.15-rc1
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
 
 Note that the PR contains some changes from the tip tree for AMD code,
 and it might give some merge conflict due to the rebase afterwards.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmfi3o0OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+mhQ//QPp4w4pegFco3//6lc6tTX1n61Ab8m9Vl1CF
 ALPN/zI7tkaI8S3cVNA3uXlzWSdmYzJOHvy8LrUAWG4e/cPQqTy9+oyZjnVrIthL
 lszAIh51fR7whtKabBQADdHzBPSPWwX5HmeiBlBP8TriCtM5wprZ4Wi8gaVrPw2G
 u4JqpRCpFQGf2S4WGnVGvV/7fyRM+R9LUhAX7BAFmSdtoz4oyg3Mt8R3MdAQkNOi
 eHX1n342b06UG9MRjv258RSW+ilf1ccPdMRVCayuVt789lgUUdo9DKhQiM6vPlT9
 FHtCbLGXkaYwxOsRuWGkPiRxc2xPLtvuSLhmiTomR1va/FnH+VW0Ghk5cwg0i31U
 mBNqdtgxYglb6Vp41OYRCImRa3dhFjR/SIHN1OokQpkzY4vsl1nu1kDXxHQttc9d
 qfXwWmviFN/Wg8hXFsEeGo26ISU+GQAmZksKfvF3YHJy/kz/amS8zSXDmUgL5WD9
 ttK25orLxptZ80sRVTywoPH25b8H4wgwRLdwvYCPqOLx8jv7V86n32gudWAibBz5
 Yua0TmWxd2r2LZVt3TdJgAhJSHXCDTdoybcwGoDn1p+jDRqcJDCpyL23TH+eAQUg
 whqQRTYVH/E/Cd1V2oATxeLwUsILkUOiHXqc7s12KMdU1rmL/S/rsASDuumxow7V
 viUoVAM=
 =NaAN
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.15-rc1' of 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-26 09:41:55 -07:00
Linus Torvalds
a50b4fe095 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmff5jQTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoVvRD/wKtuwmiA66NJFgXC0qVq82A6fO3bY8
 GBdbfysDJIbqGu5PTcULTbJ8qkqv3jeLUv6CcXvS4sZ7y/uJQl2lzf8yrD/0bbwc
 rLI6sHiPSZmK93kNVN4X5H7kvt7cE/DYC9nnEOgK3BY5FgKc4n9887d4aVBhL8Lv
 ODwVXvZ+xi351YCj7qRyPU24zt/p4tkkT1o2k4a0HBluqLI0D+V20fke9IERUL8r
 d1uWKlcn0TqYDesE8HXKIhbst3gx52rMJrXBJDHwFmG6v8Pj1fkTXCVpPo8QcBz8
 OTVkpomN9f/Tx4+GZwhZOF86LhLL3OhxD6pT7JhFCXdmSGv+Ez8uyk1YZysM/XpV
 Juy/1yAcBpDIDkmhMFGdAAn48Nn9Fotty0r4je60zSEp1d/4QMXcFme29qr2JTUE
 iWnQ/HD6DxUjVHqy7CYvvo26Xegg1C7qgyOVt4PYZwAM1VKF5P3kzYTb4SAdxtop
 Tpji1sfW9QV08jqMNo6XntD32DSP9S2HqjO9LwBw700jnx2jjJ35fcJs6iodMOUn
 gckIZLMn3L0OoglPdyA5O7SNTbKE7aFiRKdnT/cJtR3Fa39Qu27CwC5gfiyuie9I
 Q+LG8GLuYSBHXAR+PBK4GWlzJ7Dn8k3eqmbnLeKpRMsU6ZzcttgA64xhaviN2wN0
 iJbvLJeisXr3GA==
 =bYAX
 -----END PGP SIGNATURE-----

Merge tag 'timers-cleanups-2025-03-23' of 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-25 10:54:15 -07:00
Takashi Iwai
d1baa8193f
ASoC: fsl: Convert to RUNTIME_PM_OPS() and co
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-17 10:14:39 +00:00
Mark Brown
c6141ba011
ASoC: Merge up fixes
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-05 19:10:50 +00:00
Mark Brown
426aae6937
ASoC: fsl_audmix: support audio graph card for audmix
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-04 18:38:42 +00:00
Shengjiu Wang
294a60e5e9
ASoC: fsl_audmix: register card device depends on 'dais' property
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-03 13:48:38 +00:00
Kuninori Morimoto
2920be2fab
ASoC: fsl: use inclusive language for SND_SOC_DAIFMT_CBx_CFx
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-03-03 12:57:18 +00:00
Mark Brown
f9d4f69975
ASoC: imx-card: support playback or capture only
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-25 15:23:41 +00:00
Chancel Liu
0da83ab025
ASoC: fsl: Rename stream name of SAI DAI driver
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-24 18:35:53 +00:00
Shengjiu Wang
1877c3e793
ASoC: imx-card: Add playback_only or capture_only support
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-24 15:55:51 +00:00
Thorsten Blum
2fa56dae1a
ASoC: fsl: fsl_qmc_audio: Remove unnecessary bool conversions
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-24 15:00:56 +00:00
Nam Cao
ce68de08a2 ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup()
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-18 11:19:07 +01:00
Shengjiu Wang
571b69f2f9
ASoC: imx-audmix: remove cpu_mclk which is from cpu dai device
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-13 11:34:32 +00:00
Shengjiu Wang
21aa330fec
ASoC: fsl_micfil: Add decimation filter bypass mode support
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-11 13:36:18 +00:00
Nikita Zhandarovich
a8c9a45338
ASoC: fsl_micfil: Enable default case in micfil_set_quality()
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-02-03 00:34:17 +00:00
Arnd Bergmann
a2cd92185d
ASoC: fsl_asrc_m2m: select CONFIG_DMA_SHARED_BUFFER
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-22 14:09:26 +00:00
Shengjiu Wang
abe01a78bf
ASoC: fsl_asrc_m2m: return error value in asrc_m2m_device_run()
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-20 13:50:31 +00:00
Shengjiu Wang
d12ca6d4c3
ASoC: fsl_asrc_m2m: only handle pairs for m2m in the suspend
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-20 13:50:30 +00:00
Shengjiu Wang
eab6905045
ASoC: fsl_micfil: Add i.MX943 platform support
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-14 14:31:04 +00:00
Shengjiu Wang
6f490e6b2c
ASoC: fsl_mqs: Add i.MX943 platform support
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-13 13:12:57 +00:00
Rob Herring (Arm)
84eac6d478
ASoC: Use of_property_present() for non-boolean properties
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-09 18:50:14 +00:00
Mark Brown
309caeef43 Linux 6.13-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmd7BBQeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGfEEH/3oyTWmD5DPX2lLp
 SujyKrEs6bfMQTKKYHzuy8OvzDXkBpZiKXIsCgjF5sXwQVgB7KPfJwgjt5xLo3F3
 NTehLGwII7bM8mSq3wHDMeNkyBle4VYA9XOR8tXj21j7aRt9S4U/vtXiYeD9BWhC
 Y1p+1FXKfZf7TjNpu8lIl+zLjSFDjYwM8h72dIuHnrYeuFL88fnWwoNP/MFkk5Kk
 ce3ol3EtFe/M4GbVOm7KfzEkbsEE6ES60O0suxwYDn+71EA6ExVHFBKqpQvfj71/
 ynxWYIwMoiCZWtJ+ali1g/ms0OxG+ivH8+xasBYTcDICZMe/XGX5Yx+Wm5DH5/Ev
 pGMyvbI=
 =yrc7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmd+biUACgkQJNaLcl1U
 h9BMzAf/TE8F2J3pU75h7/ktgckvFrWbQ3Swmj8aDcAYTgjZ2b+YjjKnisSul0Rl
 FgPfET4ilO8hnlmpAjhgDhUXbA474it8HDxa64aHUwMDgN9ndaHRkk76/OOY0BE6
 ki9FcfbmcFa3EgA5way6E7yovkw9a5iDnt4FNFN1EEGNtHx6wscuugYM3rsof1lB
 s7+qldLnsSh0FuF9OY8e7WFnDgYCPQjbyzzSYoTvRB9mLOPHw8u4+EbktVadAF4G
 Gbx8eUwJMvm4HszCVuj90yD36V9C31wbUuH+whwcAlaS6D+XRBFa0YKQeGsmmF5W
 xoxUdGdTdehvJXfIXuNu+87CIzTf6w==
 =2EQm
 -----END PGP SIGNATURE-----

ASoC: Merge up v6.13-rc6

This helps several of my boards in CI.
2025-01-08 11:58:49 +00:00
Shengjiu Wang
cf126261d5
ASoC: fsl_asrc_m2m: force cast for snd_pcm_format_t type
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-18 14:17:40 +00:00
Linus Torvalds
f44d154d6e soc: fixes for 6.13
There are three small fixes for the soc tree:
 
  - A devicetee fix for the Arm Juno reference machine, so allow more
    interesting PCI configurations
 
  - A build fix for SCMI firmware on the NXP i.MX platform
 
  - A fix for a race condition in Arm FF-A firmware
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmdgNf4ACgkQYKtH/8kJ
 Uid99g/9Eve2yPqK+nAqlfFs20NE/cDvdaQ9n2Z+rU5igpvrqR62rBVG2v7AuFHZ
 w8Awl2iB57y1XdCxG8FE0wQ+TloiN+aLwgmbUh2st2fTjmPh6KgGq6jsGbvDli07
 WrlH4PxxMm8axO2HwEWiSLsQBpeoqYvgO+6GDW5eXLtsbr6VuFNBoD6ExC/YVqsQ
 kCdHG+WrjA+rZyXjYZqlAknLaldLEplVPmh9riZEcdYh02QE5VXU53+ctUtYZENU
 VGM/638YAlnCANKYH9u5e8YmL2RgiLLNS63xSdO0krv/gCEor3txKvcG6Cie+76d
 n0bOu13kWdcJbrt0+wVR6ILCffAurhxZZ6L3Q+iSqJ0as/eBXeZtBKYyEl5w6vZf
 X32TkPmx3cvCTZG8Vs+0e4JlC/5wiPrPCTdQSStTckp7FDEs9sttEpeZWenYJNQY
 7hVFj2Nx8SFv0JCB9N68CJB1KkhhRkAqNq6aKymTNJZLxAd72xJm3sOlDmOPRJ43
 9j6LwQ6panUk49WNRklwuL0YajcX1jTS/MRHQfKtVCOfBD05A0BaQEDeAUeYfq2V
 rCFphvZn315fv6h1XLP0LkBTOJ0f+3X+0GcwtMUX8TC/AJXPnKHAuZKmujmVH8Uh
 mtfvVlUuvnw73LM/QlyAaG/D9Tj2wHtN2HNtTaGl6CY6zdeznRw=
 =+t0h
 -----END PGP SIGNATURE-----

Merge tag 'soc-fixes-6.13' of 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-16 10:10:53 -08:00
Mark Brown
5ce3beed07
ASoC: fsl: add memory to memory function for ASRC
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-13 17:33:09 +00:00
Shengjiu Wang
b62eaff065
ASoC: fsl_easrc: register m2m platform device
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-13 08:57:11 +00:00
Shengjiu Wang
286d658477
ASoC: fsl_asrc: register m2m platform device
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-13 08:57:10 +00:00
Shengjiu Wang
24a01710f6
ASoC: fsl_asrc_m2m: Add memory to memory function
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-13 08:57:09 +00:00
Shengjiu Wang
27147695aa
ASoC: fsl_easrc: define functions for memory to memory usage
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-13 08:57:08 +00:00
Shengjiu Wang
8ea7d04a4e
ASoC: fsl_asrc: define functions for memory to memory usage
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-13 08:57:07 +00:00
Shengjiu Wang
bb76e82bfe
ASoC: fsl_spdif: change IFACE_PCM to IFACE_MIXER
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-11 18:45:27 +00:00
Shengjiu Wang
7c17f7780a
ASoC: fsl_xcvr: change IFACE_PCM to IFACE_MIXER
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-11 18:45:26 +00:00
Chancel Liu
4edc98598b
ASoC: fsl_sai: Add sample rate constraint
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-09 13:11:11 +00:00
Chancel Liu
b622b677d2
ASoC: fsl_xcvr: Add sample rate constraint
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>
2024-12-09 13:11:11 +00:00
Chancel Liu
daf7a173fc
ASoC: fsl_micfil: Switch to common sample rate constraint function
fsl_asoc_constrain_rates() is a common function to constrain rates.
Let's switch to this function.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20241126115440.3929061-3-chancel.liu@nxp.com
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-09 13:11:10 +00:00
Chancel Liu
820bcaeb1f
ASoC: fsl_utils: Add function to constrain rates
Platforms like i.MX93/91 only have one audio PLL. Some sample rates are
not supported. Add common function to constrain rates according to
different clock sources.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20241126115440.3929061-2-chancel.liu@nxp.com
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-09 13:11:09 +00:00
Arnd Bergmann
514b2262ad firmware: arm_scmi: Fix i.MX build dependency
The newly added SCMI vendor driver references functions in the
protocol driver but needs a Kconfig dependency to ensure it can link,
essentially the Kconfig dependency needs to be reversed to match the
link time dependency:

  |  arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_write':
  |  	fsl_mqs.c:(.text+0x1aa): undefined reference to `scmi_imx_misc_ctrl_set'
  |  arm-linux-gnueabi-ld: sound/soc/fsl/fsl_mqs.o: in function `fsl_mqs_sm_read':
  |  	fsl_mqs.c:(.text+0x1ee): undefined reference to `scmi_imx_misc_ctrl_get'

This however only works after changing the dependency in the SND_SOC_FSL_MQS
driver as well, which uses 'select IMX_SCMI_MISC_DRV' to turn on a
driver it depends on. This is generally a bad idea, so the best solution
is to change that into a dependency.

To allow the ASoC driver to keep building with the SCMI support, this
needs to be an optional dependency that enforces the link-time
dependency if IMX_SCMI_MISC_DRV is a loadable module but not
depend on it if that is disabled.

Fixes: 61c9f03e22fc ("firmware: arm_scmi: Add initial support for i.MX MISC protocol")
Fixes: 101c9023594a ("ASoC: fsl_mqs: Support accessing registers by scmi interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Message-Id: <20241115230555.2435004-1-arnd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-12-03 15:47:11 +00:00
Shengjiu Wang
e6a9750a34
ASoC: fsl_xcvr: Add suspend and resume support
Use regcache_sync() to recover the registers of controller,
PHY and PLL after suspend and resume.
In order to recover the registers need to avoid use the
*_SET, *_CLR and *_TOG registers.

Recovery of the registers should be done before loading
XCVR firmware otherwise some registers set by firmware
are overwritten. Besides only in eARC mode is it necessary
to load XCVR firmware.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20241127030035.649219-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-02 00:30:20 +00:00
Shengjiu Wang
5a8b4785cd
ASoC: fsl_xcvr: Use regmap for PHY and PLL registers
Define regmap for PHY and PLL registers, the PHY and PLL
registers are accessed by AI interface in controller.

So that driver can use regcache to recover registers
after suspend and resume.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20241127030035.649219-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-12-02 00:30:19 +00:00
Charles Han
e038f43eda
ASoC: imx-audmix: Add NULL check in imx_audmix_probe
devm_kasprintf() can return a NULL pointer on failure,but this
returned value in imx_audmix_probe() is not checked.
Add NULL check in imx_audmix_probe(), to handle kernel NULL
pointer dereference error.

Fixes: 05d996e11348 ("ASoC: imx-audmix: Split capture device for audmix")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://patch.msgid.link/20241118084553.4195-1-hanchunchao@inspur.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-21 14:03:17 +00:00
Mark Brown
07db6d5e12
ASoC: Merge up fixes
Needed for new Intel board file changes.
2024-11-14 11:39:47 +00:00
Mark Brown
ff96429c12
ASoC: cleasnup rtd and its ID
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

rtd has own ID, but it is naming "num" for it. The naming is confusable.
This patch rename it to "id".
And many functions request both "rtd" and its "id" as function parameter,
but rtd itself has rtd->id. This patch cleanup it.

And, Qcom driver want to use irregular rtd ID because of its topology,
and thus, soc-core need irregular calculation. I'm not sure why only Qcom
needs such calculation, but this patch also cleanup it.
But I guess we want to cleanup is not soc-core but Qcom side (?)
2024-11-05 18:15:39 +00:00
Shengjiu Wang
101c902359
ASoC: fsl_mqs: Support accessing registers by scmi interface
On i.MX95, the MQS module in Always-on (AON) domain only can
be accessed by System Controller Management Interface (SCMI)
MISC Protocol. So define a specific regmap_config for the case.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20241025062935.1071408-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-05 12:53:29 +00:00
Kuninori Morimoto
eae33f737c
ASoC: fsl: switch to use rtd->id from rtd->num
Now rtd->num is renamed to rtd->id. Let's switch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87y12eb85r.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-11-01 14:48:10 +00:00
Kuninori Morimoto
efa527f984
ASoC: fsl: remove dpcm_xxx flags
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87iktm9vij.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-23 13:01:55 +01:00