On Friday, May 1, 2020, Damien Couderc <open...@petrocore.eu> wrote: > On 27/04/2020 15:19, Abel Abraham Camarillo Ojeda wrote: > >> The following enables audio via the dock station port in my >> >>> thinkpad L460. But, anyone knows if its possible to automatically >>>>>>> disable the laptop speaker when I plug in the audio port in the >>>>>>> dock? it doesn't appear to have a *_sense, ideas? >>>>>>> >>>>>>> this also enables the annoying beep (echo -e "\a"; in console) >>>>>>> >>>>>>> patch inline and attached: >>>>>>> >>>>>> Hi, comments, oks? >>>>>> >>>>> Anyone? >>>>> >>>> Hi, any ok, comments? >>>> >>> Hi Abel, >>> >>> Thanks for your diff. Please add an applicable diff inline in your mail >>> next time and don't attach it. >>> >> >> Thanks Jan, I attached and inlined the diff because >> gmail and diff mangling ... >> >> Thanks for review >> >> Tested OK after adding support for my T560. > > Here is the resulting diff : > > --- azalia_codec.c.orig Fri May 1 11:54:57 2020 > +++ azalia_codec.c Fri May 1 12:45:17 2020 > @@ -159,6 +159,19 @@ > this->subid == 0x503c17aa) > this->qrks |= AZ_QRK_WID_TPDOCK2; > break; > + case 0x10ec0293: > + this->name = "Realtek ALC293"; > + this->qrks |= AZ_QRK_WID_CDIN_1C | AZ_QRK_WID_BEEP_1D; > + > + /* > + * Enable dock audio on Thinkpad docks > + * 0x17aa : 0x2231 = Thinkpad T560 > + * 0x17aa : 0x5051 = Thinkpad L460 > + */ > + if (this->subid == 0X223117aa || > + this->subid == 0x505117aa) > + this->qrks |= AZ_QRK_WID_TPDOCK2; > + break; > case 0x10ec0298: > this->name = "Realtek ALC298"; > if (this->subid == 0x320019e5 || > > > That said, I suspect that other Thinkpad models like the 560p (0x5050) > should also be added to the list.
Thanks for review, looking at those files history it seems like new models are only added if some developer can try the hardware (which seems reasonable). But it would be nice if we can also add more models, I have also a thinkpad L470 > > > I can't test the diff with the right hardware. But, the patch applies, >>> builds and doesn't break audio on my ThinkPad X1C6. The diff also looks >>> fine for me. >>> >>> bye, >>> Jan >>> >>> Index: azalia_codec.c >>> =================================================================== >>> RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v >>> retrieving revision 1.178 >>> diff -u -p -r1.178 azalia_codec.c >>> --- azalia_codec.c 14 Oct 2019 02:04:35 -0000 1.178 >>> +++ azalia_codec.c 27 Apr 2020 07:42:45 -0000 >>> @@ -159,6 +159,17 @@ azalia_codec_init_vtbl(codec_t *this) >>> this->subid == 0x503c17aa) >>> this->qrks |= AZ_QRK_WID_TPDOCK2; >>> break; >>> + case 0x10ec0293: >>> + this->name = "Realtek ALC293"; >>> + this->qrks |= AZ_QRK_WID_CDIN_1C | AZ_QRK_WID_BEEP_1D; >>> + >>> + /* >>> + * Enable dock audio on Thinkpad docks >>> + * 0x17aa : 0x5051 = Thinkpad L460 >>> + */ >>> + if (this->subid == 0x505117aa) >>> + this->qrks |= AZ_QRK_WID_TPDOCK2; >>> + break; >>> case 0x10ec0298: >>> this->name = "Realtek ALC298"; >>> if (this->subid == 0x320019e5 || >>> >>> > >