Commit Graph

43906 Commits

Author SHA1 Message Date
Linus Torvalds dca45efbe3 sound fixes for 6.1-rc1
Here are a few remaining patches for 6.1-rc1.  The major changes
 are the hibernation fixes for HD-audio CS35L41 codec and the
 USB-audio small fixes against the last change.  In addition, a
 couple of HD-audio regression fixes and a couple of potential
 mutex-deadlock fixes with OSS emulation in ALSA core side are seen.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmNJgcIOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+WBxAAlwaJnvzqz2dxVqICM6MNlGiCssdNS2fW2lcm
 r2zEMiUt++tn2zem12MqROm+Zn9uwlV+fY8smjUlxNY7Wj07wCQWwH5LXfn9v82D
 +mRL4KOhYKGDQMDvo380WGrkuUjCMJkXtVMJDWR1HSMFRZmWu0YdCE0dFd90Hrus
 HW+/+fyP4CNhpk0m5jrffqB7FQI6ylB3j4qmhbxwP9AlA3ik2QvslA+fK6cVltay
 A+hljqNRa1M3/730UvDTNN6PykYBunuvT/EzUFdY/Y0lNtz5RgAAVDBQEZ3T6URE
 6AMgYyCv+gyRH5bcO2Arp3X0JY9ZQKp3/gbTrKfY0G2JQlKVALW1vjExUTlQaWBi
 5Q8/rWo+ZsRsis8NOrJJ9fdHyc6rFXRKX9t/U8svjIW/JxW/4ge2UWxKnISzcQZ6
 1ktFGpoImi8+fXMspKxiePVgJSPxdk5GjRHjdQJ0LYQeceEipljFIXswLPk84KmM
 QPBFMBDxCm3C4E7ZRfk2Rnt0ypf3eRlfQmuWDRtvYsjpgpx08ZKElBhgNMejPtcX
 usXugOMYDB6LK+qlNQhE4iS9V+Xh/6XQL2lblPosPyRY1Ui367s6FHuAty4Yjxcg
 QkggiMuLWSypVIJVUG/uUcgZYHSZbnWPXvfPmt0PM2EbYKLr3zmdkLgKDUfdRvD5
 Hy5HNdU=
 =6PA4
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a few remaining patches for 6.1-rc1.

  The major changes are the hibernation fixes for HD-audio CS35L41 codec
  and the USB-audio small fixes against the last change. In addition, a
  couple of HD-audio regression fixes and a couple of potential
  mutex-deadlock fixes with OSS emulation in ALSA core side are seen"

* tag 'sound-fix-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda: cs35l41: Support System Suspend
  ALSA: hda: cs35l41: Remove suspend/resume hda hooks
  ALSA: hda/cs_dsp_ctl: Fix mutex inversion when creating controls
  ALSA: hda: hda_cs_dsp_ctl: Ensure pwr_lock is held before reading/writing controls
  ALSA: hda: hda_cs_dsp_ctl: Minor clean and redundant code removal
  ALSA: oss: Fix potential deadlock at unregistration
  ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
  ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
  ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
  ALSA: hda/realtek: Correct pin configs for ASUS G533Z
  ALSA: usb-audio: Avoid superfluous endpoint setup
  ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()
  ALSA: usb-audio: Apply mutex around snd_usb_endpoint_set_params()
  ALSA: usb-audio: Avoid unnecessary interface change at EP close
  ALSA: hda: Update register polling macros
  ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
2022-10-14 13:22:14 -07:00
Stefan Binding 88672826e2 ALSA: hda: cs35l41: Support System Suspend
Add support for system suspend into the CS35L41 HDA Driver.
Since S4 suspend may power off the system, it is required
that the driver ensure the part is safe to be shutdown before
system suspend, as well as ensuring that the firmware is
unloaded before shutdown. The part must then be restored
on system resume, including re-downloading the firmware.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221011143552.621792-6-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-12 08:02:49 +02:00
Stefan Binding 23904f7b25 ALSA: hda: cs35l41: Remove suspend/resume hda hooks
The current code uses calls from the HDA Codec driver to
determine when to suspend/resume by calling hooks via the
hda_component binding.
However, this means the cs35l41 driver relies on the HDA
Codec driver to tell it when to suspend or resume,
creating an additional external dependency, and potentially
creating race conditions in the future. It is better for
the cs35l41 hda driver to decide for itself when the part
should be suspended or resumed.
This makes supporting system suspend easier.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221011143552.621792-5-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-12 08:02:48 +02:00
Richard Fitzgerald 2176c6b599 ALSA: hda/cs_dsp_ctl: Fix mutex inversion when creating controls
Redesign the creation of ALSA controls so that the cs_dsp
pwr_lock is not held when calling snd_ctl_add(). Instead of
creating the ALSA control from the cs_dsp control_add callback,
do it after cs_dsp_power_up() has completed. The existing
functions are changed to return void instead of passing errors
back - this duplicates the original behaviour, as cs_dsp does
not abort firmware load if creation of a control fails.

