hda: fix vref cap and ctl values
PATCH 1/2 hda: fix vref cap and ctl values
Fix some vref defines so they are valid for the different bits in the pin cap and pin control registers. Please apply.
Index: alsa-kernel/pci/hda/hda_codec.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.h,v retrieving revision 1.4
pci/hda/hda_codec.h +13 -7
@@ -176,15 +176,21 @@#define AC_PINCAP_OUT (1<<4)/* output capable */ #define AC_PINCAP_IN (1<<5)/* input capable */ #define AC_PINCAP_BALANCE (1<<6)/* balanced I/O capable */ -#define AC_PINCAP_VREF (7<<8) +#define AC_PINCAP_VREF (0x37<<8)#define AC_PINCAP_VREF_SHIFT 8#define AC_PINCAP_EAPD (1<<16)/* EAPD capable */ -/* Vref status (used in pin cap and pin ctl) */ -#define AC_PIN_VREF_HIZ (1<<0)/* Hi-Z */ -#define AC_PIN_VREF_50 (1<<1)/* 50% */ -#define AC_PIN_VREF_GRD (1<<2)/* ground */ -#define AC_PIN_VREF_80 (1<<4)/* 80% */ -#define AC_PIN_VREF_100 (1<<5)/* 100% */ +/* Vref status (used in pin cap) */ +#define AC_PINCAP_VREF_HIZ (1<<0)/* Hi-Z */ +#define AC_PINCAP_VREF_50 (1<<1)/* 50% */ +#define AC_PINCAP_VREF_GRD (1<<2)/* ground */ +#define AC_PINCAP_VREF_80 (1<<4)/* 80% */ +#define AC_PINCAP_VREF_100 (1<<5)/* 100% */ +/* Vref setting (used in pin ctl) */ +#define AC_PINCTL_VREF_HIZ (0)/* Hi-Z */ +#define AC_PINCTL_VREF_50 (1)/* 50% */ +#define AC_PINCTL_VREF_GRD (2)/* ground */ +#define AC_PINCTL_VREF_80 (4)/* 80% */ +#define AC_PINCTL_VREF_100 (5)/* 100% */ /* Amplifier capabilities */
Index: alsa-kernel/pci/hda/hda_generic.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_generic.c,v retrieving revision 1.3
pci/hda/hda_generic.c +1 -1
@@ -426,7 +426,7 @@return "Line" ;case AC_JACK_CD :if (pinctl) - *pinctl |=AC_PIN_VREF_GRD ; + *pinctl |=AC_PINCTL_VREF_GRD ;return "CD" ;case AC_JACK_AUX :if ((location &0x0f ) ==AC_JACK_LOC_FRONT )
-------------------------------------------------------
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
Re: [PATCH][2/2] hda: add sigmatel codec support
Add initial SigmaTel codec support for 9200 and 922x. Note that this hda patch relies on the configuration default registers to be set correctly (normally by BIOS/firmware) in order for it to set up pin widgets properly. There's a test switch in the patch so it will work with the SigmaTel reference boards that are usually plugged into a system that doesn't set the configuration default registers. It supports 2 channel analog out and line/mic in. I plan to add >2 channel support and spdif support shortly. Please apply.
Index: alsa-driver/pci/hda/patch_sigmatel.c
===================================================================
RCS file: alsa-driver/pci/hda/patch_sigmatel.c
pci/hda/patch_sigmatel.c new file +2 -0
@@ -0,0 +1,2 @@ +#define __NO_VERSION__ +#include "../../alsa-kernel/pci/hda/patch_sigmatel.c"
Index: alsa-kernel/pci/hda/Makefile
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/Makefile,v retrieving revision 1.2
pci/hda/Makefile +1 -1
@@ -1,5 +1,5 @@ snd-hda-intel-objs := hda_intel.o -snd-hda-codec-objs := hda_codec.o hda_generic.o patch_realtek.o patch_cmedia.o patch_analog.o +snd-hda-codec-objs := hda_codec.o hda_generic.o patch_realtek.o patch_cmedia.o patch_analog.o patch_sigmatel.o ifdef CONFIG_PROC_FS snd-hda-codec-objs += hda_proc.o endif
Index: alsa-kernel/pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v retrieving revision 1.9
pci/hda/hda_codec.c +1 -0
@@ -51,6 +51,7 @@ { 0x10ec, "Realtek" }, { 0x13f6, "C-Media" }, { 0x434d, "C-Media" }, + { 0x8384, "SigmaTel" }, {} /* terminator */ };
Index: alsa-kernel/pci/hda/hda_patch.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_patch.h,v retrieving revision 1.2
pci/hda/hda_patch.h +3 -0
@@ -8,10 +8,13 @@extern struct hda_codec_preset snd_hda_preset_cmedia[];/* Analog Devices codecs */ extern struct hda_codec_preset snd_hda_preset_analog[]; +/* SigmaTel codecs */ +extern struct hda_codec_preset snd_hda_preset_sigmatel[];static const struct hda_codec_preset *hda_preset_tables[] = { snd_hda_preset_realtek, snd_hda_preset_cmedia, snd_hda_preset_analog, + snd_hda_preset_sigmatel,NULL };
Index: alsa-kernel/pci/hda/patch_sigmatel.c
===================================================================
RCS file: alsa-kernel/pci/hda/patch_sigmatel.c
pci/hda/patch_sigmatel.c new file +560 -0
560 lines not on this page · raw message
-------------------------------------------------------
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
Re: Re: [PATCH][2/2] hda: add sigmatel codec support
At Wed, 13 Apr 2005 00:49:52 -0700,
Quoted 11 lines · Matt
Add initial SigmaTel codec support for 9200 and 922x. Note that this hda patch relies on the configuration default registers to be set correctly (normally by BIOS/firmware) in order for it to set up pin widgets properly. There's a test switch in the patch so it will work with the SigmaTel reference boards that are usually plugged into a system that doesn't set the configuration default registers. It supports 2 channel analog out and line/mic in. I plan to add >2 channel support and spdif support shortly. Please apply.
Quoted 1 line
Signed-off-by Matt <[email protected]>
Thanks, I applied both patches to CVS.
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