All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hda: use amp capabilities from afg if amp override not set
@ 2005-03-21  0:36 Matt
  2005-03-21 19:42 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Matt @ 2005-03-21  0:36 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-21 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-21  0:36 [PATCH] hda: use amp capabilities from afg if amp override not set Matt
2005-03-21 19:42 ` Takashi Iwai
2005-03-21 21:14   ` Matt

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.