It is safe to walk the control list without taking any mutex
provided that the caller is not trying to load a new firmware
or remove the driver in parallel. There is no other situation
that the list can change. So the caller can trigger creation
of ALSA controls after cs_dsp_power_up() has returned. A cs_dsp
control will have a non-NULL priv pointer if we have created
an ALSA control.

With the previous code the ALSA controls were created from
the cs_dsp control_add callback. But this is called with
pwr_lock held (as it is part of the DSP power-up sequence).
The kernel lock checking will show a mutex inversion between
this and the control creation path:

control_add
  pwr_lock held, takes controls_rwsem (in snd_ctl_add)

get/put
  controls_rwsem held, takes pwr_lock to call cs_dsp.

This is not completely theoretical. Although the time window
is very small, it is possible for these to run in parallel
and deadlock the old implementation.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221011143552.621792-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-12 08:02:47 +02:00
Stefan Binding 06f3a0a758 ALSA: hda: hda_cs_dsp_ctl: Ensure pwr_lock is held before reading/writing controls
These apis require the pwr_lock to be held.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221011143552.621792-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-12 08:02:46 +02:00
Stefan Binding 49b0dea1eb ALSA: hda: hda_cs_dsp_ctl: Minor clean and redundant code removal
The cs_dsp core will return an error if passed a NULL cs_dsp struct so
there is no need for the hda_cs_dsp_write|read_ctl functions to manually
check that. The cs_dsp core will also check the data is within bounds of
the control so the additional bounds check is redundant too. Simplify
things a bit by removing said code.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221011143552.621792-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-12 08:02:46 +02:00
Takashi Iwai 97d917879d ALSA: oss: Fix potential deadlock at unregistration
We took sound_oss_mutex around the calls of unregister_sound_special()
at unregistering OSS devices.  This may, however, lead to a deadlock,
because we manage the card release via the card's device object, and
the release may happen at unregister_sound_special() call -- which
will take sound_oss_mutex again in turn.

Although the deadlock might be fixed by relaxing the rawmidi mutex in
the previous commit, it's safer to move unregister_sound_special()
calls themselves out of the sound_oss_mutex, too.  The call is
race-safe as the function has a spinlock protection by itself.

Link: https://lore.kernel.org/r/CAB7eexJP7w1B0mVgDF0dQ+gWor7UdkiwPczmL7pn91xx8xpzOA@mail.gmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221011070147.7611-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-11 09:02:43 +02:00
Takashi Iwai a70aef7982 ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
The register_mutex taken around the dev_unregister callback call in
snd_rawmidi_free() may potentially lead to a mutex deadlock, when OSS
emulation and a hot unplug are involved.

Since the mutex doesn't protect the actual race (as the registration
itself is already protected by another means), let's drop it.

Link: https://lore.kernel.org/r/CAB7eexJP7w1B0mVgDF0dQ+gWor7UdkiwPczmL7pn91xx8xpzOA@mail.gmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221011070147.7611-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-11 09:02:32 +02:00
Saranya Gopal 4f2e56a59b ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
This patch fixes the issue with 3.5mm headset keys
on RPL-P platform.

[ Rearranged the entry in SSID order by tiwai ]

Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
Signed-off-by: Ninad Naik <ninad.naik@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221011044916.2278867-1-saranya.gopal@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-11 07:44:14 +02:00
Luke D. Jones 2ea8e12978 ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
The ASUS ROG X16 (GV601R) series laptop has the same node-to-DAC pairs
as early models and the G14, this includes bass speakers which are by
default mapped incorrectly to the 0x06 node.

Add a quirk to use the same DAC pairs as the G14.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221010070347.36883-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-10 14:43:51 +02:00
Luke D. Jones 66ba7c8850 ALSA: hda/realtek: Correct pin configs for ASUS G533Z
The initial fix for ASUS G533Z was based on faulty information. This
fixes the pincfg to values that have been verified with no existing
module options or other hacks enabled.

Enables headphone jack, and 5.1 surround.

[ corrected the indent level by tiwai ]

Fixes: bc2c23549c ("ALSA: hda/realtek: Add pincfg for ASUS G533Z HP jack")
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221010065702.35190-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-10 14:43:03 +02:00
Takashi Iwai 1045f5f1ff ALSA: usb-audio: Avoid superfluous endpoint setup
After splitting to snd_usb_endpoint_set_params() and *_prepare(), the
skip of each function should be checked with different flags, while we
still use ep->need_setup as the single one.  Introduce
ep->need_prepare for indicating the need of prepare, and also add the
missing check of ep->need_setup at the set_params.

