All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ALSA: hda: Fix the control element identification for multiple codecs
Date: Wed, 01 Feb 2023 15:40:48 +0100	[thread overview]
Message-ID: <87ilglwirz.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230131094215.3545993-1-perex@perex.cz>

On Tue, 31 Jan 2023 10:42:15 +0100,
Jaroslav Kysela wrote:
> 
> Some motherboards have multiple HDA codecs connected to the serial bus.
> The current code may create multiple mixer controls with the almost
> identical identification.
> 
> The current code use id.device field from the control element structure
> to store the codec address to avoid such clashes for multiple codecs.
> Unfortunately, the user space do not handle this correctly. For mixer
> controls, only name and index are used for the identifiers.
> 
> This patch fixes this problem to compose the index using the codec
> address as an offset in case, when the control already exists. It is
> really unlikely that one codec will create 10 similar controls.
> 
> This patch adds new kernel module parameter 'ctl_dev_id' to allow
> select the old behaviour, too. The CONFIG_SND_HDA_CTL_DEV_ID Kconfig
> option sets the default value.
> 
> BugLink: https://github.com/alsa-project/alsa-lib/issues/294
> BugLink: https://github.com/alsa-project/alsa-lib/issues/205
> Fixes: 54d174031576 ("[ALSA] hda-codec - Fix connection list parsing")
> Fixes: 1afe206ab699 ("ALSA: hda - Try to find an empty control index when it's occupied")
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
> 
> --
> 
> rfc..v1:
>  - added CONFIG_SND_HDA_CTL_DEV_ID Kconfig option

Looks almost fine.  One thing would be to just make it a single option
instead of array.  This behavior should be consistent on the whole
system, not specific to a certain chip, after all, and the array
option is error-prone.


thanks,

Takashi

  reply	other threads:[~2023-02-01 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  9:42 [PATCH] ALSA: hda: Fix the control element identification for multiple codecs Jaroslav Kysela
2023-02-01 14:40 ` Takashi Iwai [this message]
2023-02-02  9:01 ` kernel test robot
2023-02-02  9:01   ` kernel test robot

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=87ilglwirz.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    /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.