Re: [PATCH 06/27] ALSA: hda: Move codec drivers into sound/hda/codecs directory

Cezary Rojewski
2025-07-14T09:08:54Z

On 2025-07-14 11:04 AM, Takashi Iwai wrote:
> On Mon, 14 Jul 2025 10:57:59 +0200,
> Cezary Rojewski wrote:
>>
>> On 2025-07-09 6:04 PM, Takashi Iwai wrote:
>>> 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.
>>>
>>
>> Path: codecs/side-codecs/ looks wierd. My suggestion is to avoid the
>> repeat and stay with codecs/side/.
>
> Sorry, too late, I already merged the stuff. (And IMO codecs/side
> doesn't sound intuitive.)
>
> Since the directory names are more or less understandable, and Cirrus
> people seem OK with it, so let's leave as is.

Oh, didn't notice. The series is large and I wasn't expecting it to get
merged that quickly.

Guess no point in reviewing the rest then, thanks for the information!

>>
>> In regard to 'helpers', I believe some of these .c files could be
>> converted to headers and lie in sound/hda/quirks/ directory. These are
>> more of a platform-level files, not sound/hda/codecs/ per-se.
>>
>>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>> ---
>>> sound/hda/Kconfig | 1 +
>>> sound/hda/Makefile | 1 +
>>> sound/{pci/hda => hda/codecs}/Kconfig | 158 +-----------------
>>> sound/hda/codecs/Makefile | 31 ++++
>>> .../patch_analog.c => hda/codecs/analog.c} | 2 +-
>>> .../patch_ca0110.c => hda/codecs/ca0110.c} | 2 +-
>>> .../patch_ca0132.c => hda/codecs/ca0132.c} | 2 +-
>>> sound/{pci/hda => hda/codecs}/ca0132_regs.h | 0
>>> sound/hda/codecs/cirrus/Kconfig | 21 +++
>>> sound/hda/codecs/cirrus/Makefile | 8 +
>>> .../codecs/cirrus/cirrus.c} | 2 +-
>>> .../codecs/cirrus/cs8409-tables.c} | 4 +-
>>> .../codecs/cirrus/cs8409.c} | 2 +-
>>> .../codecs/cirrus/cs8409.h} | 2 +-
>>> .../patch_cmedia.c => hda/codecs/cmedia.c} | 2 +-
>>> .../codecs/conexant.c} | 6 +-
>>> .../hda_generic.c => hda/codecs/generic.c} | 2 +-
>>> .../hda_generic.h => hda/codecs/generic.h} | 0
>>> sound/hda/codecs/hdmi/Makefile | 6 +
>>> .../hda/hda_eld.c => hda/codecs/hdmi/eld.c} | 0
>>> .../patch_hdmi.c => hda/codecs/hdmi/hdmi.c} | 2 +-
>>> .../codecs/helpers/hp_x360.c} | 0
>>> .../codecs/helpers/ideapad_hotkey_led.c} | 0
>>> .../codecs/helpers/ideapad_s740.c} | 0
>>> .../codecs/helpers/thinkpad.c} | 0
>>> .../patch_realtek.c => hda/codecs/realtek.c} | 12 +-
>>> .../codecs/senarytech.c} | 4 +-
>>> .../patch_si3054.c => hda/codecs/si3054.c} | 0
>>> sound/hda/codecs/side-codecs/Kconfig | 128 ++++++++++++++
>>> sound/hda/codecs/side-codecs/Makefile | 28 ++++
>>> .../codecs/side-codecs}/cirrus_scodec.c | 0
>>> .../codecs/side-codecs}/cirrus_scodec.h | 0
>>> .../codecs/side-codecs}/cirrus_scodec_test.c | 0
>>> .../codecs/side-codecs}/cs35l41_hda.c | 2 +-
>>> .../codecs/side-codecs}/cs35l41_hda.h | 0
>>> .../codecs/side-codecs}/cs35l41_hda_i2c.c | 0
>>> .../side-codecs}/cs35l41_hda_property.c | 0
>>> .../side-codecs}/cs35l41_hda_property.h | 0
>>> .../codecs/side-codecs}/cs35l41_hda_spi.c | 0
>>> .../codecs/side-codecs}/cs35l56_hda.c | 2 +-
>>> .../codecs/side-codecs}/cs35l56_hda.h | 0
>>> .../codecs/side-codecs}/cs35l56_hda_i2c.c | 0
>>> .../codecs/side-codecs}/cs35l56_hda_spi.c | 0
>>> .../codecs/side-codecs}/hda_component.c | 0
>>> .../codecs/side-codecs}/hda_component.h | 0
>>> .../codecs/side-codecs}/tas2781_hda.c | 0
>>> .../codecs/side-codecs}/tas2781_hda.h | 0
>>> .../codecs/side-codecs}/tas2781_hda_i2c.c | 2 +-
>>> .../codecs/side-codecs}/tas2781_hda_spi.c | 2 +-
>>> .../codecs/sigmatel.c} | 4 +-
>>> .../{pci/hda/patch_via.c => hda/codecs/via.c} | 2 +-
>>> sound/pci/Kconfig | 2 -
>>> sound/pci/Makefile | 1 -
>>> sound/pci/hda/Makefile | 61 -------
>>> 54 files changed, 257 insertions(+), 247 deletions(-)
>>> rename sound/{pci/hda => hda/codecs}/Kconfig (55%)
>>> create mode 100644 sound/hda/codecs/Makefile
>>> rename sound/{pci/hda/patch_analog.c => hda/codecs/analog.c} (99%)
>>> rename sound/{pci/hda/patch_ca0110.c => hda/codecs/ca0110.c} (98%)
>>> rename sound/{pci/hda/patch_ca0132.c => hda/codecs/ca0132.c} (99%)
>>> rename sound/{pci/hda => hda/codecs}/ca0132_regs.h (100%)
>>> create mode 100644 sound/hda/codecs/cirrus/Kconfig
>>> create mode 100644 sound/hda/codecs/cirrus/Makefile
>>> rename sound/{pci/hda/patch_cirrus.c => hda/codecs/cirrus/cirrus.c} (99%)
>>> rename sound/{pci/hda/patch_cs8409-tables.c => hda/codecs/cirrus/cs8409-tables.c} (99%)
>>> rename sound/{pci/hda/patch_cs8409.c => hda/codecs/cirrus/cs8409.c} (99%)
>>> rename sound/{pci/hda/patch_cs8409.h => hda/codecs/cirrus/cs8409.h} (99%)
>>> rename sound/{pci/hda/patch_cmedia.c => hda/codecs/cmedia.c} (99%)
>>> rename sound/{pci/hda/patch_conexant.c => hda/codecs/conexant.c} (99%)
>>> rename sound/{pci/hda/hda_generic.c => hda/codecs/generic.c} (99%)
>>> rename sound/{pci/hda/hda_generic.h => hda/codecs/generic.h} (100%)
>>> create mode 100644 sound/hda/codecs/hdmi/Makefile
>>> rename sound/{pci/hda/hda_eld.c => hda/codecs/hdmi/eld.c} (100%)
>>> rename sound/{pci/hda/patch_hdmi.c => hda/codecs/hdmi/hdmi.c} (99%)
>>> rename sound/{pci/hda/hp_x360_helper.c => hda/codecs/helpers/hp_x360.c} (100%)
>>> rename sound/{pci/hda/ideapad_hotkey_led_helper.c => hda/codecs/helpers/ideapad_hotkey_led.c} (100%)
>>> rename sound/{pci/hda/ideapad_s740_helper.c => hda/codecs/helpers/ideapad_s740.c} (100%)
>>> rename sound/{pci/hda/thinkpad_helper.c => hda/codecs/helpers/thinkpad.c} (100%)
>>> rename sound/{pci/hda/patch_realtek.c => hda/codecs/realtek.c} (99%)
>>> rename sound/{pci/hda/patch_senarytech.c => hda/codecs/senarytech.c} (98%)
>>> rename sound/{pci/hda/patch_si3054.c => hda/codecs/si3054.c} (100%)
>>> create mode 100644 sound/hda/codecs/side-codecs/Kconfig
>>> create mode 100644 sound/hda/codecs/side-codecs/Makefile
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cirrus_scodec.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cirrus_scodec.h (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cirrus_scodec_test.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l41_hda.c (99%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l41_hda.h (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l41_hda_i2c.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l41_hda_property.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l41_hda_property.h (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l41_hda_spi.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l56_hda.c (99%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l56_hda.h (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l56_hda_i2c.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/cs35l56_hda_spi.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/hda_component.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/hda_component.h (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/tas2781_hda.c (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/tas2781_hda.h (100%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/tas2781_hda_i2c.c (99%)
>>> rename sound/{pci/hda => hda/codecs/side-codecs}/tas2781_hda_spi.c (99%)
>>> rename sound/{pci/hda/patch_sigmatel.c => hda/codecs/sigmatel.c} (99%)
>>> rename sound/{pci/hda/patch_via.c => hda/codecs/via.c} (99%)
>>> delete mode 100644 sound/pci/hda/Makefile