Fixes: 2be79d5864 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)")
Link: https://lore.kernel.org/r/20221009104212.18877-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-09 12:43:26 +02:00
Takashi Iwai 9355b60e40 ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()
snd_usb_endpoint_set_params() should return zero for a success, but
currently it returns the sample rate.  Correct it.

Fixes: 2be79d5864 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)")
Link: https://lore.kernel.org/r/20221009104212.18877-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-09 12:43:26 +02:00
Takashi Iwai a74f8d0aa9 ALSA: usb-audio: Apply mutex around snd_usb_endpoint_set_params()
The protection with chip->mutex was lost after splitting
snd_usb_endpoint_set_params() and snd_usb_endpoint_prepare().
Apply the same mutex again to the former function.

Fixes: 2be79d5864 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)")
Link: https://lore.kernel.org/r/20221009104212.18877-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-09 12:43:25 +02:00
Takashi Iwai 9902b303b5 ALSA: usb-audio: Avoid unnecessary interface change at EP close
We toggle USB interface at PCM prepare and reset at close.  When the
PCM isn't prepared, resetting again makes little sense.
Check the current altset and avoid unnecessary interface reset at EP
close.

Link: https://lore.kernel.org/r/20221009104212.18877-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-09 12:43:24 +02:00
Linus Torvalds 833477fce7 sound updates for 6.1-rc1
Majority of changes at this PR are ASoC drivers (SOF, Intel, AMD,
 Mediatek, Qualcomm, TI, Apple Silicon, etc), while we see a few
 small fixes in ALSA / ASoC core side, too.
 
 Here are highlights:
 
 Core:
 - A new string helper parse_int_array_user() and cleanups with it
 - Continued cleanup of memory allocation helpers
 - PCM core optimization and hardening
 - Continued ASoC core code cleanups
 
 ASoC:
 - Improvements to the SOF IPC4 code, especially around trace
 - Support for AMD Rembrant DSPs, AMD Pink Sardine ACP 6.2, Apple
   Silicon systems, Everest ES8326, Intel Sky Lake and Kaby Lake,
   Mediatek MT8186 support, NXP i.MX8ULP DSPs, Qualcomm SC8280XP,
   SM8250 and SM8450 and Texas Instruments SRC4392
 
 HD- and USB-audio:
 - Cleanups for unification of hda-ext bus
 - HD-audio HDMI codec driver cleanups
 - Continued endpoint management fixes for USB-audio
 - New quirks as usual
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmM9dF0OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+ImA//bkD6zgXRwq05zl0UuoNqv1CsI3OeQ6YgIorc
 Ca4ebCclS+uQiZo5Yw+qOSvxrEh25y0EG7bB5mKGW8bFFeThaXL1ZF+iVEabWi6G
 bMXMtYPQb2fyHlS0Jv9axtCptd8YZVCVgft1CNflvC1cp7qt1FxkCzfEKFuBpNUI
 OlU1ErWfY/u+iuxnXF+vUFjZQaN2BNztPLKjOMMv1eAE5MDfPMMP6GH7hvnEeNcZ
 zaAfxsJnqHrJrx7o1k1rSEpAeQjHuFJbT9eDV1F7cI2ZH78x8/DrZoxre/BOptX5
 +LYopxoVvldukwQQserXZS3g7R0Exbzp43vjmJA1lx/tEQCz4lrDZXXPW2kO7eWR
 +v/sVHLrBFDom4Py6NNjytH/aPoC5YvZsMzu9Go8jaiJhKHKfIyyEy8CGfYOSuQv
 E/zIHJNXy7rMVNl+o4BCljlDoYIZl9YhJ/BjcEL67nqJqZmTVzgeQ9BXuEWoL0IS
 JyuRguBUnvYoFZ9tfYsFeWosSJSqW3ewDMYHV+cRAp3+sMmM4LixNgj1K/s72j3E
 yyzEwwfUgnsy3g6L++OOwTay8fztMub7pFH8d0CGJdNVcdfuJB0yIQxaAyEYFjTP
 XWDaz20g9ctAolj2WzauHPqsQX9aY2MH19oNX331xVNCcOK6tV10AYDSt3Vpqcey
 oH7YASw=
 =EWRA
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "The majority of changes are ASoC drivers (SOF, Intel, AMD, Mediatek,
  Qualcomm, TI, Apple Silicon, etc), while we see a few small fixes in
  ALSA / ASoC core side, too.

  Here are highlights:

  Core:
   - A new string helper parse_int_array_user() and cleanups with it
   - Continued cleanup of memory allocation helpers
   - PCM core optimization and hardening
   - Continued ASoC core code cleanups

  ASoC:
   - Improvements to the SOF IPC4 code, especially around trace
   - Support for AMD Rembrant DSPs, AMD Pink Sardine ACP 6.2, Apple
     Silicon systems, Everest ES8326, Intel Sky Lake and Kaby Lake,
     Mediatek MT8186 support, NXP i.MX8ULP DSPs, Qualcomm SC8280XP,
     SM8250 and SM8450 and Texas Instruments SRC4392

  HD- and USB-audio:
   - Cleanups for unification of hda-ext bus
   - HD-audio HDMI codec driver cleanups
   - Continued endpoint management fixes for USB-audio
   - New quirks as usual"

