Commit Graph

43 Commits

Author SHA1 Message Date
Baojun Xu
c345102d1f ALSA: hda/tas2781: Normalize the volume kcontrol name
Change the name of the kcontrol from "Gain" to "Volume".

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20250813100842.12224-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-14 11:17:12 +02:00
Vasiliy Kovalev
b26e2afb38 ALSA: hda/realtek: Fix headset mic on HONOR BRB-X
Add a PCI quirk to enable microphone input on the headphone jack on
the HONOR BRB-X M1010 laptop.

Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250811132716.45076-1-kovalev@altlinux.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-11 16:17:31 +02:00
Christopher Eby
0db77eccd9 ALSA: hda/realtek: Add Framework Laptop 13 (AMD Ryzen AI 300) to quirks
Framework Laptop 13 (AMD Ryzen AI 300) requires the same quirk for
headset detection as other Framework 13 models.

Signed-off-by: Christopher Eby <kreed@kreed.org>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250810030006.9060-1-kreed@kreed.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-11 09:10:57 +02:00
Linus Torvalds
0227b49b50 gpio updates for v6.17-rc1
- remove unused, legacy GPIO line value setters from struct gpio_chip
 - rename the new set callbacks back to the original names treewide
 - fix interrupt handling in gpio-mlxbf2
 - revert a buggy immutable irqchip conversion
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmiV1PUACgkQEacuoBRx
 13IQvQ//Rhl2xC/DKUHb8wR8yOyMRUQ2tmD8hM+lrS0Dej7mJ91e4SJpqxtQck+c
 mNeiMG1JLSrN+2RCWzinPR6ha7ML8Zu8XP1OxG5EDD06hyWAKHI6CF/PIeZX7Sy4
 xMlSpH/brRInj3NBaBLdlompqfe2CVUFW2ahvovE97oz7l+nKEZUa5r3Gw7lHcRz
 bmbQ0FLKfYsAz9hzD0pc8wcralp5ggyiiGcdZI8U2YCAUKLV5M/FhMuU/M0jEiJi
 iYtr2OQJijtSWDP2i81aQj/ZsdW5gfCCiGSAoeVdcRLAL0bLHLCR8Wird+0DWCGO
 UHJg+Ed0+84+sahuoU07vYyDM1T92vUDwjAkr8H65+U7u4cHjoj4fYi6104Fbh0J
 /1deR53z6vhObFkZmh61lv63SES9xzOfM6FJP1UUMwtG40JQcZNYnHDFAD3V5wvN
 Gi1gVub9L5TKSJMsJHirtsk+QT6KnInVxzXcgqC09XxhuEvA+MC+Qkee+P8bbaAU
 mcOR4conQzcoWuv/Y0GCGJ3CpvHhCmcBfL1MdtjFWHipG4LhlIVtRCJDRAx2Q5oY
 C4vQterv4r9mXomAs4ykRlEdCnXvldv9PN8lKQ0KMendwTv4A4xG8o6IEoYSb90R
 q7CNQjxjyr77ovRbcfSoAZrcRG4oP3nGhSQsdv85wHZU5XbJXoU=
 =MulZ
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.17-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "As discussed: there's a small commit that removes the legacy GPIO line
  value setter callbacks as they're no longer used and a big, treewide
  commit that renames the new ones to the old names across all GPIO
  drivers at once.

  While at it: there are also two fixes that I picked up over the course
  of the merge window:

   - remove unused, legacy GPIO line value setters from struct gpio_chip

   - rename the new set callbacks back to the original names treewide

   - fix interrupt handling in gpio-mlxbf2

   - revert a buggy immutable irqchip conversion"

* tag 'gpio-updates-for-v6.17-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  treewide: rename GPIO set callbacks back to their original names
  gpio: remove legacy GPIO line value setter callbacks
  gpio: mlxbf2: use platform_get_irq_optional()
  Revert "gpio: pxa: Make irq_chip immutable"
2025-08-09 08:15:43 +03:00
Bartosz Golaszewski
d9d87d90cc treewide: rename GPIO set callbacks back to their original names
The conversion of all GPIO drivers to using the .set_rv() and
.set_multiple_rv() callbacks from struct gpio_chip (which - unlike their
predecessors - return an integer and allow the controller drivers to
indicate failures to users) is now complete and the legacy ones have
been removed. Rename the new callbacks back to their original names in
one sweeping change.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-08-07 10:07:06 +02:00
Takashi Iwai
e8e4f3c242 ALSA: hda/cirrus: Restrict prompt only for CONFIG_EXPERT
The split of Cirrus HD-audio codec driver may confuse users when
migrating from the previous kernel configs and leave the needed
drivers disabled.  Although we've already set y as default, it's still
safer to paper over the wrong choices.

