From: Takashi Iwai <tiwai@suse.de>
To: philippdev5396@outlook.de
Cc: Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
Baojun Xu <baojun.xu@ti.com>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Gergo Koteles <soyer@irl.hu>
Subject: Re: [PATCH] ALSA: hda/tas2781: clear cali_data.total_sz when calibration read fails
Date: Mon, 20 Jul 2026 20:49:34 +0200 [thread overview]
Message-ID: <87y0f5pkch.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260720-tas2781-calfix-v1-1-3a5fa6ad90bc@outlook.de>
On Mon, 20 Jul 2026 11:41:51 +0200,
Philipp Oster via B4 Relay wrote:
>
> From: Philipp Oster <philippdev5396@outlook.de>
>
> tas2563_save_calibration() assigns cali_data.total_sz before it reads the
> per-device calibration data from EFI, but its error paths return without
> clearing it again. cali_data.cali_reg_array is left all zero, because the
> function returns before the register addresses are assigned.
>
> On the first playback tasdev_load_calibrated_data() does
>
> if (!data || !cali_data->total_sz)
> return;
>
> which passes, since total_sz is still non-zero. It then issues five
> 4-byte bulk writes to p->r0_reg, p->r0_low_reg, p->invr0_reg, p->pow_reg
> and p->tlimit_reg, all of which are 0. Register 0 decodes to book 0 /
> page 0 / register 0x00, so the auto-incrementing block write zeroes
> registers 0x00 to 0x03. Register 0x03 is PB_CFG1, which holds AMP_LEVEL,
> so the amplifier gain is set to its minimum and the speaker stays silent.
>
> This is reproducible on a Lenovo Yoga 7 14ARB7 (two TAS2563 on I2C,
> ACPI INT8866) whose factory calibration was never written to UEFI, so the
> EFI read fails with EFI_NOT_FOUND. The two woofers driven by the
> amplifiers are silent while the tweeters driven directly by the ALC287
> play. Reading the amplifier registers over i2c shows PWR_CTL = 0x00
> (active) and the TDM slots correctly programmed by the RCA profile, but
> PB_CFG1 = 0x00. With this change PB_CFG1 keeps its power-on default of
> 0x20 and both woofers play.
>
> tas2781_save_calibration() in tas2781_hda.c already clears total_sz on
> failure; do the same for the TAS2563 variant.
>
> Signed-off-by: Philipp Oster <philippdev5396@outlook.de>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-07-20 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 9:41 [PATCH] ALSA: hda/tas2781: clear cali_data.total_sz when calibration read fails Philipp Oster via B4 Relay
2026-07-20 18:49 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y0f5pkch.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=baojun.xu@ti.com \
--cc=kevin-lu@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=philippdev5396@outlook.de \
--cc=shenghao-ding@ti.com \
--cc=soyer@irl.hu \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox