Skip to content

Commit 829e2a2

Browse files
committed
ALSA: hda/tas2781: Use correct endian conversion
The data conversion is done rather by a wrong function. We convert to BE32, not from BE32. Although the end result must be same, this was complained by the compiler. Fix the code again and align with another similar function tas2563_apply_calib() that does already right. Fixes: 3beddef ("ALSA: hda/tas2781: fix wrong calibrated data order") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent c286f20 commit 829e2a2

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
@@ -527,8 +527,8 @@ static void tas2781_apply_calib(struct tasdevice_priv *tas_priv)
527527

528528
for (i = 0; i < tas_priv->ndev; i++) {
529529
for (j = 0; j < CALIB_MAX; j++) {
530-
data = get_unaligned_be32(
531-
&tas_priv->cali_data.data[offset]);
530+
data = cpu_to_be32(
531+
*(uint32_t *)&tas_priv->cali_data.data[offset]);
532532
rc = tasdevice_dev_bulk_write(tas_priv, i,
533533
TASDEVICE_REG(0, page_array[j], rgno_array[j]),
534534
(unsigned char *)&data, 4);

0 commit comments

Comments
 (0)