This patch marks the prompt of split CS420x and CS421x codec drivers
with CONFIG_EXPERT, so that they are all enabled when the top-level
CONFIG_SND_HDA_CODEC_CIRRUS is set.

For users who really care about the minimalistic configuration, they
can turn each driver on/off individually after setting
CONFIG_EXPERT=y.

This patch adds the missing help text to the top-level
CONFIG_SND_HDA_CIRRUS_CODEC together with the explanation of
individual choices, and corrects the help texts that don't fit well
nowadays, too.

Fixes: 1cb8744a36 ("ALSA: hda/cirrus: Split to cs420x and cs421x drivers")
Link: https://lore.kernel.org/10172c80-daec-4e20-ab57-a483cf1afc02@molgen.mpg.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250806192541.21949-4-tiwai@suse.de
2025-08-07 08:20:59 +02:00
Takashi Iwai
606fcab9aa ALSA: hda/hdmi: Restrict prompt only for CONFIG_EXPERT
The split of HDMI codec driver may confuse users when migrating from
the previous kernel configs and leave some drivers disabled
unexpectedly.  Although we've already set y to all HDMI codec drivers
as default, it's still safer to paper over the wrong choices.

This patch marks the prompt of each HDMI codec driver with
CONFIG_EXPERT, so that they are all enabled when the top-level
CONFIG_SND_HDA_CODEC_HDMI is set.

For users who really care about the minimalistic configuration, they
can turn each driver on/off individually after setting
CONFIG_EXPERT=y.

The patch also adds the missing help text to the top-level
CONFIG_SND_HDA_CODEC_HDMI together with the explanation of individual
choices, too.

Fixes: 73cd049081 ("ALSA: hda/hdmi: Split vendor codec drivers")
Link: https://lore.kernel.org/10172c80-daec-4e20-ab57-a483cf1afc02@molgen.mpg.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250806192541.21949-3-tiwai@suse.de
2025-08-07 08:20:59 +02:00
Takashi Iwai
6bd05db767 ALSA: hda/realtek: Restrict prompt only for CONFIG_EXPERT
The split of Realtek HD-audio codec driver may cause confusions
especially when migrating from the previous kernel configurations
because it's hard to know which driver to be enabled.
Although we've already set default=y for those codec drivers, it may
still make people changing the stuff unnecessarily without knowing its
side effect.

This patch is for avoiding such pitfalls by marking the prompt of each
Realtek codec driver with CONFIG_EXPERT.  For "normal" users (that is,
unless CONFIG_EXPERT is set), all Realtek HD-audio codecs are enabled
together with CONFIG_SND_HDA_CODEC_REALTEK; this is the very same
situation like the previous kernels, after all.

For users who really care about the minimalistic configuration, they
can turn each driver on/off individually after setting
CONFIG_EXPERT=y.

The patch also adds the missing help text to the top-level
CONFIG_SND_HDA_CODEC_REALTEK together with the explanation of
individual choices, too.

Fixes: aeeb85f26c ("ALSA: hda: Split Realtek HD-audio codec driver")
Link: https://lore.kernel.org/10172c80-daec-4e20-ab57-a483cf1afc02@molgen.mpg.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250806192541.21949-2-tiwai@suse.de
2025-08-07 08:20:59 +02:00
Takashi Iwai
9f320dfb0f ALSA: hda/ca0132: Fix missing error handling in ca0132_alt_select_out()
There are a couple of cases where the error is ignored or the error
code isn't propagated in ca0132_alt_select_out().  Fix those.

Fixes: def3f0a5c7 ("ALSA: hda/ca0132 - Add quirk output selection structures.")
Link: https://patch.msgid.link/20250806094423.8843-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-06 14:36:02 +02:00
Shenghao Ding
cac5f2af13 ALSA: hda/tas2781: Support L"SmartAmpCalibrationData" to save calibrated data
Some devices save the calibrated data into L"CALI_DATA", and others into
L"SmartAmpCalibrationData". Driver code will support both.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250805070945.524-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-06 08:05:47 +02:00
Thomas Croft
dbe05428c4 ALSA: hda/realtek: add LG gram 16Z90R-A to alc269 fixup table
Several months ago, Joshua Grisham submitted a patch [1]
for several ALC298 based sound cards.