* tag 'sound-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (422 commits)
  ALSA: hda: Fix position reporting on Poulsbo
  ALSA: hda/hdmi: Don't skip notification handling during PM operation
  ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR
  ASoC: dt-bindings: Document audio OF graph dai-tdm-slot-num dai-tdm-slot-width props
  ASoC: qcom: fix unmet direct dependencies for SND_SOC_QDSP6
  ALSA: usb-audio: Fix potential memory leaks
  ALSA: usb-audio: Fix NULL dererence at error path
  ASoC: mediatek: mt8192-mt6359: Set the driver name for the card
  ALSA: hda/realtek: More robust component matching for CS35L41
  ASoC: Intel: sof_rt5682: remove SOF_RT1015_SPEAKER_AMP_100FS flag
  ASoC: nau8825: Add TDM support
  ASoC: core: clarify the driver name initialization
  ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
  ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  ASoC: wcd-mbhc-v2: Revert "ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()"
  ASoC: mediatek: mt8186: Fix spelling mistake "slect" -> "select"
  ALSA: hda/realtek: Add quirk for HP Zbook Firefly 14 G9 model
  ALSA: asihpi - Remove unused struct hpi_subsys_response
  ...
2022-10-05 12:02:07 -07:00
Callum Osmotherly 417b9c51f5 ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
After some feedback from users with Dell Precision 5530 machines, this
patch reverts the previous change to add ALC289_FIXUP_DUAL_SPK.
While it improved the speaker output quality, it caused the headphone
jack to have an audible "pop" sound when power saving was toggled.

Fixes: 1885ff13d4 ("ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop")
Signed-off-by: Callum Osmotherly <callum.osmotherly@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/Yz0uyN1zwZhnyRD6@piranha
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-05 14:52:25 +02:00
Linus Torvalds b86406d42a * 'remove' callback converted to return void. Big change with trivial
fixes all over the tree. Other subsystems depending on this change
   have been asked to pull an immutable topic branch for this.
 * new driver for Microchip PCI1xxxx switch
 * heavy refactoring of the Mellanox BlueField driver
 * we prefer async probe in the i801 driver now
 * the rest is usual driver updates (support for more SoCs, some
   refactoring, some feature additions)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmM7T3IACgkQFA3kzBSg
 KbYnAxAAn2SXzpUuuJ05hhk/y89RWHhzSilU+7d+egYfQJlbXUl2WzYx/Wu1BSZM
 ciyXuJFIiTywdUiX1r1VeMO80zmQQZXAUG7VygAtOSk7iPSd/qTyL+7J+k1DXADI
 hGR+pZLBVfTFyY3d1qHnwKFkzByvQjc2raARv9g7kDxkSQa8xI/sXScmhGYtrLch
 DUYUK1F3Sdqbk0FsudJ5Jvd7bZCSS+n+jSR+mrZaOXbkUD4JmDUauW8pAS6UI9in
 CxnjZoOLMHdAmC9ADanLeDRXxKz23uNU/9vdZ1/DMYnNsF/TnyWl6Rz/3BFE3YFk
 Vq7A1XAK4b3oJAgM92mdvKSkmzBIzkmj02vaVyuNPtRgHZo5MsIcEnWiBhymZY5g
 W6BPrjt/8YKRKeNlP/nrZmageklepsXZbUrNQt1ws8i4bbT+CKInKbjKLnBfDgVz
 5VSd8M9+y2Jd/JaJhMt9TBNmP0W2RrThxLF06Hux1ue7k4maE7Eljvkzcd4GJ6Un
 HYePZMhwCx3aeYsFmFT/V3kHFsfyHUlIFy/vgXTEICsKUpyj/dX96ANWhe+tJdcX
 Cknmc+XOVGPm0LPPju4M8WScMjSqNODm1yfDWUe2cRKlxzI45v6x4Oxl8rWD9hb4
 KKMGXit0LOtWETlHALffwFCifs6DdaaA0IMUtMQUj8egvys0enE=
 =arni
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:

 - 'remove' callback converted to return void. Big change with trivial
   fixes all over the tree. Other subsystems depending on this change
   have been asked to pull an immutable topic branch for this.

 - new driver for Microchip PCI1xxxx switch

 - heavy refactoring of the Mellanox BlueField driver

 - we prefer async probe in the i801 driver now

 - the rest is usual driver updates (support for more SoCs, some
   refactoring, some feature additions)

