Skip to content

Commit 315deab

Browse files
soyersoyertiwai
authored andcommitted
ALSA: hda/tas2781: reset the amp before component_add
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: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver") CC: [email protected] Signed-off-by: Gergo Koteles <[email protected]> Link: https://lore.kernel.org/r/4d23bf58558e23ee8097de01f70f1eb8d9de2d15.1702511246.git.soyer@irl.hu Signed-off-by: Takashi Iwai <[email protected]>
1 parent 6c6fa26 commit 315deab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,14 +674,14 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
674674

675675
pm_runtime_put_autosuspend(tas_priv->dev);
676676

677+
tas2781_reset(tas_priv);
678+
677679
ret = component_add(tas_priv->dev, &tas2781_hda_comp_ops);
678680
if (ret) {
679681
dev_err(tas_priv->dev, "Register component failed: %d\n", ret);
680682
pm_runtime_disable(tas_priv->dev);
681-
goto err;
682683
}
683684

684-
tas2781_reset(tas_priv);
685685
err:
686686
if (ret)
687687
tas2781_hda_remove(&clt->dev);

0 commit comments

Comments
 (0)