diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-08-14 12:04:59 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-08-14 16:58:26 +0200 |
commit | 829e2a23121fb36ee30ea5145c2a85199f68e2c8 (patch) | |
tree | e0cc03ed35e7034cb6f1ab852fde308e7c23a471 /sound | |
parent | ALSA: usb-audio: Support Yamaha P-125 quirk entry (diff) | |
download | linux-829e2a23121fb36ee30ea5145c2a85199f68e2c8.tar.xz linux-829e2a23121fb36ee30ea5145c2a85199f68e2c8.zip |
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: 3beddef84d90 ("ALSA: hda/tas2781: fix wrong calibrated data order")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408141630.DiDUB8Z4-lkp@intel.com/
Link: https://patch.msgid.link/20240814100500.1944-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/tas2781_hda_i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 7dbfc92d9d55..89d8235537cd 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -527,8 +527,8 @@ static void tas2781_apply_calib(struct tasdevice_priv *tas_priv) for (i = 0; i < tas_priv->ndev; i++) { for (j = 0; j < CALIB_MAX; j++) { - data = get_unaligned_be32( - &tas_priv->cali_data.data[offset]); + data = cpu_to_be32( + *(uint32_t *)&tas_priv->cali_data.data[offset]); rc = tasdevice_dev_bulk_write(tas_priv, i, TASDEVICE_REG(0, page_array[j], rgno_array[j]), (unsigned char *)&data, 4); |