mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
To: perex@perex.cz, tiwai@suse.de, lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Subject: [PATCH 0/3] ALSA: hda: Separate codec read status from response
Date: Thu,  3 Dec 2026 17:04:59 +0000	[thread overview]
Message-ID: <20261203170741.3873-1-sreekuttan2156239@gmail.com> (raw)

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.

Please let me know if any changes are needed.

Thanks,
Sreeraj

Sreeraj S Kurup (3):
  ALSA: hda: core: Fix command creation error handling
  ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers
  ASoC: codecs: hdac_hdmi: Update codec read API callers

 include/sound/hdaudio.h      |  2 +-
 sound/hda/core/device.c      | 69 ++++++++++++++++++++++++----------
 sound/hda/core/hdmi_chmap.c  | 30 ++++++++++++---
 sound/soc/codecs/hdac_hdmi.c | 72 +++++++++++++++++++++++-------------
 4 files changed, 123 insertions(+), 50 deletions(-)

-- 
2.55.0


             reply	other threads:[~2026-12-03 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:04 Sreeraj S Kurup [this message]
2026-12-03 17:05 ` [PATCH 1/3] ALSA: hda: core: Fix command creation error handling Sreeraj S Kurup
2026-12-03 17:05 ` [PATCH 2/3] ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers Sreeraj S Kurup
2026-12-03 17:05 ` [PATCH 3/3] ASoC: codecs: hdac_hdmi: Update codec read API callers Sreeraj S Kurup
2026-12-03 17:33 ` [PATCH 0/3] ALSA: hda: Separate codec read status from response Takashi Iwai
2026-12-03 18:10   ` Sreeraj S Kurup
2026-12-03 18:31   ` Sreeraj S Kurup

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=20261203170741.3873-1-sreekuttan2156239@gmail.com \
    --to=sreekuttan2156239@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®