Re: [PATCH 1/1] ALSA: hda - Analog Devices AD1984A add HP Touchsmart model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Sun, 27 Sep 2009 22:34:58 +0200,
Miguel de Barros wrote:
> 
> Hello,
> 
> I would like to submit this patch, 
> 
> it will fix the bug I've submited :
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614
> 
> 
> Thanks,
> 	Miguel de Barros
> [2 0001-ALSA-hda-Analog-Devices-AD1984A-add-HP-Touchsmart.patch <text/x-patch; UTF-8 (7bit)>]
> >From 8a106650b4f18c956ae40bf863fb3423b66d605f Mon Sep 17 00:00:00 2001
> From: Miguel de Barros <miguel.de.barros@xxxxxxxxxx>
> Date: Sun, 27 Sep 2009 22:11:21 +0200
> Subject: [PATCH 1/1] ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
>          modified:   Documentation/HD-Audio-Models.txt
>          modified:   pci/hda/patch_analog.c
> 
> 
> Signed-off-by: Miguel de Barros <miguel.de.barros@xxxxxxxxxx>

Thanks for the patch.

Could you add a bit more description what you change and/or fix with
this patch?  The reference to bug tracking can be also in the
changelog text.
OTOH, the list of modified files is superfluous since we can track
them via git more easily.


> +static struct hda_input_mux ad1984a_touchsmart_capture_source = {
> +	.num_items = 3,
> +	.items = {
> +		{ "Mix", 0x3 }, /* Mixer */
> +		{ "Mic", 0x4 }, /* port-E */
> +		{ "Internal Mic", 0x5 }, /* Digital Mic */
> +	},
> +};
> +
> +/* switch to external mic if plugged */
> +static void ad1984a_touchsmart_automic(struct hda_codec *codec)
> +{
> +	if (snd_hda_codec_read(codec, 0x1c, 0,
> +				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000) {
> +		snd_hda_codec_write(codec, 0x0c, 0,
> +				     AC_VERB_SET_CONNECT_SEL, 0x4);
> +	} else {
> +		snd_hda_codec_write(codec, 0x0c, 0,
> +				     AC_VERB_SET_CONNECT_SEL, 0x5);
> +	}
> +}

The auto-mic feature is actually conflicting with the capture_source
setup.  That is, even if you choose "Internal Mic" manually as the
capture source, it's changed (even without notification) to the mic
jack when plugged in.

So, either use only the auto-mic and get rid of the manual "capture
source" (I prefer), or disable auto-mic.  We can remove "Mix" item
in the first case just for simplicity.


Could you fix and repot?

thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux