* [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8)
@ 2026-10-27 22:18 Cristian Castellano
0 siblings, 0 replies; 6+ messages in thread
From: Cristian Castellano @ 2026-10-27 22:18 UTC (permalink / raw)
To: med.jebabli, tiwai; +Cc: linux-sound, regressions, stable
Hello, since I updated to 7.2.11 (and then to 7.3), opening a playback stream on my Lenovo Yoga Pro 9
16IRP8 (83BY, subsystem 17aa:3835, BIOS KVCN44WW) triggers a divide error in snd_soc_tas2781_fmwlib and audio stops working. 7.2.9 just works.
The only tas2781 change between the two I found is:
c1b708f712f5 ("ALSA: hda/tas2781: Accept V1 calibration data without CRC") (upstream 408249089c48).
At boot the driver now logs:
tas2781-hda i2c-TIAS2781:00: tas2781_apply_calib: V1 data without CRC, accepting
Before that commit the data was rejected and the amplifiers worked with
default parameters. On this machine the CALI_DATA EFI variable
(CALI_DATA-1f52d2a1-bb3a-457d-bc09-43a3f4310a92) contains two non-zero
device entries followed by zeros, with TimeStamp and CRC zeroed:
0000000 07 00 00 00 5c c8 20 1d 28 b5 27 23 2a 79 42 16
0000016 f2 07 c5 00 00 00 e0 2e 01 f7 2a 1d 72 6f 1b 23
0000032 2a 41 4a 16 c4 0a c3 00 00 00 e0 2e 00 00 00 00
0000048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000128 00 00 00 00
(the first 4 bytes are the EFI attributes)
Oops:
Oops: divide error: 0000 [#1] SMP NOPTI
CPU: 10 UID: 1000 PID: 1533 Comm: wireplumber Tainted: G W O 7.3.0-4-cachyos #1 PREEMPT(full)
Hardware name: LENOVO 83BY/LNVNB161216, BIOS KVCN44WW 03/05/2025
RIP: 0010:tasdevice_select_tuningprm_cfg+0x8c2/0xa90 [snd_soc_tas2781_fmwlib]
Code: 4c 89 f7 41 b8 04 00 00 00 2e 2e 2e 41 ff d3 85 c0 0f 88 97 01 00 00 48 8b 4c 24 10 66 0f 38 f0 01 0f b7 c0 0f af 44 24 18 99 <f7> 7c 24 24 88 21 88 41 01 c6 41 08 01 48 8b 4c 24 08 48 8b 44 24
RAX: 0000000000000000 RBX: 000000000000002a RCX: ffff8d36ca8af218
RDX: 0000000000000000 RSI: 0000000000000db8 RDI: ffff8d36ca8af21b
RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000000000a
R10: 0000000000000100 R11: ffffffff87559290 R12: ffff8d3684e350df
R13: ffff8d36a861d9b8 R14: ffff8d3684e35038 R15: 0000000000000002
Call Trace:
<TASK>
tasdevice_tuning_switch+0x71/0x80 [snd_soc_tas2781_fmwlib]
tas2781_hda_playback_hook+0x4c/0x110 [snd_hda_scodec_tas2781_i2c]
hda_component_manager_playback_hook+0xb5/0x370 [snd_hda_scodec_component]
playback_pcm_open+0x79/0xa0 [snd_hda_codec_generic]
hdac_hda_dai_open+0x5c/0x90 [snd_soc_hdac_hda]
snd_soc_dai_startup+0x52/0x90 [snd_soc_core]
__soc_pcm_open+0x108/0x6c0 [snd_soc_core]
dpcm_be_dai_startup+0x153/0x3c0 [snd_soc_core]
dpcm_fe_dai_open+0x109/0xc00 [snd_soc_core]
snd_pcm_open_substream+0x604/0x920 [snd_pcm]
snd_pcm_open+0xeb/0x220 [snd_pcm]
snd_pcm_playback_open+0x39/0x60 [snd_pcm]
chrdev_open+0xbf/0x230
vfs_open+0x3f8/0x520
path_openat+0x4f4/0xc50
do_file_open+0xd7/0x150
do_syscall_64+0x8f/0x380
entry_SYSCALL_64_after_hwframe+0x76/0x7e
</TASK>
The kernel is linux-cachyos 7.3 (taint O is from the NVIDIA module);
CachyOS does not patch the tas2781 driver, and its LTS, 6.18.55 works. If it is needed, I can test patches.
#regzbot introduced: 408249089c48
Thank you,
Cristian Castellano
^ permalink raw reply [flat|nested] 6+ messages in thread
* [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8)
@ 2026-10-27 22:21 Cristian Castellano
2026-11-02 11:35 ` Thorsten Leemhuis
2026-11-02 14:43 ` Takashi Iwai
0 siblings, 2 replies; 6+ messages in thread
From: Cristian Castellano @ 2026-10-27 22:21 UTC (permalink / raw)
To: med.jebabli, tiwai; +Cc: linux-sound, regressions, stable
Hello, since I updated to 7.2.11 (and then to 7.3), opening a playback stream on my Lenovo Yoga Pro 9
16IRP8 (83BY, subsystem 17aa:3835, BIOS KVCN44WW) triggers a divide error in snd_soc_tas2781_fmwlib and audio stops working. 7.2.9 just works.
The only tas2781 change between the two I found is:
c1b708f712f5 ("ALSA: hda/tas2781: Accept V1 calibration data without CRC") (upstream 408249089c48).
At boot the driver now logs:
tas2781-hda i2c-TIAS2781:00: tas2781_apply_calib: V1 data without CRC, accepting
Before that commit the data was rejected and the amplifiers worked with
default parameters. On this machine the CALI_DATA EFI variable
(CALI_DATA-1f52d2a1-bb3a-457d-bc09-43a3f4310a92) contains two non-zero
device entries followed by zeros, with TimeStamp and CRC zeroed:
0000000 07 00 00 00 5c c8 20 1d 28 b5 27 23 2a 79 42 16
0000016 f2 07 c5 00 00 00 e0 2e 01 f7 2a 1d 72 6f 1b 23
0000032 2a 41 4a 16 c4 0a c3 00 00 00 e0 2e 00 00 00 00
0000048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000128 00 00 00 00
(the first 4 bytes are the EFI attributes)
Oops:
Oops: divide error: 0000 [#1] SMP NOPTI
CPU: 10 UID: 1000 PID: 1533 Comm: wireplumber Tainted: G W O 7.3.0-4-cachyos #1 PREEMPT(full)
Hardware name: LENOVO 83BY/LNVNB161216, BIOS KVCN44WW 03/05/2025
RIP: 0010:tasdevice_select_tuningprm_cfg+0x8c2/0xa90 [snd_soc_tas2781_fmwlib]
Code: 4c 89 f7 41 b8 04 00 00 00 2e 2e 2e 41 ff d3 85 c0 0f 88 97 01 00 00 48 8b 4c 24 10 66 0f 38 f0 01 0f b7 c0 0f af 44 24 18 99 <f7> 7c 24 24 88 21 88 41 01 c6 41 08 01 48 8b 4c 24 08 48 8b 44 24
RAX: 0000000000000000 RBX: 000000000000002a RCX: ffff8d36ca8af218
RDX: 0000000000000000 RSI: 0000000000000db8 RDI: ffff8d36ca8af21b
RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000000000a
R10: 0000000000000100 R11: ffffffff87559290 R12: ffff8d3684e350df
R13: ffff8d36a861d9b8 R14: ffff8d3684e35038 R15: 0000000000000002
Call Trace:
<TASK>
tasdevice_tuning_switch+0x71/0x80 [snd_soc_tas2781_fmwlib]
tas2781_hda_playback_hook+0x4c/0x110 [snd_hda_scodec_tas2781_i2c]
hda_component_manager_playback_hook+0xb5/0x370 [snd_hda_scodec_component]
playback_pcm_open+0x79/0xa0 [snd_hda_codec_generic]
hdac_hda_dai_open+0x5c/0x90 [snd_soc_hdac_hda]
snd_soc_dai_startup+0x52/0x90 [snd_soc_core]
__soc_pcm_open+0x108/0x6c0 [snd_soc_core]
dpcm_be_dai_startup+0x153/0x3c0 [snd_soc_core]
dpcm_fe_dai_open+0x109/0xc00 [snd_soc_core]
snd_pcm_open_substream+0x604/0x920 [snd_pcm]
snd_pcm_open+0xeb/0x220 [snd_pcm]
snd_pcm_playback_open+0x39/0x60 [snd_pcm]
chrdev_open+0xbf/0x230
vfs_open+0x3f8/0x520
path_openat+0x4f4/0xc50
do_file_open+0xd7/0x150
do_syscall_64+0x8f/0x380
entry_SYSCALL_64_after_hwframe+0x76/0x7e
</TASK>
The kernel is linux-cachyos 7.3 (taint O is from the NVIDIA module);
CachyOS does not patch the tas2781 driver, and its LTS, 6.18.55 works. If it is needed, I can test patches.
#regzbot introduced: 408249089c48
Thank you,
Cristian Castellano
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8)
2026-10-27 22:21 [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8) Cristian Castellano
@ 2026-11-02 11:35 ` Thorsten Leemhuis
2026-11-03 9:44 ` Mohamed Yassine JEBABLI
2026-11-03 9:52 ` Mohamed Yassine JEBABLI
2026-11-02 14:43 ` Takashi Iwai
1 sibling, 2 replies; 6+ messages in thread
From: Thorsten Leemhuis @ 2026-11-02 11:35 UTC (permalink / raw)
To: med.jebabli, tiwai; +Cc: linux-sound, Cristian Castellano, regressions, stable
On 10/27/26 23:21, Cristian Castellano wrote:
> Hello, since I updated to 7.2.11 (and then to 7.3), opening a
> playback stream on my Lenovo Yoga Pro 9 16IRP8 (83BY, subsystem
> 17aa:3835, BIOS KVCN44WW) triggers a divide error in
> snd_soc_tas2781_fmwlib and audio stops working. 7.2.9 just works.
>
> The only tas2781 change between the two I found is: c1b708f712f5
> ("ALSA: hda/tas2781: Accept V1 calibration data without CRC")
> (upstream 408249089c48).
Mohamed Yassine Jebabli: have you seen this? It's a change of yours that
causes this problem.
Cristian: can you maybe try if reverting that patch fixes things for
you? That we know that this is a option in case no fix comes into reach
soon.
Ideally please test vanilla Linux, ideally mainline? CachyOS might not
modify this drivers code, but occasionally changes in lower levels an
cause trouble (but I doubt that is the case here).
Ciao, Thorsten
> At boot the driver now logs:
>
> tas2781-hda i2c-TIAS2781:00: tas2781_apply_calib: V1 data without
> CRC, accepting
>
> Before that commit the data was rejected and the amplifiers worked
> with default parameters. On this machine the CALI_DATA EFI variable
> (CALI_DATA-1f52d2a1-bb3a-457d-bc09-43a3f4310a92) contains two non-zero
> device entries followed by zeros, with TimeStamp and CRC zeroed:
>
> 0000000 07 00 00 00 5c c8 20 1d 28 b5 27 23 2a 79 42 16
> 0000016 f2 07 c5 00 00 00 e0 2e 01 f7 2a 1d 72 6f 1b 23
> 0000032 2a 41 4a 16 c4 0a c3 00 00 00 e0 2e 00 00 00 00
> 0000048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> *
> 0000128 00 00 00 00
>
> (the first 4 bytes are the EFI attributes)
>
> Oops:
>
> Oops: divide error: 0000 [#1] SMP NOPTI
> CPU: 10 UID: 1000 PID: 1533 Comm: wireplumber Tainted: G W O 7.3.0-4-cachyos #1 PREEMPT(full)
> Hardware name: LENOVO 83BY/LNVNB161216, BIOS KVCN44WW 03/05/2025
> RIP: 0010:tasdevice_select_tuningprm_cfg+0x8c2/0xa90 [snd_soc_tas2781_fmwlib]
> Code: 4c 89 f7 41 b8 04 00 00 00 2e 2e 2e 41 ff d3 85 c0 0f 88 97 01 00 00 48 8b 4c 24 10 66 0f 38 f0 01 0f b7 c0 0f af 44 24 18 99 <f7> 7c 24 24 88 21 88 41 01 c6 41 08 01 48 8b 4c 24 08 48 8b 44 24
> RAX: 0000000000000000 RBX: 000000000000002a RCX: ffff8d36ca8af218
> RDX: 0000000000000000 RSI: 0000000000000db8 RDI: ffff8d36ca8af21b
> RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000000000a
> R10: 0000000000000100 R11: ffffffff87559290 R12: ffff8d3684e350df
> R13: ffff8d36a861d9b8 R14: ffff8d3684e35038 R15: 0000000000000002
> Call Trace:
> <TASK>
> tasdevice_tuning_switch+0x71/0x80 [snd_soc_tas2781_fmwlib]
> tas2781_hda_playback_hook+0x4c/0x110 [snd_hda_scodec_tas2781_i2c]
> hda_component_manager_playback_hook+0xb5/0x370 [snd_hda_scodec_component]
> playback_pcm_open+0x79/0xa0 [snd_hda_codec_generic]
> hdac_hda_dai_open+0x5c/0x90 [snd_soc_hdac_hda]
> snd_soc_dai_startup+0x52/0x90 [snd_soc_core]
> __soc_pcm_open+0x108/0x6c0 [snd_soc_core]
> dpcm_be_dai_startup+0x153/0x3c0 [snd_soc_core]
> dpcm_fe_dai_open+0x109/0xc00 [snd_soc_core]
> snd_pcm_open_substream+0x604/0x920 [snd_pcm]
> snd_pcm_open+0xeb/0x220 [snd_pcm]
> snd_pcm_playback_open+0x39/0x60 [snd_pcm]
> chrdev_open+0xbf/0x230
> vfs_open+0x3f8/0x520
> path_openat+0x4f4/0xc50
> do_file_open+0xd7/0x150
> do_syscall_64+0x8f/0x380
> entry_SYSCALL_64_after_hwframe+0x76/0x7e
> </TASK>
>
> The kernel is linux-cachyos 7.3 (taint O is from the NVIDIA module);
> CachyOS does not patch the tas2781 driver, and its LTS, 6.18.55
> works. If it is needed, I can test patches.
>
> #regzbot introduced: 408249089c48
>
> Thank you,
> Cristian Castellano
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8)
2026-10-27 22:21 [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8) Cristian Castellano
2026-11-02 11:35 ` Thorsten Leemhuis
@ 2026-11-02 14:43 ` Takashi Iwai
1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2026-11-02 14:43 UTC (permalink / raw)
To: Cristian Castellano; +Cc: med.jebabli, tiwai, linux-sound, regressions, stable
On Tue, 27 Oct 2026 23:21:57 +0100,
Cristian Castellano wrote:
>
> Hello, since I updated to 7.2.11 (and then to 7.3), opening a playback stream on my Lenovo Yoga Pro 9
> 16IRP8 (83BY, subsystem 17aa:3835, BIOS KVCN44WW) triggers a divide error in snd_soc_tas2781_fmwlib and audio stops working. 7.2.9 just works.
>
> The only tas2781 change between the two I found is:
> c1b708f712f5 ("ALSA: hda/tas2781: Accept V1 calibration data without CRC") (upstream 408249089c48).
>
> At boot the driver now logs:
>
> tas2781-hda i2c-TIAS2781:00: tas2781_apply_calib: V1 data without CRC, accepting
>
> Before that commit the data was rejected and the amplifiers worked with
> default parameters. On this machine the CALI_DATA EFI variable
> (CALI_DATA-1f52d2a1-bb3a-457d-bc09-43a3f4310a92) contains two non-zero
> device entries followed by zeros, with TimeStamp and CRC zeroed:
>
> 0000000 07 00 00 00 5c c8 20 1d 28 b5 27 23 2a 79 42 16
> 0000016 f2 07 c5 00 00 00 e0 2e 01 f7 2a 1d 72 6f 1b 23
> 0000032 2a 41 4a 16 c4 0a c3 00 00 00 e0 2e 00 00 00 00
> 0000048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> *
> 0000128 00 00 00 00
>
> (the first 4 bytes are the EFI attributes)
>
> Oops:
>
> Oops: divide error: 0000 [#1] SMP NOPTI
> CPU: 10 UID: 1000 PID: 1533 Comm: wireplumber Tainted: G W O 7.3.0-4-cachyos #1 PREEMPT(full)
> Hardware name: LENOVO 83BY/LNVNB161216, BIOS KVCN44WW 03/05/2025
> RIP: 0010:tasdevice_select_tuningprm_cfg+0x8c2/0xa90 [snd_soc_tas2781_fmwlib]
> Code: 4c 89 f7 41 b8 04 00 00 00 2e 2e 2e 41 ff d3 85 c0 0f 88 97 01 00 00 48 8b 4c 24 10 66 0f 38 f0 01 0f b7 c0 0f af 44 24 18 99 <f7> 7c 24 24 88 21 88 41 01 c6 41 08 01 48 8b 4c 24 08 48 8b 44 24
> RAX: 0000000000000000 RBX: 000000000000002a RCX: ffff8d36ca8af218
> RDX: 0000000000000000 RSI: 0000000000000db8 RDI: ffff8d36ca8af21b
> RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000000000a
> R10: 0000000000000100 R11: ffffffff87559290 R12: ffff8d3684e350df
> R13: ffff8d36a861d9b8 R14: ffff8d3684e35038 R15: 0000000000000002
> Call Trace:
> <TASK>
> tasdevice_tuning_switch+0x71/0x80 [snd_soc_tas2781_fmwlib]
> tas2781_hda_playback_hook+0x4c/0x110 [snd_hda_scodec_tas2781_i2c]
> hda_component_manager_playback_hook+0xb5/0x370 [snd_hda_scodec_component]
> playback_pcm_open+0x79/0xa0 [snd_hda_codec_generic]
> hdac_hda_dai_open+0x5c/0x90 [snd_soc_hdac_hda]
> snd_soc_dai_startup+0x52/0x90 [snd_soc_core]
> __soc_pcm_open+0x108/0x6c0 [snd_soc_core]
> dpcm_be_dai_startup+0x153/0x3c0 [snd_soc_core]
> dpcm_fe_dai_open+0x109/0xc00 [snd_soc_core]
> snd_pcm_open_substream+0x604/0x920 [snd_pcm]
> snd_pcm_open+0xeb/0x220 [snd_pcm]
> snd_pcm_playback_open+0x39/0x60 [snd_pcm]
> chrdev_open+0xbf/0x230
> vfs_open+0x3f8/0x520
> path_openat+0x4f4/0xc50
> do_file_open+0xd7/0x150
> do_syscall_64+0x8f/0x380
> entry_SYSCALL_64_after_hwframe+0x76/0x7e
> </TASK>
>
> The kernel is linux-cachyos 7.3 (taint O is from the NVIDIA module);
> CachyOS does not patch the tas2781 driver, and its LTS, 6.18.55 works. If it is needed, I can test patches.
>
> #regzbot introduced: 408249089c48
>
> Thank you,
> Cristian Castellano
I guess the following oneliner would prevent the zero-division.
But I'm not sure whether the whole calibration there would make sense
and works properly. Could you verify it?
Maybe we should make the check of V1 CRC error more restrictive.
thanks,
Takashi
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -2579,7 +2579,7 @@ static int tas2781_cali_preproc(struct tasdevice_priv *priv, int i)
*/
re_org = r0_deflt[0] << 8 | r0_deflt[1];
re_cal = data[k + 1] << 8 | data[k + 2];
- if (re_org > re_cal) {
+ if (re_cal && re_org > re_cal) {
rc = tasdevice_dev_read(priv, i, TAS2781_PG_REG,
&pg_id);
if (rc < 0) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8)
2026-11-02 11:35 ` Thorsten Leemhuis
@ 2026-11-03 9:44 ` Mohamed Yassine JEBABLI
2026-11-03 9:52 ` Mohamed Yassine JEBABLI
1 sibling, 0 replies; 6+ messages in thread
From: Mohamed Yassine JEBABLI @ 2026-11-03 9:44 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: tiwai, linux-sound, Cristian Castellano, regressions, stable
Hi Cristian, Thorsten, Takashi,
Sorry for the breakage, and thanks for the detailed report.
The two populated entries in the dump are valid (R0 = 3.64/3.65 ohm,
1/R0 consistent), so I suspect p->ndev is larger than 2 on this
machine: the V1 loop then converts all-zero entries for the remaining
devices, and tas2781_cali_preproc() divides by re_cal == 0. My patch
only checked the first entry, which was not enough.
Fix posted here, Cristian please give it a try:
https://lore.kernel.org/all/4e500063-d985-46b6-a0a1-3feaa77c4b2f@leemhuis.info/
Takashi's re_cal check looks like a good additional safeguard.
Thanks,
Mohamed Yassine JEBABLI
Tel : +33 77 38 91 074
Boulogne Billancourt - PARIS
Mohamed Yassine JEBABLI
Tel : +33 77 38 91 074
Boulogne Billancourt - PARIS
Le lun. 2 nov. 2026 à 12:36, Thorsten Leemhuis
<regressions@leemhuis.info> a écrit :
>
> On 10/27/26 23:21, Cristian Castellano wrote:
> > Hello, since I updated to 7.2.11 (and then to 7.3), opening a
> > playback stream on my Lenovo Yoga Pro 9 16IRP8 (83BY, subsystem
> > 17aa:3835, BIOS KVCN44WW) triggers a divide error in
> > snd_soc_tas2781_fmwlib and audio stops working. 7.2.9 just works.
> >
> > The only tas2781 change between the two I found is: c1b708f712f5
> > ("ALSA: hda/tas2781: Accept V1 calibration data without CRC")
> > (upstream 408249089c48).
>
> Mohamed Yassine Jebabli: have you seen this? It's a change of yours that
> causes this problem.
>
> Cristian: can you maybe try if reverting that patch fixes things for
> you? That we know that this is a option in case no fix comes into reach
> soon.
>
> Ideally please test vanilla Linux, ideally mainline? CachyOS might not
> modify this drivers code, but occasionally changes in lower levels an
> cause trouble (but I doubt that is the case here).
>
> Ciao, Thorsten
>
>
> > At boot the driver now logs:
> >
> > tas2781-hda i2c-TIAS2781:00: tas2781_apply_calib: V1 data without
> > CRC, accepting
> >
> > Before that commit the data was rejected and the amplifiers worked
> > with default parameters. On this machine the CALI_DATA EFI variable
> > (CALI_DATA-1f52d2a1-bb3a-457d-bc09-43a3f4310a92) contains two non-zero
> > device entries followed by zeros, with TimeStamp and CRC zeroed:
> >
> > 0000000 07 00 00 00 5c c8 20 1d 28 b5 27 23 2a 79 42 16
> > 0000016 f2 07 c5 00 00 00 e0 2e 01 f7 2a 1d 72 6f 1b 23
> > 0000032 2a 41 4a 16 c4 0a c3 00 00 00 e0 2e 00 00 00 00
> > 0000048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > *
> > 0000128 00 00 00 00
> >
> > (the first 4 bytes are the EFI attributes)
> >
> > Oops:
> >
> > Oops: divide error: 0000 [#1] SMP NOPTI
> > CPU: 10 UID: 1000 PID: 1533 Comm: wireplumber Tainted: G W O 7.3.0-4-cachyos #1 PREEMPT(full)
> > Hardware name: LENOVO 83BY/LNVNB161216, BIOS KVCN44WW 03/05/2025
> > RIP: 0010:tasdevice_select_tuningprm_cfg+0x8c2/0xa90 [snd_soc_tas2781_fmwlib]
> > Code: 4c 89 f7 41 b8 04 00 00 00 2e 2e 2e 41 ff d3 85 c0 0f 88 97 01 00 00 48 8b 4c 24 10 66 0f 38 f0 01 0f b7 c0 0f af 44 24 18 99 <f7> 7c 24 24 88 21 88 41 01 c6 41 08 01 48 8b 4c 24 08 48 8b 44 24
> > RAX: 0000000000000000 RBX: 000000000000002a RCX: ffff8d36ca8af218
> > RDX: 0000000000000000 RSI: 0000000000000db8 RDI: ffff8d36ca8af21b
> > RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000000000a
> > R10: 0000000000000100 R11: ffffffff87559290 R12: ffff8d3684e350df
> > R13: ffff8d36a861d9b8 R14: ffff8d3684e35038 R15: 0000000000000002
> > Call Trace:
> > <TASK>
> > tasdevice_tuning_switch+0x71/0x80 [snd_soc_tas2781_fmwlib]
> > tas2781_hda_playback_hook+0x4c/0x110 [snd_hda_scodec_tas2781_i2c]
> > hda_component_manager_playback_hook+0xb5/0x370 [snd_hda_scodec_component]
> > playback_pcm_open+0x79/0xa0 [snd_hda_codec_generic]
> > hdac_hda_dai_open+0x5c/0x90 [snd_soc_hdac_hda]
> > snd_soc_dai_startup+0x52/0x90 [snd_soc_core]
> > __soc_pcm_open+0x108/0x6c0 [snd_soc_core]
> > dpcm_be_dai_startup+0x153/0x3c0 [snd_soc_core]
> > dpcm_fe_dai_open+0x109/0xc00 [snd_soc_core]
> > snd_pcm_open_substream+0x604/0x920 [snd_pcm]
> > snd_pcm_open+0xeb/0x220 [snd_pcm]
> > snd_pcm_playback_open+0x39/0x60 [snd_pcm]
> > chrdev_open+0xbf/0x230
> > vfs_open+0x3f8/0x520
> > path_openat+0x4f4/0xc50
> > do_file_open+0xd7/0x150
> > do_syscall_64+0x8f/0x380
> > entry_SYSCALL_64_after_hwframe+0x76/0x7e
> > </TASK>
> >
> > The kernel is linux-cachyos 7.3 (taint O is from the NVIDIA module);
> > CachyOS does not patch the tas2781 driver, and its LTS, 6.18.55
> > works. If it is needed, I can test patches.
> >
> > #regzbot introduced: 408249089c48
> >
> > Thank you,
> > Cristian Castellano
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8)
2026-11-02 11:35 ` Thorsten Leemhuis
2026-11-03 9:44 ` Mohamed Yassine JEBABLI
@ 2026-11-03 9:52 ` Mohamed Yassine JEBABLI
1 sibling, 0 replies; 6+ messages in thread
From: Mohamed Yassine JEBABLI @ 2026-11-03 9:52 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: tiwai, linux-sound, Cristian Castellano, regressions, stable
Hi Cristian, Thorsten, Takashi,
(Resending as plain text, the previous mail was rejected by the
list and also pointed to the wrong link, sorry for the noise.)
Sorry for the breakage, and thanks for the detailed report.
The two populated entries in the dump are valid (R0 = 3.64/3.65 ohm,
1/R0 consistent), so I suspect p->ndev is larger than 2 on this
machine: the V1 loop then converts all-zero entries for the remaining
devices, and tas2781_cali_preproc() divides by re_cal == 0. My patch
only checked the first entry, which was not enough.
Fix posted here, Cristian please give it a try:
https://lore.kernel.org/all/20261103-tas2781-v1-nocrc-fix-v1-1-a769c27f21ce@gmail.com/
Takashi's re_cal check looks like a good additional safeguard.
Thanks,
Mohamed yassine JEBABLI
Le lun. 2 nov. 2026 à 12:36, Thorsten Leemhuis
<regressions@leemhuis.info> a écrit :
>
> On 10/27/26 23:21, Cristian Castellano wrote:
> > Hello, since I updated to 7.2.11 (and then to 7.3), opening a
> > playback stream on my Lenovo Yoga Pro 9 16IRP8 (83BY, subsystem
> > 17aa:3835, BIOS KVCN44WW) triggers a divide error in
> > snd_soc_tas2781_fmwlib and audio stops working. 7.2.9 just works.
> >
> > The only tas2781 change between the two I found is: c1b708f712f5
> > ("ALSA: hda/tas2781: Accept V1 calibration data without CRC")
> > (upstream 408249089c48).
>
> Mohamed Yassine Jebabli: have you seen this? It's a change of yours that
> causes this problem.
>
> Cristian: can you maybe try if reverting that patch fixes things for
> you? That we know that this is a option in case no fix comes into reach
> soon.
>
> Ideally please test vanilla Linux, ideally mainline? CachyOS might not
> modify this drivers code, but occasionally changes in lower levels an
> cause trouble (but I doubt that is the case here).
>
> Ciao, Thorsten
>
>
> > At boot the driver now logs:
> >
> > tas2781-hda i2c-TIAS2781:00: tas2781_apply_calib: V1 data without
> > CRC, accepting
> >
> > Before that commit the data was rejected and the amplifiers worked
> > with default parameters. On this machine the CALI_DATA EFI variable
> > (CALI_DATA-1f52d2a1-bb3a-457d-bc09-43a3f4310a92) contains two non-zero
> > device entries followed by zeros, with TimeStamp and CRC zeroed:
> >
> > 0000000 07 00 00 00 5c c8 20 1d 28 b5 27 23 2a 79 42 16
> > 0000016 f2 07 c5 00 00 00 e0 2e 01 f7 2a 1d 72 6f 1b 23
> > 0000032 2a 41 4a 16 c4 0a c3 00 00 00 e0 2e 00 00 00 00
> > 0000048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > *
> > 0000128 00 00 00 00
> >
> > (the first 4 bytes are the EFI attributes)
> >
> > Oops:
> >
> > Oops: divide error: 0000 [#1] SMP NOPTI
> > CPU: 10 UID: 1000 PID: 1533 Comm: wireplumber Tainted: G W O 7.3.0-4-cachyos #1 PREEMPT(full)
> > Hardware name: LENOVO 83BY/LNVNB161216, BIOS KVCN44WW 03/05/2025
> > RIP: 0010:tasdevice_select_tuningprm_cfg+0x8c2/0xa90 [snd_soc_tas2781_fmwlib]
> > Code: 4c 89 f7 41 b8 04 00 00 00 2e 2e 2e 41 ff d3 85 c0 0f 88 97 01 00 00 48 8b 4c 24 10 66 0f 38 f0 01 0f b7 c0 0f af 44 24 18 99 <f7> 7c 24 24 88 21 88 41 01 c6 41 08 01 48 8b 4c 24 08 48 8b 44 24
> > RAX: 0000000000000000 RBX: 000000000000002a RCX: ffff8d36ca8af218
> > RDX: 0000000000000000 RSI: 0000000000000db8 RDI: ffff8d36ca8af21b
> > RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000000000a
> > R10: 0000000000000100 R11: ffffffff87559290 R12: ffff8d3684e350df
> > R13: ffff8d36a861d9b8 R14: ffff8d3684e35038 R15: 0000000000000002
> > Call Trace:
> > <TASK>
> > tasdevice_tuning_switch+0x71/0x80 [snd_soc_tas2781_fmwlib]
> > tas2781_hda_playback_hook+0x4c/0x110 [snd_hda_scodec_tas2781_i2c]
> > hda_component_manager_playback_hook+0xb5/0x370 [snd_hda_scodec_component]
> > playback_pcm_open+0x79/0xa0 [snd_hda_codec_generic]
> > hdac_hda_dai_open+0x5c/0x90 [snd_soc_hdac_hda]
> > snd_soc_dai_startup+0x52/0x90 [snd_soc_core]
> > __soc_pcm_open+0x108/0x6c0 [snd_soc_core]
> > dpcm_be_dai_startup+0x153/0x3c0 [snd_soc_core]
> > dpcm_fe_dai_open+0x109/0xc00 [snd_soc_core]
> > snd_pcm_open_substream+0x604/0x920 [snd_pcm]
> > snd_pcm_open+0xeb/0x220 [snd_pcm]
> > snd_pcm_playback_open+0x39/0x60 [snd_pcm]
> > chrdev_open+0xbf/0x230
> > vfs_open+0x3f8/0x520
> > path_openat+0x4f4/0xc50
> > do_file_open+0xd7/0x150
> > do_syscall_64+0x8f/0x380
> > entry_SYSCALL_64_after_hwframe+0x76/0x7e
> > </TASK>
> >
> > The kernel is linux-cachyos 7.3 (taint O is from the NVIDIA module);
> > CachyOS does not patch the tas2781 driver, and its LTS, 6.18.55
> > works. If it is needed, I can test patches.
> >
> > #regzbot introduced: 408249089c48
> >
> > Thank you,
> > Cristian Castellano
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-03 9:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 22:21 [REGRESSION] ALSA: hda/tas2781: divide error on playback open after accepting V1 calibration data without CRC (Lenovo Yoga Pro 9 16IRP8) Cristian Castellano
2026-11-02 11:35 ` Thorsten Leemhuis
2026-11-03 9:44 ` Mohamed Yassine JEBABLI
2026-11-03 9:52 ` Mohamed Yassine JEBABLI
2026-11-02 14:43 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2026-10-27 22:18 Cristian Castellano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).