Page MenuHomeFreeBSD

hda: add patch for Framework laptop v2 headphone jack
ClosedPublic

Authored by timp87_gmail.com on Aug 26 2022, 2:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 24 2024, 6:45 PM
Unknown Object (File)
Feb 20 2024, 11:16 AM
Unknown Object (File)
Jan 7 2024, 11:19 PM
Unknown Object (File)
Jan 7 2024, 11:19 PM
Unknown Object (File)
Jan 7 2024, 11:08 PM
Unknown Object (File)
Dec 20 2023, 5:32 AM
Unknown Object (File)
Dec 8 2023, 10:43 AM
Unknown Object (File)
Nov 27 2023, 8:29 AM
Subscribers

Details

Summary

Framework computers company has recently released new generation of their laptop.
Previously it was based on Intel Gen11th CPU. Now it's on Intel Gen12th CPU.

I got a Framework laptop v2 (Gen12th CPU) from Batch 2.
Sound didn't switch to headphones when connected. Fix it.

  1. Add new laptop support the same way it was done in D34596
  2. Add subvendor ID to existing FRAMEWORK_LAPTOP define
  3. Provide better user experience by default by enabling correct mic switch if headphones inserted.

Put the mic on external jack (nid11) and the embedded mic in one association.
I think this completes D34596, because with D34596 commit there are two pcm devices: one with internal mic and the other with headphones and sound output.
So you had to reconfigure sound input in the apps (for example, browser) to the second pcm (pcm1) device to use laptop's mic. Possible only in firefox as chromium uses only one default pcm unit without any ability to re-set it. Once headphones with mic connected sound input and output switches to the first pcm (pcm0).
With this addition you'll have just one pcm device where both input and output switches correctly once headphones connected/disconnected.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

timp87_gmail.com edited the summary of this revision. (Show Details)

Thanks for this - I will shepherd this in shortly.

For future reference when creating reviews via the web interface please add full context to your diffs via e.g. git show -U999999 <hash> or git diff -U999999 as it makes it easier for reviewers to see the surrounding context. (No need to refresh this review as this change is quite self contained.)

Can you confirm author info should be "Pavel Timofeev" <timp87@gmail.com>

sys/dev/sound/pci/hda/hdac.h
509

I wonder if these have any other / official names, maybe FRAMEWORK_LAPTOP_11TH_GEN_SUBVENDOR and FRAMEWORK_LAPTOP_12TH_GEN_SUBVENDOR? But current names are fine if not.

sys/dev/sound/pci/hda/hdaa_patches.c
332

this line is overly long and needs to be wrapped - I will take care of it on submit

Thanks for this - I will shepherd this in shortly.

For future reference when creating reviews via the web interface please add full context to your diffs via e.g. git show -U999999 <hash> or git diff -U999999 as it makes it easier for reviewers to see the surrounding context. (No need to refresh this review as this change is quite self contained.)

Can you confirm author info should be "Pavel Timofeev" <timp87@gmail.com>

Ok, sorry about that.
Yes, this author info is correct.

sys/dev/sound/pci/hda/hdac.h
509

Well, I could not find any official names.
They actually don't use anything except CPU when referencing laptop generations. So your suggestion might be even better then mine with device id.

This revision is now accepted and ready to land.Sep 13 2022, 4:16 PM