Commit Graph

3 Commits

Author SHA1 Message Date
Takashi Iwai
8dad6b3dac ALSA: hda/common: Use cleanup macros for PM controls
The new macro CLASS(snd_hda_power_pm) can replace the manual
snd_hda_power_up_pm() and _down() calls gracefully.

A part of the code in codec_exec_verb() is factored out to a function,
so that the auto-cleanup can be well scoped.

Merely cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-6-tiwai@suse.de
2025-08-29 11:52:14 +02:00
Thorsten Blum
4a31a043fc ALSA: hda: Improve local variable data type in print_device_list()
Use 'unsigned int' instead of 'int' for the local variable 'devlist_len'
because snd_hda_get_devices() returns an 'unsigned int' and the length
cannot be negative. Update the print format specifier and the if
condition accordingly.

Reformat calling snd_hda_codec_read() to fit in a single line while
we're at it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250813210059.215912-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-14 08:40:01 +02:00
Takashi Iwai
05be28fe85 ALSA: hda: Move common codec driver into sound/hda/common directory
The snd-hda-codec module contains the most of common code used by both
HD-audio controller and codec drivers, and it's basically independent
from PCI.  Let's move the code to sound/hda/common directory as a part
of code reorganization.

The hda_ prefix is dropped from the most of file names as it's rather
superfluous.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-4-tiwai@suse.de
2025-07-11 09:55:37 +02:00