[alsa-devel] [PATCH] hda: Add GPIO mute support to STAC9205

Takashi Iwai tiwai at suse.de
Mon Jan 28 15:57:04 CET 2008


At Mon, 28 Jan 2008 09:48:00 -0500,
Matthew Ranostay wrote:
> 
> Support added for detecting HP jack presence via GPIO on several laptop docks.
> 
> Signed-off-by: Matthew Ranostay <mranostay at embeddedalley.com>
> ---
> diff -r b0d97ac73e0f pci/hda/patch_sigmatel.c
> --- a/pci/hda/patch_sigmatel.c	Fri Jan 25 15:24:50 2008 +0100
> +++ b/pci/hda/patch_sigmatel.c	Mon Jan 28 09:34:16 2008 -0500
> @@ -122,7 +122,9 @@ struct sigmatel_spec {
>  	unsigned int alt_switch: 1;
>  	unsigned int hp_detect: 1;
>  
> -	unsigned int gpio_mask, gpio_data;
> +	unsigned int gpio_en_mask, gpio_dir_mask;
> +	unsigned int gpio_data;
> +	unsigned int gpio_mute;

The mask is valid for both dir and data bits.  So I'd like to have the
following four fields:

	unsigned int gpio_mask;
	unsigned int gpio_dir;
	unsigned int gpio_data;
	unsigned int gpio_mute;

(Actually they could be unsigned char on HD-audio.)

Otherwise the patch looks good.


thanks,

Takashi


More information about the Alsa-devel mailing list