The entry for the LG gram 16 in the alc269_fixup_tbl only matches the
Subsystem ID for the 16Z90R-Q and 16Z90R-K models [2]. My 16Z90R-A has a
different Subsystem ID [3]. I'm not sure why these IDs differ, but I
speculate it's due to the NVIDIA GPU included in the 16Z90R-A model that
isn't present in the other models.

I applied the patch to the latest Arch Linux kernel and the card was
initialized as expected.

[1]: https://lore.kernel.org/linux-sound/20240909193000.838815-1-josh@joshuagrisham.com/
[2]: https://linux-hardware.org/?id=pci:8086-51ca-1854-0488
[3]: https://linux-hardware.org/?id=pci:8086-51ca-1854-0489

Signed-off-by: Thomas Croft <thomasmcft@gmail.com>
Link: https://patch.msgid.link/20250804151457.134761-2-thomasmcft@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-04 20:02:07 +02:00
Takashi Iwai
81231ad173 ALSA: hda/hdmi: Enable drivers as default
Like other HD-audio codec drivers, HD-audio HDMI codec driver was
split to multiple drivers, and now users are forced to choose the
right kconfig items.

For smoother upgrade path, keep the previous CONFIG_SND_HDA_CODEC_HDMI
as the meuconfig, so that the kconfig can be taken over from the
previous config.  The all belonging HDMI codec drivers are enabled as
default as long as CONFIG_SND_HDA_CODEC_HDMI is set.

This is only about the default config, and each driver can be still
disabled if user wants to reduce the size, too.

The kconfig for the generic HDMI driver is changed to
CONFIG_SND_HDA_CODEC_HDMI_GENERIC along with this action.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250730064639.25617-4-tiwai@suse.de
2025-07-30 15:39:42 +02:00
Takashi Iwai
fc2792a400 ALSA: hda/cirrus: Enable drivers as default
Like HD-audio Realtek drivers, Cirrus Logic HD-audio codec driver was
split to multiple drivers, too, and now users are forced to choose the
right kconfig items.

For smoother upgrade path, keep the previous
CONFIG_SND_HDA_CODEC_CIRRUS as the menuconfig.

The new kconfig CONFIG_SND_HDA_CODEC_CS42* are enabled as default, as
long as CONFIG_SND_HDA_CODEC_CIRRUS is set, so that the system with
Cirrus codec can keep working.

This is only about the default config, and each driver can be still
disabled if user wants to reduce the size, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250730064639.25617-3-tiwai@suse.de
2025-07-30 15:39:42 +02:00
Takashi Iwai
1d8dd982c4 ALSA: hda/realtek: Enable drivers as default
The recent split of Realtek HD-audio driver forced users to choose the
right Kconfigs, but most users have no idea which ones to enable.
Although the distros tend to enable all of them, individual users may
have their own favorites and miss something needed via the version
upgrade.

For smoother upgrade path from the previous kernel configuration, now
we take the following changes:

- CONFIG_SND_HDA_CODEC_REALTEK (which is a menuconfig) is changed from
  bool to tristate again, so that it can take over from the previous
  config gracefully.
- CONFIG_SND_HDA_CODEC_ALC* receive "default y", so that they are
  enabled as default as long as CONFIG_SND_HDA_CODEC_REALTEK is set.
  Those can be still disabled if users want to reduce the size, too.

At least this allows users to run "make oldconfig" and push RETURN
blindly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250730064639.25617-2-tiwai@suse.de
2025-07-30 15:39:42 +02:00
Edip Hazuri
a9dec09631 ALSA: hda/realtek - Fix mute LED for HP Victus 16-d1xxx (MB 8A26)
My friend have Victus 16-d1xxx with board ID 8A26, the existing quirk
for Victus 16-d1xxx wasn't working because of different board ID

Tested on Victus 16-d1015nt Laptop. The LED behaviour works
as intended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link/20250729181848.24432-4-edip@medip.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-30 07:51:44 +02:00
Edip Hazuri
956048a3cd ALSA: hda/realtek - Fix mute LED for HP Victus 16-s0xxx
The mute led on this laptop is using ALC245 but requires a quirk to work
This patch enables the existing quirk for the device.

Tested on Victus 16-S0063NT Laptop. The LED behaviour works
as intended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link/20250729181848.24432-2-edip@medip.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-30 07:51:36 +02:00
Baojun Xu
5dc50b111b ALSA: hda: Fix the wrong register was used for DVC of TAS2770
The wrong register was used for digital volume control of TAS2770,
The definition was changed, and usage was also updated.

