mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* ALSA: hda/cs35l56: same calibration condition logged at dev_info() and dev_err()
@ 2026-09-14  0:03 Navon John Lukose
  2026-09-14 10:09 ` Richard Fitzgerald
  0 siblings, 1 reply; 3+ messages in thread
From: Navon John Lukose @ 2026-09-14  0:03 UTC (permalink / raw)
  To: rf, david.rhodes; +Cc: broonie, tiwai, linux-sound, patches, linux-kernel

Documentation/sound/codecs/cs35l56.rst says "Failed to write calibration"
has the "same meaning and cause as 'Calibration disabled due to missing
firmware controls'". The latter is a dev_info(). The former is a dev_warn()
with a dev_err() from cs_amp_write_cal_coeff() ahead of it.

Rebinding the HDA components without re-probing the i2c driver takes the
loud path, 4 of 4 attempts here:

    cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Failed to write to 'CAL_R': -1
    cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Failed to write calibration: -1

list_empty() is false because the controls cs_dsp_power_down() disabled at
unbind are still on ctl_list, so the dev_info() branch is skipped.

The calibration is intact. CAL_CHECKSUM, CAL_STATUS, CAL_R and CAL_AMBIENT
in DSP YM are unchanged across a failing rebind on both amps. On a speaker
amplifier "Failed to write calibration" reads as a protection failure.

I lost around 5 hours chasing this down, believing this to be an actual
bug.

Lenovo Yoga Pro 7 14IAH10 (83KF), kernel 7.2.4, two CS35L56 B0 on I2C
behind CSC3556:00 over the HDA link.

Assisted-by: LLM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ALSA: hda/cs35l56: same calibration condition logged at dev_info() and dev_err()
  2026-09-14  0:03 ALSA: hda/cs35l56: same calibration condition logged at dev_info() and dev_err() Navon John Lukose
@ 2026-09-14 10:09 ` Richard Fitzgerald
  2026-09-14 13:41   ` Navon John Lukose
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Fitzgerald @ 2026-09-14 10:09 UTC (permalink / raw)
  To: Navon John Lukose, david.rhodes
  Cc: broonie, tiwai, linux-sound, patches, linux-kernel

On 14/09/2026 1:03 am, Navon John Lukose wrote:
> Documentation/sound/codecs/cs35l56.rst says "Failed to write calibration"
> has the "same meaning and cause as 'Calibration disabled due to missing
> firmware controls'". The latter is a dev_info(). The former is a dev_warn()
> with a dev_err() from cs_amp_write_cal_coeff() ahead of it.

The documentation is giving advice about the *typical causes* of the
errors that can usually by fixed by the end user (like missing
firmware). However, I can reword this to say that in most cases they
indicate the same problem, though not necessarily.

The former is a dev_warn() because the driver attempted to do something
that should succeed, but it unexpectedly failed (though is not a fatal
error).

The latter is a dev_info() because the driver skipped doing something
that would fail, and is informing that it has skipped.

For most users, in most cases, the root cause will be one of the two
listed in the documentation:

  * The driver did not find a suitable wmfw for this hardware
or
  * The amplifier has already been patched with firmware by something
    previously

> Rebinding the HDA components without re-probing the i2c driver takes the
> loud path, 4 of 4 attempts here:
> 
>      cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Failed to write to 'CAL_R': -1
>      cs35l56-hda i2c-CSC3556:00-cs35l56-hda.0: Failed to write calibration: -1
> 
> list_empty() is false because the controls cs_dsp_power_down() disabled at
> unbind are still on ctl_list, so the dev_info() branch is skipped.
> 
> The calibration is intact. CAL_CHECKSUM, CAL_STATUS, CAL_R and CAL_AMBIENT
> in DSP YM are unchanged across a failing rebind on both amps. On a speaker
> amplifier "Failed to write calibration" reads as a protection failure.

This is the second possible cause listed in the documentation:

   * The amplifier has already been patched with firmware by something
     previously

> I lost around 5 hours chasing this down, believing this to be an actual
> bug.

Warnings are warnings. They don't mean there is a bug in the code.
Some interpretation of the meaning is usually required, and AI isn't
always good at doing this.

The documentation does say that you can get this warning if the
firmware was already patched.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ALSA: hda/cs35l56: same calibration condition logged at dev_info() and dev_err()
  2026-09-14 10:09 ` Richard Fitzgerald
@ 2026-09-14 13:41   ` Navon John Lukose
  0 siblings, 0 replies; 3+ messages in thread
From: Navon John Lukose @ 2026-09-14 13:41 UTC (permalink / raw)
  To: rf, david.rhodes
  Cc: Navon John Lukose, broonie, tiwai, linux-sound, patches, linux-kernel

On 14/09/2026 11:09 am, Richard Fitzgerald wrote:
> However, I can reword this to say that in most cases they
> indicate the same problem, though not necessarily.

That covers it, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-14 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14  0:03 ALSA: hda/cs35l56: same calibration condition logged at dev_info() and dev_err() Navon John Lukose
2026-09-14 10:09 ` Richard Fitzgerald
2026-09-14 13:41   ` Navon John Lukose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®