-
Notifications
You must be signed in to change notification settings - Fork 142
ASoC: SOF: Intel: only detect codecs when HDA DSP probe #5492
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 |
|---|---|---|
|
|
@@ -183,7 +183,7 @@ int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable) | |
| } | ||
| EXPORT_SYMBOL_NS(hda_dsp_ctrl_clock_power_gating, "SND_SOC_SOF_INTEL_HDA_COMMON"); | ||
|
|
||
| int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev) | ||
| int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool detect_codec) | ||
| { | ||
| struct hdac_bus *bus = sof_to_bus(sdev); | ||
| struct hdac_stream *stream; | ||
|
|
@@ -220,7 +220,11 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev) | |
| } | ||
| usleep_range(1000, 1200); | ||
|
|
||
| hda_codec_detect_mask(sdev); | ||
| /* Accept unsolicited responses */ | ||
| snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_UNSOL, AZX_GCTL_UNSOL); | ||
|
|
||
| if (detect_codec) | ||
| hda_codec_detect_mask(sdev); | ||
|
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. Hmm, we had a discussion on the need for this in #5458 . If the display runtime-pm link is removed, the display codec might not be fully up by the time we do resume, but in the end, consensus was that this is harmless, the initial detect_mask at probe should be sufficient. This is departing from the HDA legacy driver flow though. Aside setting codec_mask, hda_codec_detect_mask() also programs GCTL_UNSOL . With this patch, we drop this programming at resume. Not an issue for HDMI codecs, but for regular HDA jack/speaker codecs this can be a real issue. Could we instead just look at the HDA bits in hda_codec_detect_mask() and ignore the SDW codec bits?
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.
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 Let me think and return to this tomorrow. I think that limitation to SDI0/2 might actually be most practical as SOF doesn't really support anything else (not now and not expected we need this in the future for HDA). But let me still think of other options.
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 I think we need to keep UNSOL programming anyways. The reset value is 0 so it must be programmed on resume when we have normal cases with some HDA codecs. But yeah, I think I'd be ok with both 1) commit 9a56dbf And also ok would be 2) Not sure which (1 or 2) is cleaner...
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. @kv2019i I chose option 2 :). test before programing UNSOL? |
||
|
|
||
| /* clear stream status */ | ||
| list_for_each_entry(stream, &bus->stream_list, list) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in commit: "waken event" -> "wake event"