Fixes: ab29b3460c ("ALSA: hda: Add TAS2770 support")
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20250729145849.55057-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-29 17:48:29 +02:00
Edip Hazuri
bd7814a4c0 ALSA: hda/realtek - Fix mute LED for HP Victus 16-r1xxx
The mute led on this laptop is using ALC245 but requires a quirk to work
This patch enables the existing quirk for the device.

Tested on Victus 16-r1xxx Laptop. The LED behaviour works
as intended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link/20250725151436.51543-2-edip@medip.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-28 11:41:49 +02:00
Baojun Xu
ab29b3460c ALSA: hda: Add TAS2770 support
Add TAS2770 support in TI's HDA driver. And add hda_chip_id for
more products. Distinguish DSP and non-DSP in firmware
loading function.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>

Link: https://patch.msgid.link/20250723142423.38768-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-23 16:38:25 +02:00
Takashi Iwai
089a60acbd Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-22 20:02:20 +02:00
Stefan Binding
0156c22fb0 ALSA: hda/realtek: Add support for ASUS Commercial laptops using CS35L41 HDA
Add support for ASUS PM3406CKA and PM3606CKA.

Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250721135406.366912-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-21 16:29:13 +02:00
Takashi Iwai
7cd3c8cafb Merge branch 'for-linus' into for-next
Synch HD-audio changes landed in 6.16-rc7.
Mostly for file rename tracking.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-21 09:23:34 +02:00
Takashi Iwai
7828740b06 Merge branch 'for-linus' into for-next
Pull yet another HD-audio codec quirk update from 6.16 devel branch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-15 09:54:17 +02:00
Takashi Iwai
891667cefd Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-14 14:29:49 +02:00
Takashi Iwai
0bdbce2585 ALSA: hda: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Link: https://patch.msgid.link/20250711083051.18759-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-11 13:36:20 +02:00
Takashi Iwai
cabaf5908e ALSA: hda: Drop old codec binding method
Now that all patch_ops usage have been converted to the new
hda_codec_ops probe, we can drop patch_ops from the hda_codec,
together with the calls of patch_ops callbacks.

The hda_codec_ops.free callback is removed as all have been replaced
with the new remove callback.

Also, correct comments mentioning "patch"; it's replaced with "codec
driver".

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-25-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
ad781b550f ALSA: hda/hdmi: Rewrite to new probe method
Convert the HDMI codec drivers to use the new hda_codec_ops probe.

The Intel and Nvidia-MCP HDMI drivers needed slightly more changes to
deal with the unified callbacks among all models.

Also another non-trivial change is Intel driver's set_power_state
callback.  An additional NULL check of codec->spec is needed there
since the set_power_state() may be called before the probe gets called
(e.g. in ASoC hda codec hda_codec_probe()).

Other than that, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-24-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
6cce08122f ALSA: hda/ca0132: Rewrite to new probe method
Convert the CA0132 codec driver to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-23-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
eb2f084414 ALSA: hda/sigmatel: Rewrite to new probe method
Convert the Sigmatel/IDT codec driver to use the new hda_codec_ops
probe.  No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-22-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
be60c12909 ALSA: hda/via: Rewrite to new probe method
Convert the VIA codec driver to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-21-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
51a1e7f413 ALSA: hda/si3054: Rewrite to new probe method
Convert the SI3054 codec driver to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-20-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
3cea413834 ALSA: hda/senary: Rewrite to new probe method
Convert the Senary codec driver to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-19-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
dec96130ea ALSA: hda/conexant: Rewrite to new probe method
Convert the Conexant codec driver to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-18-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
e4c9f524a1 ALSA: hda/cs8409: Rewrite to new probe method
Convert the CS8409 codec driver to use the new hda_codec_ops probe.
The Dolphin support needs an override of unsol_event callback, and
redirect via spec->unsol_event function pointer for now.

Other than that, no functional changes.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-17-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
1cb8744a36 ALSA: hda/cirrus: Split to cs420x and cs421x drivers
Since the codec ops for CS420x and CS421x are fairly independent,
split the cirrus codec driver into two drivers, snd-hda-codec-cs420x
and snd-hda-code-cs421x.  Together with the split, convert to the new
hda_codec_ops probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-16-tiwai@suse.de
2025-07-11 09:55:38 +02:00
Takashi Iwai
dbe3e4ab57 ALSA: hda/ca0110: Rewrite to new probe method
Convert the CA0110 codec driver to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-15-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
f025ef0316 ALSA: hda/analog: Rewrite to new probe method
Convert the Analog Device codec driver to use the new hda_codec_ops
probe.  The probe function had to be unified and branched with the
model type specified via driver_data instead.

