ALSA: hda/tas2781: reset the amp before component_add
authorGergo Koteles <soyer@irl.hu>
Wed, 13 Dec 2023 23:49:20 +0000 (00:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:53 +0000 (17:01 +0100)
commit56e22123449cf0be89db7bbf7c4667eb9c6bb953
treed11891522138df3613a21db6128ef5091a355a8b
parentd94fad04a64b2a58157940ec7ab59d4ccd400a1c
ALSA: hda/tas2781: reset the amp before component_add

commit 315deab289924c83ab1ded50022e8db95d6e428b upstream.

Calling component_add starts loading the firmware, the callback function
writes the program to the amplifiers. If the module resets the
amplifiers after component_add, it happens that one of the amplifiers
does not work because the reset and program writing are interleaving.

Call tas2781_reset before component_add to ensure reliable
initialization.

Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/4d23bf58558e23ee8097de01f70f1eb8d9de2d15.1702511246.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/tas2781_hda_i2c.c