All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
To: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 1/6] sound/pci/hda: Fix Amp-In count for widgets with implied selector
Date: Thu, 05 Apr 2012 15:29:56 +0200	[thread overview]
Message-ID: <1333632596.4159.11.camel@localhost> (raw)

A selector widget with AC_WCAP_IN_AMP has multiple input amplifiers (if
the selector widget would have only one common amp, it would be labeled
as "output amplifier" instead). This is just like mixer widgets.

If a non-mixer/selector widget has an input amplifier, it is only one
input amplifier, even if it has a connection list with more than one
entry. The implied selector is placed before the single input amplifier.

At least that is how I read the HDA specs, and what Conexant implements in
their CX20549 codec.

diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 254ab52..9b942f0 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -653,7 +653,7 @@ static void print_codec_info(struct snd_info_entry *entry,
 			snd_iprintf(buffer, "  Amp-In vals: ");
 			print_amp_vals(buffer, codec, nid, HDA_INPUT,
 				       wid_caps & AC_WCAP_STEREO,
-				       wid_type == AC_WID_PIN ? 1 : conn_len);
+				       (wid_type == AC_WID_AUD_SEL || wid_type == AC_WID_AUD_MIX) ? conn_len : 1);
 		}
 		if (wid_caps & AC_WCAP_OUT_AMP) {
 			snd_iprintf(buffer, "  Amp-Out caps: ");
-- 
1.7.9.1

             reply	other threads:[~2012-04-05 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 13:29 Michael Karcher [this message]
2012-04-05 14:28 ` [PATCH 1/6] sound/pci/hda: Fix Amp-In count for widgets with implied selector Takashi Iwai
2012-04-05 14:28   ` Takashi Iwai

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=1333632596.4159.11.camel@localhost \
    --to=kernel@mkarcher.dialup.fu-berlin.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@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 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.