Ok, I'll test this out and commit a fix to what's in -HEAD. Thanks!
-a On 27 July 2014 01:53, Alexander Motin <m...@freebsd.org> wrote: > On 27.07.2014 11:42, Adrian Chadd wrote: >> ... aaand it worked. Woo! > > It worked for playback, but completely broke recording. I've missed that > your CODEC does not support input switching in hardware, while driver > does not support that in software. For playback software switching is > supported by the driver, so it worked. Patch below should give you > automatic switching on playback, but still two separate recording devices. > >> So how'd it actually map the correct selection between headphones and >> speaker? That's now cutting back and forth correctly as I plug in and >> out the headphone jack. > > It tells the driver that those two inputs should be parts of one output > device, and driver following HDA specifications reads jack presence > information from respective CODEC pins. Sound actually played to both > outputs, but driver mutes one of them, depending on jack presence. > > Lenovo engineers configured the CODEC to report each pin as separate > audio device, but the problem that our sound(4) does not support > automatic switching between them. :( > >> On 27 July 2014 01:40, Adrian Chadd <adr...@freebsd.org> wrote: >>> ok, with that it looks like: >>> >>> hdaa0: 2 associations found: >>> hdaa0: Association 0 (1) out: >>> hdaa0: Pin nid=26 seq=0 >>> hdaa0: Pin nid=22 seq=15 >>> hdaa0: Association 1 (2) in: >>> hdaa0: Pin nid=29 seq=0 >>> hdaa0: Pin nid=24 seq=14 >>> hdaa0: Tracing association 0 (1) >>> hdaa0: Pin 26 traced to DAC 16 >>> hdaa0: Pin 22 traced to DAC 16 and hpredir 0 >>> hdaa0: Association 0 (1) trace succeeded >>> hdaa0: Tracing association 1 (2) >>> hdaa0: Pin 29 traced to ADC 20 >>> hdaa0: Unable to trace pin 24 to ADC 20, undo traces >>> hdaa0: Unable to trace pin 29 to ADC 21, undo traces >>> hdaa0: Association 1 (2) trace failed > > Index: hdaa_patches.c > =================================================================== > --- hdaa_patches.c (revision 269151) > +++ hdaa_patches.c (working copy) > @@ -346,6 +346,16 @@ hdac_pin_patch(struct hdaa_widget *w) > patch = "as=1 seq=15"; > break; > } > + } else if (id == HDA_CODEC_CX20561 && > + subid == LENOVO_ZZZ_SUBVENDOR) { > + switch (nid) { > + case 22: > + patch = "as=1 seq=15"; > + break; > + case 26: > + patch = "as=1 seq=0"; > + break; > + } > } else if (id == HDA_CODEC_CX20590 && > (subid == LENOVO_X1_SUBVENDOR || > subid == LENOVO_X220_SUBVENDOR || > Index: hdac.h > =================================================================== > --- hdac.h (revision 269151) > +++ hdac.h (working copy) > @@ -236,6 +236,7 @@ > #define LENOVO_X1CRBN_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f9) > #define LENOVO_X220_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21da) > #define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) > +#define LENOVO_ZZZ_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20f2) > #define LENOVO_T420_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21ce) > #define LENOVO_T430_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f3) > #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) > > > -- > Alexander Motin _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"