public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Stefan Binding <sbinding@opensource.cirrus.com>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH v1] ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients
Date: Wed, 31 Jul 2024 12:44:11 +0200	[thread overview]
Message-ID: <87v80lyh6s.wl-tiwai@suse.de> (raw)
In-Reply-To: <551e3be0-f436-4db1-ae5c-1ad5a31f68c3@perex.cz>

On Wed, 31 Jul 2024 12:36:19 +0200,
Jaroslav Kysela wrote:
> 
> On 31. 07. 24 12:30, Takashi Iwai wrote:
> > On Tue, 30 Jul 2024 16:55:19 +0200,
> > Jaroslav Kysela wrote:
> >> 
> >> On 30. 07. 24 16:37, Stefan Binding wrote:
> >>> Add a kernel parameter to allow coefficients to be exposed as ALSA controls.
> >>> 
> >>> When the CS35L41 loads its firmware, it has a number of controls to
> >>> affect its behaviour. Currently, these controls are exposed as ALSA
> >>> Controls by default.
> >>> 
> >>> However, nothing in userspace currently uses them, and is unlikely to
> >>> do so in the future, therefore we don't need to create ASLA controls
> >>> for them.
> >>> 
> >>> These controls can be useful for debug, so we can add a kernel
> >>> parameter to re-enable them if necessary.
> >>> 
> >>> Disabling these controls would prevent userspace from trying to read
> >>> these controls when the CS35L41 is hibernating, which ordinarily
> >>> would result in an error message.
> >> 
> >> This is probably not a right argument to add this code. The codec
> >> should be powered up when those controls are accessed or those
> >> controls should be cached by the driver.
> >> 
> >> Although the controls have not been used yet, exposing them in this
> >> way is not ideal.
> >> 
> >> Could you fix the driver (no I/O errors)?
> > 
> > While we should fix the potential errors at hibernation, it's not bad
> > to hide those controls, IMO.  For the normal use cases, it's nothing
> > but a cause of troubles, after all.
> 
> I do not think that the situation is so obvious. Different
> coefficients can be used in various UCM profiles for example.

If that's the supposed use-case, yes.
I doubt it, though, but this needs clarification from Cirrus people.

> But for debugging we have debugfs when the developer thinks that the
> feature is not useful for users. The module parameter solution is not
> good in my eyes.

Yeah, I believe we should disable it unconditionally, and provide a
different way like debugfs in the firmware driver side, too -- again,
if the exposure is only for debugging.


Takashi

      reply	other threads:[~2024-07-31 10:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240730143748.351651-1-sbinding@opensource.cirrus.com>
2024-07-30 14:55 ` [PATCH v1] ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients Jaroslav Kysela
2024-07-31 10:30   ` Takashi Iwai
2024-07-31 10:36     ` Jaroslav Kysela
2024-07-31 10:44       ` 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=87v80lyh6s.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=sbinding@opensource.cirrus.com \
    --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