On Mon, Aug 24, 2015 at 03:15:51AM +0300, Dmitry Alenichev wrote:
> Index: azalia.h
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/azalia.h,v
> retrieving revision 1.63
> diff -u -p -r1.63 azalia.h
> --- azalia.h 20 Aug 2015 06:44:06 -0000 1.63
> +++ azalia.h 24 Aug 2015 00:15:01 -0000
> @@ -512,6 +512,7 @@
> #define AZ_QRK_WID_AD1981_OAMP 0x00008000
> #define AZ_QRK_WID_TPDOCK1 0x00010000
> #define AZ_QRK_WID_TPDOCK2 0x00020000
> +#define AZ_QRK_WID_TPDOCK3 0x00030000
This should be 0x00040000 (1 << 18)
0x00030000 is (1 << 17) and (1 << 16) effectively setting both
AZ_QRK_WID_TPDOCK1 and AZ_QRK_WID_TPDOCK2.
The rest of the diff looks fine.
>
> /* memory-mapped types */
> typedef struct {
> Index: azalia_codec.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
> retrieving revision 1.169
> diff -u -p -r1.169 azalia_codec.c
> --- azalia_codec.c 21 Aug 2015 06:11:04 -0000 1.169
> +++ azalia_codec.c 24 Aug 2015 00:15:01 -0000
> @@ -321,6 +321,27 @@ azalia_codec_init_vtbl(codec_t *this)
> case 0x14f15051:
> this->name = "Conexant CX20561"; /* Hermosa */
> break;
> + case 0x14f1506e:
> + this->name = "Conexant CX20590";
> + /*
> + * Enable dock audio on Thinkpad docks
> + * 0x17aa : 0x20f2 = Thinkpad T400
> + * 0x17aa : 0x215e = Thinkpad T410
> + * 0x17aa : 0x215f = Thinkpad T510
> + * 0x17aa : 0x21ce = Thinkpad T420
> + * 0x17aa : 0x21cf = Thinkpad T520
> + * 0x17aa : 0x21da = Thinkpad X220
> + * 0x17aa : 0x21db = Thinkpad X220t
> + */
> + if (this->subid == 0x20f217aa ||
> + this->subid == 0x215e17aa ||
> + this->subid == 0x215f17aa ||
> + this->subid == 0x21ce17aa ||
> + this->subid == 0x21cf17aa ||
> + this->subid == 0x21da17aa ||
> + this->subid == 0x21db17aa)
> + this->qrks |= AZ_QRK_WID_TPDOCK3;
> + break;
> case 0x434d4980:
> this->name = "CMedia CMI9880";
> break;
> @@ -2537,6 +2558,20 @@ azalia_codec_widget_quirks(codec_t *this
> nid == 0x19) {
> /* Thinkpad x240/t440 style dock microphone */
> w->d.pin.config = 0x21a11010;
> + w->enable = 1;
> + }
> +
> + if (this->qrks & AZ_QRK_WID_TPDOCK3 &&
> + nid == 0x1a) {
> + /* Thinkpad x220/t420 style dock microphone */
> + w->d.pin.config = 0x21a190f0;
> + w->enable = 1;
> + }
> +
> + if (this->qrks & AZ_QRK_WID_TPDOCK3 &&
> + nid == 0x1c) {
> + /* Thinkpad x220/t420 style dock headphone */
> + w->d.pin.config = 0x212140ff;
> w->enable = 1;
> }
>
>