* tag 'i2c-for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (37 commits)
  i2c: pci1xxxx: prevent signed integer overflow
  i2c: acpi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
  i2c: i801: Prefer async probe
  i2c: designware-pci: Use standard pattern for memory allocation
  i2c: designware-pci: Group AMD NAVI quirk parts together
  i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch
  docs: i2c: slave-interface: return errno when handle I2C_SLAVE_WRITE_REQUESTED
  i2c: mlxbf: remove device tree support
  i2c: mlxbf: support BlueField-3 SoC
  i2c: cadence: Add standard bus recovery support
  i2c: mlxbf: add multi slave functionality
  i2c: mlxbf: support lock mechanism
  macintosh/ams: Adapt declaration of ams_i2c_remove() to earlier change
  i2c: riic: Use devm_platform_ioremap_resource()
  i2c: mlxbf: remove IRQF_ONESHOT
  dt-bindings: i2c: rockchip: add rockchip,rk3128-i2c
  dt-bindings: i2c: renesas,rcar-i2c: Add r8a779g0 support
  i2c: tegra: Add GPCDMA support
  i2c: scmi: Convert to be a platform driver
  i2c: rk3x: Add rv1126 support
  ...
2022-10-04 18:54:33 -07:00
Takashi Iwai 86a4d29e75 ASoC: Updates for v6.1
This has been a very quiet release for the core but quite a busy one for
 drivers with a big crop of new drivers and lots of feature additions and
 fixes to existing ones:
 
  - A new string helper parse_int_array_user().
  - Improvements to the SOF IPC4 code, especially around trace.
  - Support for AMD Rembrant DSPs, AMD Pink Sardine ACP 6.2, Apple Silcon
    systems, Everest ES8326, Intel Sky Lake and Kaby Lake, MediaTek
    MT8186 support, NXP i.MX8ULP DSPs, Qualcomm SC8280XP, SM8250 and SM8450
    and Texas Instruments SRC4392
 
 There is a conflict with the conversion of I2C remove functions to void
 in the cs42l42 driver which is fairly straightforward to resolve but
 should be highlighted to Linus.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmM6tu0ACgkQJNaLcl1U
 h9BHFQf9Ew/yLSHRdeJwNUEb4VjnRtXz+DLQbGeZBNnk/7Yt/STd0EaudUl0OuiJ
 +Ok4bLN6/47bwp5OB0kRGdTVycUq+rR2niJu4dgcY0MkfJi7Pyumibp/biips5rw
 +Qzj8oOUPu1970zmOktuy84ZY9Ikl02UEQYyUFVL1AJM3aUzfa/gQ24UCEyA2WxD
 ai7TcnUf2+zkMzqvfwFeW3avLSh+9ZLRgHHB52VNQXLHO5+YDvmMmyKZydon67n1
 +3QZOS57rQRXUgBOraq+AojTXs9gTFXmF8ujD1eA2qL33vqeZaf7upx76a3U/Rm+
 9m+6JucR1qrJyErag2nX90HQOvUcxA==
 =kv8c
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v6.1

This has been a very quiet release for the core but quite a busy one for
drivers with a big crop of new drivers and lots of feature additions and
fixes to existing ones:

 - A new string helper parse_int_array_user().
 - Improvements to the SOF IPC4 code, especially around trace.
 - Support for AMD Rembrant DSPs, AMD Pink Sardine ACP 6.2, Apple Silcon
   systems, Everest ES8326, Intel Sky Lake and Kaby Lake, MediaTek
   MT8186 support, NXP i.MX8ULP DSPs, Qualcomm SC8280XP, SM8250 and SM8450
   and Texas Instruments SRC4392

There is a conflict with the conversion of I2C remove functions to void
in the cs42l42 driver which is fairly straightforward to resolve but
should be highlighted to Linus.
2022-10-03 16:30:42 +02:00
Takashi Iwai 02f2e785c4 Merge branch 'for-next' into for-linus 2022-10-03 08:48:26 +02:00
Takashi Iwai 56e696c0f0 ALSA: hda: Fix position reporting on Poulsbo
Hans reported that his Sony VAIO VPX11S1E showed the broken sound
behavior at the start of the stream for a couple of seconds, and it
turned out that the position_fix=1 option fixes the issue.  It implies
that the position reporting is inaccurate, and very likely hitting on
all Poulsbo devices.

