linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: HariKrishna Sagala <hariconscious@gmail.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com,  kuninori.morimoto.gx@renesas.com
Cc: shuah@kernel.org, david.hunter.linux@gmail.com,
	 linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC] ASoC: soc-core: proposal to remove num_auto_selectable_formats from snd_soc_dai_ops
Date: Fri, 31 Oct 2025 10:26:02 +0530 (IST)	[thread overview]
Message-ID: <2daa603f-13fe-c803-17fc-4fdd8e5723ba@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

Hi,

Good day.
I’d like to propose a small cleanup and simplification in the
snd_soc_dai_ops structure by removing the
"num_auto_selectable_formats" parameter.

Context:
Currently,snd_soc_dai_ops includes the "num_auto_selectable_formats"
field to indicate the number of entries in the "auto_selectable_formats"
array.However, this count can be derived programmatically using the
ARRAY_SIZE() macro wherever needed.

Proposal:
Remove the "num_auto_selectable_formats" field from the
snd_soc_dai_ops structure.Replace usage references to this field with
ARRAY_SIZE(auto_selectable_formats) in the relevant code paths.

One effect I see is if the parameter "auto_selectable_formats" has
only one priority format because few codecs are defined as a u64
variable,will correct and prepare a patch.

Please provide suggestions, objections and also to consider any
compatibility problems,historic importance of same.

If there are no objections, I would like to prepare a patch for
the same.

Thanks.

Regards,
HariKrishna.

             reply	other threads:[~2025-10-31  4:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31  4:56 HariKrishna Sagala [this message]
2025-10-31  6:58 ` [RFC] ASoC: soc-core: proposal to remove num_auto_selectable_formats from snd_soc_dai_ops Kuninori Morimoto
2025-10-31 14:15   ` harikrishna

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=2daa603f-13fe-c803-17fc-4fdd8e5723ba@gmail.com \
    --to=hariconscious@gmail.com \
    --cc=broonie@kernel.org \
    --cc=david.hunter.linux@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).