Patch "ALSA: hda/tas2781: Use correct endian conversion" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: hda/tas2781: Use correct endian conversion

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-hda-tas2781-use-correct-endian-conversion.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6030d4306f4dfb8ecf9a711dbbbc29a3e3f86d98
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Wed Aug 14 12:04:59 2024 +0200

    ALSA: hda/tas2781: Use correct endian conversion
    
    [ Upstream commit 829e2a23121fb36ee30ea5145c2a85199f68e2c8 ]
    
    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@xxxxxxxxx>
    Closes: https://lore.kernel.org/oe-kbuild-all/202408141630.DiDUB8Z4-lkp@xxxxxxxxx/
    Link: https://patch.msgid.link/20240814100500.1944-1-tiwai@xxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 1d4b044b78410..9e88d39eac1e2 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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux