Thanks a lot!
I also got the sound working on this machine now. As far as I
can tell, both speakers work and Dolby Atmos works, too, thanks
to the awesome quirk by Joshua Stein (jcs@).
I’m not sure I did everything right here, though it works.
Below is the diff.
cheers,
- ivo
Index: azalia.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.259
diff -u -p -r1.259 azalia.c
--- azalia.c 25 Oct 2020 07:22:06 -0000 1.259
+++ azalia.c 15 Apr 2021 13:18:07 -0000
@@ -490,7 +490,8 @@ azalia_configure_pci(azalia_t *az)
const struct pci_matchid azalia_pci_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_200SERIES_U_HDA },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA }
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_400SERIES_CAVS }
};
int
Index: azalia_codec.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.183
diff -u -p -r1.183 azalia_codec.c
--- azalia_codec.c 16 Jan 2021 07:02:39 -0000 1.183
+++ azalia_codec.c 15 Apr 2021 13:18:07 -0000
@@ -162,9 +162,16 @@ azalia_codec_init_vtbl(codec_t *this)
break;
case 0x10ec0285:
this->name = "Realtek ALC285";
- if (this->subid == 0x229217aa) /* Thinkpad X1 Carbon
7 */
- this->qrks |= AZ_QRK_ROUTE_SPKR2_DAC |
- AZ_QRK_WID_CLOSE_PCBEEP;
+ if (PCI_VENDOR(this->subid) == PCI_VENDOR_LENOVO) {
+ if (this->subid == 0x22c017aa) { /* Thinkpad X1 Extreme
3 */
+ this->name = "Realtek ALC3286";
+ this->qrks |= AZ_QRK_DOLBY_ATMOS |
+ AZ_QRK_ROUTE_SPKR2_DAC;
+ }
+ else if (this->subid == 0x229217aa) /* Thinkpad X1 Carbon 7 */
+ this->qrks |= AZ_QRK_ROUTE_SPKR2_DAC |
+ AZ_QRK_WID_CLOSE_PCBEEP;
+ }
break;
case 0x10ec0287:
this->name = "Realtek ALC287";
> On Apr 14, 2021, at 20:39, Stefan Sperling <[email protected]> wrote:
>
> On Wed, Apr 14, 2021 at 11:01:47AM +0200, Ivo Sbalzarini wrote:
>> as suggested over at misc@ (thanks, Stuart!), I am sending a
>> patch below to add the PCI IDs of the Thunderbolt and WiFi
>> devices in Lenovo Thinkpad X1 Extreme Gen 3 laptops, and to
>> enable the Intel AX201 wireless LAN in the iwx driver.
>>
>> I have this tested and running without apparent problems on
>> my machine. Would appreciate if someone could take a look at
>> the diffs.
>>
>> Thanks!
>> - ivo
>
> Committed, thank you!
>
>>
>>
>>
>>
>> Index: if_iwx.c
>> ===================================================================
>> RCS file: /cvs/src/sys/dev/pci/if_iwx.c,v
>> retrieving revision 1.50
>> diff -u -p -r1.50 if_iwx.c
>> --- if_iwx.c 17 Mar 2021 15:59:27 -0000 1.50
>> +++ if_iwx.c 14 Apr 2021 06:51:35 -0000
>> @@ -7711,6 +7711,7 @@ static const struct pci_matchid iwx_devi
>> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_2 },
>> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_3 },
>> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_4,},
>> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_5,},
>> };
>>
>> static const struct pci_matchid iwx_subsystem_id_ax201[] = {
>> @@ -7751,6 +7752,7 @@ iwx_match(struct device *parent, iwx_mat
>> case PCI_PRODUCT_INTEL_WL_22500_2: /* AX201 */
>> case PCI_PRODUCT_INTEL_WL_22500_3: /* AX201 */
>> case PCI_PRODUCT_INTEL_WL_22500_4: /* AX201 */
>> + case PCI_PRODUCT_INTEL_WL_22500_5: /* AX201 */
>> for (i = 0; i < nitems(iwx_subsystem_id_ax201); i++) {
>> if (svid == iwx_subsystem_id_ax201[i].pm_vid &&
>> spid == iwx_subsystem_id_ax201[i].pm_pid)
>> @@ -7938,6 +7940,7 @@ iwx_attach(struct device *parent, struct
>> break;
>> case PCI_PRODUCT_INTEL_WL_22500_2:
>> case PCI_PRODUCT_INTEL_WL_22500_3:
>> + case PCI_PRODUCT_INTEL_WL_22500_5:
>> if (sc->sc_hw_rev != IWX_CSR_HW_REV_TYPE_QUZ) {
>> printf("%s: unsupported AX201 adapter\n", DEVNAME(sc));
>> return;
>> Index: pcidevs
>> ===================================================================
>> RCS file: /cvs/src/sys/dev/pci/pcidevs,v
>> retrieving revision 1.1963
>> diff -u -p -r1.1963 pcidevs
>> --- pcidevs 9 Apr 2021 20:58:20 -0000 1.1963
>> +++ pcidevs 14 Apr 2021 06:51:36 -0000
>> @@ -3965,6 +3965,9 @@ product INTEL I219_V4 0x15d8 I219-V
>> product INTEL JHL6340 0x15d9 JHL6340 Thunderbolt 3
>> product INTEL JHL6340_PCIE 0x15da JHL6340 Thunderbolt 3
>> product INTEL JHL6340_XHCI 0x15db JHL6340 Thunderbolt 3
>> +product INTEL JHL7540 0x15eb JHL7540 Thunderbolt 3
>> +product INTEL JHL7540_PCIE 0x15ea JHL7540 Thunderbolt 3
>> +product INTEL JHL7540_XHCI 0x15ec JHL7540 Thunderbolt 3
>> product INTEL I219_LM8 0x15df I219-LM
>> product INTEL I219_V8 0x15e0 I219-V
>> product INTEL I219_LM9 0x15e1 I219-LM
>> @@ -5001,6 +5004,7 @@ product INTEL 495SERIES_LP_XHCI 0x34ed 4
>> product INTEL 495SERIES_LP_XDCI 0x34ee 495 Series xDCI
>> product INTEL 495SERIES_LP_SRAM 0x34ef 495 Series Shared SRAM
>> product INTEL WL_22500_4 0x34f0 Wi-Fi 6 AX201
>> +product INTEL WL_22500_5 0x06f0 Wi-Fi 6 AX201
>> product INTEL 495SERIES_LP_SDXC 0x34f8 495 Series SDXC
>> product INTEL 495SERIES_LP_GSPI_3 0x34fb 495 Series GSPI
>> product INTEL 495SERIES_LP_ISH 0x34fc 495 Series ISH
>>
>>
>>