Re: [PATCH 0/3] ALSA: hda: Separate codec read status from response

From: Takashi Iwai

Date: Thu Dec 03 2026 - 12:34:01 EST


On Thu, 03 Dec 2026 18:04:59 +0100,
Sreeraj S Kurup wrote:
>
> Hi,
>
> This series improves error handling in the HDA codec command and read
> APIs.
>
> Currently, snd_hdac_make_cmd() returns an unsigned int and uses -1 to
> indicate an invalid command. Since -1 is converted to 0xffffffff,
> which can also represent a valid encoded HDA command, callers cannot
> reliably distinguish an error from a valid command.
>
> This series changes snd_hdac_make_cmd() to return an integer status
> and provide the encoded command through an output parameter. It also
> updates snd_hdac_codec_read() to return an integer status and provide
> the codec response through an output parameter.
>
> The affected callers in the HDA core and ASoC HDMI codec driver are
> updated to use the new API and handle errors appropriately.
>
> Patch overview:
>
> 1. ALSA: hda: core: Fix command creation error handling
> 2. ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers
> 3. ASoC: codecs: hdac_hdmi: Update codec read API callers
>
> Patches 2 and 3 depend on the API changes introduced in patch 1.

You can't do it in that way. Each patch (commit) must not break
builds.


Takashi