Skip to content

Commit 63ba348

Browse files
committed
ALSA: hda: tas2781: fix tas2563 EFI data endianness
JIRA: https://issues.redhat.com/browse/RHEL-112755 commit e5a00da Author: Gergo Koteles <soyer@irl.hu> Date: Fri Aug 29 18:04:49 2025 +0200 ALSA: hda: tas2781: fix tas2563 EFI data endianness Before conversion to unify the calibration data management, the tas2563_apply_calib() function performed the big endian conversion and wrote the calibration data to the device. The writing is now done by the common tasdev_load_calibrated_data() function, but without conversion. Put the values into the calibration data buffer with the expected endianness. Fixes: 4fe2385 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib") Cc: <stable@vger.kernel.org> Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://patch.msgid.link/20250829160450.66623-1-soyer@irl.hu Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent 8d54d41 commit 63ba348

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
292292
struct cali_reg *r = &cd->cali_reg_array;
293293
unsigned int offset = 0;
294294
unsigned char *data;
295+
__be32 bedata;
295296
efi_status_t status;
296297
unsigned int attr;
297298
int ret, i, j, k;
@@ -333,6 +334,8 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
333334
i, j, status);
334335
return -EINVAL;
335336
}
337+
bedata = cpu_to_be32(*(uint32_t *)&data[offset]);
338+
memcpy(&data[offset], &bedata, sizeof(bedata));
336339
offset += TAS2563_CAL_DATA_SIZE;
337340
}
338341
}

0 commit comments

Comments
 (0)