All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt <matt@embeddedalley.com>
To: alsa-devel@lists.sourceforge.net
Subject: [PATCH] hda: use amp capabilities from afg if amp override not set
Date: Sun, 20 Mar 2005 17:36:05 -0700	[thread overview]
Message-ID: <20050320173605.D10431@cox.net> (raw)

Some HDA codec nodes contain an amp, but do not provide local amp
capabilities.  In these cases, AC_WCAP_AMP_OVRD is not set so we
should query the AFG nid in order to get the general amp capabilities.

Index: alsa-kernel/pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v
retrieving revision 1.8
diff -u -r1.8 hda_codec.c
--- alsa-kernel/pci/hda/hda_codec.c	18 Mar 2005 16:21:56 -0000	1.8
+++ alsa-kernel/pci/hda/hda_codec.c	21 Mar 2005 00:20:40 -0000
@@ -611,6 +611,8 @@
 	if (! info)
 		return 0;
 	if (! (info->status & INFO_AMP_CAPS)) {
+		if (!(snd_hda_param_read(codec, nid, AC_PAR_AUDIO_WIDGET_CAP) & AC_WCAP_AMP_OVRD))
+			nid = codec->afg;
 		info->amp_caps = snd_hda_param_read(codec, nid, direction == HDA_OUTPUT ?
 						    AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP);
 		info->status |= INFO_AMP_CAPS;


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

             reply	other threads:[~2005-03-21  0:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21  0:36 Matt [this message]
2005-03-21 19:42 ` [PATCH] hda: use amp capabilities from afg if amp override not set Takashi Iwai
2005-03-21 21:14   ` Matt

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=20050320173605.D10431@cox.net \
    --to=matt@embeddedalley.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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.