mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
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: 5be27f1e3e
("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>
This commit is contained in:
parent
d94fad04a6
commit
56e2212344
1 changed files with 2 additions and 2 deletions
|
@ -674,14 +674,14 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
|
|||
|
||||
pm_runtime_put_autosuspend(tas_priv->dev);
|
||||
|
||||
tas2781_reset(tas_priv);
|
||||
|
||||
ret = component_add(tas_priv->dev, &tas2781_hda_comp_ops);
|
||||
if (ret) {
|
||||
dev_err(tas_priv->dev, "Register component failed: %d\n", ret);
|
||||
pm_runtime_disable(tas_priv->dev);
|
||||
goto err;
|
||||
}
|
||||
|
||||
tas2781_reset(tas_priv);
|
||||
err:
|
||||
if (ret)
|
||||
tas2781_hda_remove(&clt->dev);
|
||||
|
|
Loading…
Add table
Reference in a new issue