The patch applies the workaround for Poulsbo generically to switch to
LPIB mode instead of the default position buffer.

Reported-and-tested-by: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/3e8697e1-87c6-7a7b-d2e8-b21f1d2f181b@redhat.com
Link: https://lore.kernel.org/r/20221001142124.7241-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-01 16:21:55 +02:00
Takashi Iwai 5226c7b978 ALSA: hda/hdmi: Don't skip notification handling during PM operation
The HDMI driver skips the notification handling from the graphics
driver when the codec driver is being in the PM operation.  This
behavior was introduced by the commit eb399d3c99 ("ALSA: hda - Skip
ELD notification during PM process").  This skip may cause a problem,
as we may miss the ELD update when the connection/disconnection
happens right at the runtime-PM operation of the audio codec.

Although this workaround was valid at that time, it's no longer true;
the fix was required just because the ELD update procedure needed to
wake up the audio codec, which had lead to a runtime-resume during a
runtime-suspend.  Meanwhile, the ELD update procedure doesn't need a
codec wake up any longer since the commit 788d441a16 ("ALSA: hda -
Use component ops for i915 HDMI/DP audio jack handling"); i.e. there
is no much reason for skipping the notification.

Let's drop those checks for addressing the missing notification.

Fixes: 788d441a16 ("ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling")
Reported-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20220927135807.4097052-1-brent.lu@intel.com
Link: https://lore.kernel.org/r/20221001074809.7461-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-10-01 09:50:37 +02:00
Takashi Iwai 84ab940811 ASoC: Last fixes for v6.0
In the even that there's another pull request here's some more driver
 specific fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmM2znEACgkQJNaLcl1U
 h9Cpnwf/dYoTI5fTo1MI6RVI3GnPP5ROeF7GhAW3aoesQKvk4h9tMyWH4SPKB2wX
 0fGB1OXLlicKmV8xieouKzt/bm85Rm0YqEVTRvJrffiorauY9TtOD0DzoFaljG7J
 CQrvkU18MlPNf+UpEghO1Oed9a/o8N8iRFru1XezvVzmCAVGJrlpkY4DUuWf5oDI
 GxO/arRXQtBC/QHl01DgGGBY+DXrEsxXPAot0dTljRgl4PyJGrfSwEc0/WN82IsP
 9JWhqt92xibOArziWcMINkTjrPeR8YRKboe5DJhBD0HM0ALZkUEVcUvA9lvmoXlj
 iRJM0iiShBTSG9Q0vFwkBFeavT+vIw==
 =U0jC
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.0-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Last fixes for v6.0

In the even that there's another pull request here's some more driver
specific fixes.
2022-09-30 18:18:20 +02:00
Judy Hsiao f0c8d7468a
ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR
1. Uses regmap_read_poll_timeout_atomic to poll I2S_CLR as it is called
   within a spin lock.

2. Fixes the typo of break condition in regmap_read_poll_timeout_atomic.

Fixes: fbb0ec656e ("ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220930151546.2017667-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-30 17:12:27 +01:00
Srinivas Kandagatla 7bc08355a4
ASoC: qcom: fix unmet direct dependencies for SND_SOC_QDSP6
SND_SOC_QDSP6 already has COMPILE_TEST so remove that from
SND_SOC_SC8280XP and also add QCOM_APR dependencies to
SND_SOC_SC8280XP like other Qualcomm machine drivers.

This should also fix below warning:
on x86_64, when QCOM_APR is not set and COMPILE_TEST=y:

WARNING: unmet direct dependencies detected for SND_SOC_QDSP6
  Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]
	&& SND_SOC_QCOM [=y] && QCOM_APR [=n] && COMMON_CLK [=y]
  Selected by [y]:
  - SND_SOC_SC8280XP [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]
	&& SND_SOC_QCOM [=y] && (QCOM_APR [=n] || COMPILE_TEST [=y]) &&
	 SOUNDWIRE [=y] && COMMON_CLK [=y]

Fixes: 295aeea664 ("ASoC: qcom: add machine driver for sc8280xp")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220930105347.41127-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-30 12:03:12 +01:00
Takashi Iwai 6382da0828 ALSA: usb-audio: Fix potential memory leaks
When the driver hits -ENOMEM at allocating a URB or a buffer, it
aborts and goes to the error path that releases the all previously
allocated resources.  However, when -ENOMEM hits at the middle of the
sync EP URB allocation loop, the partially allocated URBs might be
left without released, because ep->nurbs is still zero at that point.

Fix it by setting ep->nurbs at first, so that the error handler loops
over the full URB list.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220930100151.19461-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-30 12:02:54 +02:00
Takashi Iwai 568be8aaf8 ALSA: usb-audio: Fix NULL dererence at error path
At an error path to release URB buffers and contexts, the driver might
hit a NULL dererence for u->urb pointer, when u->buffer_size has been
already set but the actual URB allocation failed.

Fix it by adding the NULL check of urb.  Also, make sure that
buffer_size is cleared after the error path or the close.

Cc: <stable@vger.kernel.org>
Reported-by: Sabri N. Ferreiro <snferreiro1@gmail.com>
Link: https://lore.kernel.org/r/CAKG+3NRjTey+fFfUEGwuxL-pi_=T4cUskYG9OzpzHytF+tzYng@mail.gmail.com
Link: https://lore.kernel.org/r/20220930100129.19445-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-30 12:02:42 +02:00
Nícolas F. R. A. Prado 4674284aa7
ASoC: mediatek: mt8192-mt6359: Set the driver name for the card
The ASoC core automatically populates the driver name field in the card
from the card name if left unset. However, since the driver name can be
at most 16 characters long, wrapping will happen if the card name is
longer, which is the case for the mt8192-mt6359 driver.

Explicitly set the driver name for the card in order to avoid said
wrapping and have a readable driver name exposed to userspace.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220929205453.1144142-1-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-30 10:41:13 +01:00
Takashi Iwai 35a1744423 ALSA: hda/realtek: More robust component matching for CS35L41
As the previous commit implies, a system may have a different SPI bus
number that is embedded in the device string.  And, assuming the fixed
bus number is rather fragile; it may be assigned differently depending
on the configuration or on the boot environment.  Once when a bus
number change happens, the binding fails, resulting in the silence.

This patch tries to make the matching a bit more relaxed, allowing to
bind with a different bus number (or without it).  So the previous
fix, the introduction of ALC245_FIXUP_CS35L41_SPI1_2 fixup became
superfluous, and this is unified to ALC245_FIXUP_CS35L41_SPI_2.

Fixes: 225f6e1bc1 ("ALSA: hda/realtek: Add quirk for HP Zbook Firefly 14 G9 model")
Link: https://lore.kernel.org/r/20220930084810.10435-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-30 10:48:44 +02:00
Brent Lu 4157155df7
ASoC: Intel: sof_rt5682: remove SOF_RT1015_SPEAKER_AMP_100FS flag
This flag could be removed since we now have API to query bclk
fequency setting in the topology. The dai link structure itself also
provides DAI format information instead of figuring it out with fs
number.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220913074906.926774-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-30 09:16:32 +01:00
David Lin dacdef1bd2
ASoC: nau8825: Add TDM support
Support TDM format for NAU88L25.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20220930072804.2524352-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-30 09:16:31 +01:00
Mark Brown d488b28502
Fix PM disable depth imbalance in probe
Merge series from Zhang Qilong <zhangqilong3@huawei.com>:

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of probe.

Zhang Qilong (4):
  ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe

 sound/soc/codecs/mt6660.c | 8 ++++++--
 sound/soc/codecs/wm5102.c | 6 +++---
 sound/soc/codecs/wm5110.c | 6 +++---
 sound/soc/codecs/wm8997.c | 6 +++---
 4 files changed, 15 insertions(+), 11 deletions(-)

--
2.25.1
2022-09-30 09:15:58 +01:00
Jaroslav Kysela c8d18e4402
ASoC: core: clarify the driver name initialization
The driver field in the struct snd_ctl_card_info is a valid
user space identifier. Actually, many ASoC drivers do not care
and let to initialize this field using a standard wrapping method.
Unfortunately, in this way, this field becomes unusable and
unreadable for the drivers with longer card names. Also,
there is a possibility to have clashes (driver field has
only limit of 15 characters).

This change will print an error when the wrapping is used.
The developers of the affected drivers should fix the problem.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 17:22:41 +01:00
Zhang Qilong b73f11e895
ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of mt6660_i2c_probe.

Fixes:f289e55c6eeb4 ("ASoC: Add MediaTek MT6660 Speaker Amp Driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-5-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 16:16:24 +01:00
Zhang Qilong fcbb60820c
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of wm5102_probe.

Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 16:16:23 +01:00
Zhang Qilong 86b46bf1fe
ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of wm5110_probe.

Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-3-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 16:16:22 +01:00
Zhang Qilong 41a736ac20
ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of wm8997_probe

Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 16:16:21 +01:00
Krzysztof Kozlowski e18f6bcf8e
ASoC: wcd-mbhc-v2: Revert "ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()"
This reverts commit ddea4bbf28 ("ASoC:
wcd-mbhc-v2: use pm_runtime_resume_and_get()"), because it introduced
double runtime PM put if pm_runtime_get_sync() returns -EACCES:

  wcd934x-codec wcd934x-codec.3.auto: WCD934X Minor:0x1 Version:0x401
  wcd934x-codec wcd934x-codec.3.auto: Runtime PM usage count underflow!

The commit claimed no changes in functionality except dropping the
reference on -EACCESS.  This is exactly the change introducing bug
because function calls unconditionally pm_runtime_put_autosuspend() at
the end.

Fixes: ddea4bbf28 ("ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220929131528.217502-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 15:20:12 +01:00
Colin Ian King 65c94e4d15
ASoC: mediatek: mt8186: Fix spelling mistake "slect" -> "select"
There are some spelling mistakes in dev_err messages. Fix them.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220928220417.66799-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 12:10:49 +01:00
Takashi Iwai 225f6e1bc1 ALSA: hda/realtek: Add quirk for HP Zbook Firefly 14 G9 model
HP Zbook Firefly 14 G9 model (103c:8abb) requires yet another binding
with CS35L41 codec, but with a slightly different configuration.  It's
over spi1 instead of spi0.  Create a new fixup entry for that.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220929061455.13355-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-29 09:37:33 +02:00
Yuan Can 2d6bd853ca ALSA: asihpi - Remove unused struct hpi_subsys_response
After commit 3285ea10e9b0("ALSA: asihpi - Interrelated HPI tidy up."),
struct hpi_subsys_response is not used any more and can be removed as well.

Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20220928084833.61131-1-yuancan@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-29 08:12:28 +02:00
Shang XiaoJing eefe77fdc0 ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it
Use DIV_ROUND_UP() instead of open-coding it, which intents and makes
it more clear what is going on for the casual reviewer.

The Coccinelle references Commit e4d8aef214 ("ALSA: usb: Use
DIV_ROUND_UP() instead of open-coding it").

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220927141110.18033-1-shangxiaojing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-29 08:11:55 +02:00
Trevor Wu 7ba6546b54
ASoC: mediatek: mt8195: update audio tuner settings
Audio tuner is used to handle clock drift between 26M and APLL domain.

It's expected when abs(chg_cnt) equals to upper bound, tuner updates pcw
setting automatically, and then abs(chg_cnt) decreases.
In the stress test, we found abs(chg_cnt) possibly equals to 2 at the
unexpected timing. This results in wrong pcw updating.
Finally, abs(chg_cnt) will always be larger than upper bound,

As a result, we update the upper bound to 3 to handle the corner case.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220927151141.11846-1-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-28 12:30:48 +01:00
Wolfram Sang 85f17d677f Merge branch 'master' into i2c/for-mergewindow 2022-09-27 21:33:37 +02:00
Mark Brown 16b51447b2
Fix PM disable depth imbalance in stm32 probe
Merge series from Zhang Qilong <zhangqilong3@huawei.com>:

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced. We fix it by moving pm_runtime_enable to the
endding of probe.
2022-09-27 19:58:57 +01:00
Zhang Qilong 93618e5e05
ASoC: stm: Fix PM disable depth imbalance in stm32_i2s_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of stm32_i2s_probe.

Fixes:32a956a1fadf ("ASoC: stm32: i2s: add pm_runtime support")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927142640.64647-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-27 18:16:46 +01:00
Zhang Qilong 0325cc0ac7
ASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of stm32_spdifrx_probe.

Fixes:ac5e3efd55868 ("ASoC: stm32: spdifrx: add pm_runtime support")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927142601.64266-3-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-27 18:16:44 +01:00
Zhang Qilong b9a0da5b2e
ASoC: stm32: dfsdm: Fix PM disable depth imbalance in stm32_adfsdm_probe
The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of stm32_adfsdm_probe.

Fixes:98e500a12f934 ("ASoC: stm32: dfsdm: add pm_runtime support for audio")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927142601.64266-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-27 18:16:43 +01:00
Stefan Binding 4556089150
ASoC: cs42l42: Fallback to headphones for type detect
After tip sense detects a jack insertion, if automatic
type detection, and manual type detection fails, then
fall back to assume the jack connected belongs to
headphones.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220927121440.2506632-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-27 14:00:00 +01:00
Martin Povišer db6ae79a7e
ASoC: apple: mca: Adjust timing of component unregister
On removal of the driver, the ASoC component should be unregistered
first, before we start releasing any of the other resources.

Fixes: 3df5d0d972 ("ASoC: apple: mca: Start new platform driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220927113426.49724-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-27 13:59:59 +01:00