ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.
authorStefan Binding <sbinding@opensource.cirrus.com>
Mon, 15 Mar 2021 19:07:16 +0000 (19:07 +0000)
committerTakashi Iwai <tiwai@suse.de>
Tue, 16 Mar 2021 07:19:47 +0000 (08:19 +0100)
commit7a114444af813ee35dbe0ef6d26ffb56b309549b
treedc41bbedd19b723f17c58f17b3c66ab0b0a34868
parent9f8de3b7d789693008b65a4849bc444e81fcfe5a
ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.

CS8409/CS42L42 Driver currently does most of the platform specific
setup inside the main body of the code, however, this setup can be
moved into fixup functions, to make the driver more generic.

Making the driver more generic, allows the driver to use the
cs_parse_auto_config function in the patch function. This function
forces all of the ADCs to be permanently powered, which means the
cap_sync_hook function is no longer needed to restart the stream, when
the jack has been ejected.

Since the codec is re-initialized on every init/resume, there is no
need to add specific verbs to be run on init, and instead these can
be combined with the initialization verbs, which are run on init.

In addition, the extra fixup verbs are no longer required, since this
is taken care of elsewhere.

Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500

[ Use fallthrough macro instead of comment -- tiwai ]

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210315190716.47686-5-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_cirrus.c