All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: HyeongJun An <sammiee5311@gmail.com>
Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	shuah@kernel.org, linux-sound@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] selftests/alsa: Test writes to IEC958 controls
Date: Sat, 12 Sep 2026 14:19:48 +0200	[thread overview]
Message-ID: <878q563bmj.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260912025430.2102149-1-sammiee5311@gmail.com>

On Sat, 12 Sep 2026 04:54:30 +0200,
HyeongJun An wrote:
> 
> Nothing checks that the put() callback of an IEC958 control reports a
> change, because write_valid skips these controls.
> 
> Where the device publishes a mask, toggle every bit in it and check each
> write.  A bit the mask advertises that does not stick fails the test, the
> way a rejected value fails for the other control types.
> 
> Where none is found, keep the old single guess at the non audio bit,
> which the device is free to ignore, so only the notification can be
> counted against it.  That path writes without checking so drop_events()
> clears what those writes leave behind.
> 
> On an HDA card with four HDMI PCMs the Con Mask is 0f ff, so each control
> walks eleven bits instead of one and all eleven stick:
> 
>   -# Totals: pass:212 fail:5 xfail:0 xpass:0 skip:56 error:0
>   +# Totals: pass:216 fail:5 xfail:0 xpass:0 skip:52 error:0
> 
> A driver whose put() never reports a change still shows up as
> event_missing.  hdmi-codec and img-spdif-out store every byte and return
> 0, so boards using them report one event_missing per walked bit, and
> hdmi-codec advertises the whole block so that is 191 of them.  A driver
> whose mask claims more than its put() keeps now fails write_valid
> outright: au88x0 and ice1712 on Delta 1010 and Mediastation advertise
> bytes they never store, cs46xx, oxygen and ice1724 advertise bits their
> put() drops, and the RME cards regenerate the whole emphasis field from
> one bit so the rest of it never reads back.  None of that hardware was
> to hand, the paths were read rather than run.
> 
> write_invalid stays a skip.  Every bit pattern is a valid channel status.
> 
> Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
> Assisted-by: Claude:claude-opus-5

Applied to for-next branch now.  Thanks.


Takashi

      parent reply	other threads:[~2026-09-12 12:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  2:19 [PATCH] selftests/alsa: Test writes to IEC958 controls HyeongJun An
2026-09-04 10:20 ` Mark Brown
2026-09-04 12:33 ` [PATCH v2] " HyeongJun An
2026-09-08 16:23   ` Mark Brown
2026-09-11 13:44     ` HyeongJun An
2026-09-11 15:08       ` Mark Brown
2026-09-12  2:54   ` [PATCH v3] " HyeongJun An
2026-09-12 10:45     ` Mark Brown
2026-09-12 12:19     ` 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=878q563bmj.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sammiee5311@gmail.com \
    --cc=shuah@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.