Other than that, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-14-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
0f1e8306dc ALSA: hda/cmedia: Rewrite to new probe method
Convert the C-Media codec driver to use the new hda_codec_ops probe.

Since the CM9825 uses a completely different probe and codec ops,
factor out to an individual codec driver, snd-hda-codec-cm9825.

Other than that, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-13-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
e1d695b45f ALSA: hda/realtek: Rewrite to new probe method
Convert the Realtek codec drivers to use the new hda_codec_ops probe.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-12-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
1d0e6926ef ALSA: hda/generic: Rewrite to new probe method
Convert the generic HD-audio codec driver to use the new hda_codec_ops
probe.  No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-11-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
73cd049081 ALSA: hda/hdmi: Split vendor codec drivers
In the past, we unified HD-audio HDMI codec driver once with a slight
hope that more vendors will follow the standard, but in reality, the
driver received more and more vendor-specific code.  In order to make
the messy code a bit more understandable, this patch splits the HDMI
codec driver into multiple drivers again.

Namely, the vendor-specific code for Intel, AMD and Nvidia are moved
into the own drivers, while we split the common HDMI code to two
drivers, the generic HDMI driver and the simple HDMI driver.
So, now we have:

- The generic HDMI driver (snd-hda-codec-hdmi):
  providing the common helpers, also supports Glenfly HDMI codecs and
  some other codecs that don't need vendor-specific stuff

- The simple HDMI driver (snd-hda-codec-simplehdmi):
  devices with no dynamic PCM assignment and with fixed channels,
  mostly used by some other drivers, but this driver alone suffices
  for VIA HDMI codec support, too

- Intel HDMI driver (snd-hda-codec-intelhdmi):
  bound with i915 / Xe DRM, based on the generic HDMI driver

- AMD/ATI HDMI driver (snd-hda-codec-atihdmi):
  optionally bound with radeon / amdgpu DRM, based on the generic HDMI
  driver

- Nvidia HDMI driver (snd-hda-codec-nvhdmi);
  optionally bound with nouveau DRM, based on the generic HDMI driver

- Legacy Nvidia HDMI driver (snd-hda-codec-nvhdmi-mcp):
  for 2ch or 8ch outputs, based on the simple HDMI driver

- Nvidia Tegra HDMI driver (snd-hda-codec-tegrahdmi):
  based on the generic HDMI driver

Along with the driver split, the enable_silent_stream module option is
moved to snd-hda-codec-intelhdmi, too, as it's an Intel-specific
feature.

Most of the changes here are just to split and move the code to
different files, as well as to rename/expose the functions that are
commonly used by drivers.

The silent stream handling code is slightly modified for putting the
stuff into Intel driver; now a new callback "silent_stream" is defined
in hdmi_ops, and it's called in silent_stream_enable() and *_disable()
functions.  The runtime-PM handling in silent_stream_enable() was
cleaned up, and rather taking the runtime PM refcount in the
silent_stream() callback appropriately, instead.

Other than that, there should be no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-9-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
aeeb85f26c ALSA: hda: Split Realtek HD-audio codec driver
The snd-hda-codec-realtek driver supports many different codec models
and accumulated lots of quirks.  Now let's split it to multiple
modules per probe function, i.e. for ALC260, ALC262, ALC269, etc.

The common code and quirks are provided by the common library module,
snd-hda-codec-realtek-lib now.  One drawback of this action is that
many symbols have to be exported.  But they are limited with
SND_HDA_CODEC_REALTEK namespace, at least.

This patch tries to be idiomatic and doesn't try to rewrite the
existing code.  We can move the codec model-specific code into each
codec driver later.

The HD-audio sub-codec component binding is currently specific to
ALC269, hence the management is moved into alc269.c.
After that, alc_free() became identical with snd_hda_gen_free(), and
it's replaced as a macro just to call snd_hda_gen_free().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-8-tiwai@suse.de
2025-07-11 09:55:37 +02:00
Takashi Iwai
6014e9021b ALSA: hda: Move codec drivers into sound/hda/codecs directory
Now move the all remaining codec drivers from sound/pci/hda to
sound/hda/codecs subdirectory.  Some drivers are put under the further
vendor subdirectory, and the vendor helper code (*_helper.c) are put
under helpers subdirectory.  Also the sub-codec drivers are moved under
a different subdirectory, sound/hda/codecs/sub-codecs, for
distinguishing from the main HD-audio codec drivers.

The prefix patch_ and hda_ as well as the suffix _helper are dropped
from file names as they are mostly superfluous.

No functional changes but just file path shuffling.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-7-tiwai@suse.de
2025-07-11 09:55:37 +02:00