Skip to contentSkip to conversation

hda: use amp capabilities from afg if amp override not set

PATCH Applied Matt 2 participants 3 messages Mar 21, 2005

lore
Share & tools
lore

Matt

author
#0 lore raw

PATCH 1/1 hda: use amp capabilities from afg if amp override not set

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

pci/hda/hda_codec.c +2 -0
diff -u -r1.8 hda_codec.c
@@ -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

Applied
#1 lore raw

At Sun, 20 Mar 2005 17:36:05 -0700,

Quoted 4 lines · Matt

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.

Thanks, applied to CVS now.

At the next time, could you provide "signed-off-by" line, too, to include your credit properly in changelog?

Takashi

-------------------------------------------------------
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

author
#2 lore raw
Quoted 11 lines · Takashi Iwai

At Sun, 20 Mar 2005 17:36:05 -0700,

Quoted 4 lines · Matt

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.

Thanks, applied to CVS now.

At the next time, could you provide "signed-off-by" line, too, to include your credit properly in changelog?

Will do. Sorry, I forgot that this time.

Thanks,
Matt

-------------------------------------------------------
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