-
Notifications
You must be signed in to change notification settings - Fork 142
ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup #5287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1321,22 +1321,8 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) | |
| /* report to machine driver if any DMICs are found */ | ||
| mach->mach_params.dmic_num = check_dmic_num(sdev); | ||
|
|
||
| if (sdw_mach_found) { | ||
| /* | ||
| * DMICs use up to 4 pins and are typically pin-muxed with SoundWire | ||
| * link 2 and 3, or link 1 and 2, thus we only try to enable dmics | ||
| * if all conditions are true: | ||
| * a) 2 or fewer links are used by SoundWire | ||
| * b) the NHLT table reports the presence of microphones | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe you only need to refine these criteria? You can have 3 SoundWire links along 1 DMIC link. But I don't think you can have 3 SoundWire links with 2 DMIC links - since in the latter case you need at least 3 wires, 4 if the clock isn't shared.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @plbossart Hmm, the question is that do DMIC links always share with SoundWire links and will the SoundWire link number increase? Is it possible that someday we have 3 SoundWire links and 2 DMIC links? |
||
| */ | ||
| if (hweight_long(mach->link_mask) <= 2) | ||
| dmic_fixup = true; | ||
| else | ||
| mach->mach_params.dmic_num = 0; | ||
| } else { | ||
| if (mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER) | ||
| dmic_fixup = true; | ||
| } | ||
| if (sdw_mach_found || mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bardliao can we please fix the typo in commit message "PCH DMI". Also, the last line somehow reads as though the BIOS is going to report differently because of this change. But rather what you're trying to say is that we check for PCM DMIC reported by the BIOS irrespective of whether there are SDW links present or not.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and also in the case where the SDW and DMIC are pin-muxed, will this change have a detrimental effect on machine driver probe because we ended up choosing the wrong topology name?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if the BIOS report PCH DMIC but there is no PCH DMIC, we will choose the wrong topology name. That's why I am not confident with this change. But on the other hand, that is the BIOS's responsibility to report the real HW configuration and kernel should trust the BIOS.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't have a choice but to trust the bios @ujfalusi @lgirdwood what do you think?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I vaguely remember we did this for RVPs. Not sure if it happens in real products. The worst case is that someone reports an issue that no sound card is created, and we may need to fix it with some quirk.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bardliao, you are too optimistic ;) We have seen broken BIOS information and I'm sure we are continue to see them. But imho we still need to trust the information BIOS provides, it is most likely correct..
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would make any assumption obvious in the logs i.e. if we BIOS says we have DMIC & SDW then we can log this with a
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log added
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bardliao is the check for sdw_mach_found important? I think we only add the dmic prefix to the tplg name if either the tplg quirk is set or the num_dmics reported is non-zero isnt it?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, sdw_mach_found is important because we don't add -2ch/-4ch postfix for SSP machines. |
||
| dmic_fixup = true; | ||
|
|
||
| if (tplg_fixup && | ||
| dmic_fixup && | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.