-
Notifications
You must be signed in to change notification settings - Fork 140
SoundWire/ASoC-DPCM: debug incorrect states #3098
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
3f261e5
d1ed4e6
5ebc10c
60b8b69
4e75553
d0da8ff
06a145b
da72cae
0559ef6
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 | ||
|---|---|---|---|---|
|
|
@@ -711,15 +711,15 @@ intel_pdi_alh_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi) | |||
| } | ||||
|
|
||||
| static int intel_params_stream(struct sdw_intel *sdw, | ||||
| struct snd_pcm_substream *substream, | ||||
| int stream, | ||||
| struct snd_soc_dai *dai, | ||||
| struct snd_pcm_hw_params *hw_params, | ||||
| int link_id, int alh_stream_id) | ||||
| { | ||||
| struct sdw_intel_link_res *res = sdw->link_res; | ||||
| struct sdw_intel_stream_params_data params_data; | ||||
|
|
||||
| params_data.substream = substream; | ||||
| params_data.stream = stream; /* direction */ | ||||
| params_data.dai = dai; | ||||
| params_data.hw_params = hw_params; | ||||
| params_data.link_id = link_id; | ||||
|
|
@@ -732,14 +732,14 @@ static int intel_params_stream(struct sdw_intel *sdw, | |||
| } | ||||
|
|
||||
| static int intel_free_stream(struct sdw_intel *sdw, | ||||
| struct snd_pcm_substream *substream, | ||||
| int stream, | ||||
| struct snd_soc_dai *dai, | ||||
| int link_id) | ||||
| { | ||||
| struct sdw_intel_link_res *res = sdw->link_res; | ||||
| struct sdw_intel_stream_free_data free_data; | ||||
|
|
||||
| free_data.substream = substream; | ||||
| free_data.stream = stream; /* direction */ | ||||
| free_data.dai = dai; | ||||
| free_data.link_id = link_id; | ||||
|
|
||||
|
|
@@ -846,6 +846,12 @@ static int intel_hw_params(struct snd_pcm_substream *substream, | |||
| if (!dma) | ||||
| return -EIO; | ||||
|
|
||||
| if (dma->hw_params) { | ||||
|
||||
| int hda_ctrl_dai_widget_setup(struct snd_soc_dapm_widget *w) |
Then we won't have to repeat it for all DAIs
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.
no I think you need this anyway. I've added an extra patch to my PR to handle it.
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.
Sorry, you lost me here. the patch in your PR seems to address all DAIs, so what I added in the SoundWire-specific part seems like dead code?
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.
but my code wouldnt deal with the PDI stuff
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.
Sorry I don't get the answer @ranj063. Wouldn't your change result in the SDW DAI hw_free() being called?
I am worried of a possible double-free if you free on the SOF side and I redo it on the SoundWire side - since we are using different variables to decide to do a free...
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.
no @plbossart. My change only deals with the use_counts for the DAI widget. It will call only call hda_ctrl_dai_widget_free().
There won't be a double free because the first call will reset the configured flag for the DAI.
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.
See the call graph @ranj063 there will be a double free...
intel_hw_params
intel_hw_free
intel_free_stream
sdw_dai_config_ipc
hda_ctrl_dai_widget_free
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.
I have to revert "ASoC: SOF: handle paused streams during system suspend" now. Otherwise I will see
=== PAUSE === Suspended. Trying resume. Failed. Restarting stream. aplay: suspend:1691: suspend: prepare error: Invalid argument
[ 880.519173] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x30100000: GLB_TPLG_MSG: PIPE_NEW
[ 880.519273] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx error for 0x30100000 (msg/reply size: 48/20): -22
[ 880.519275] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load widget PIPELINE.31.ALH258.OUT
[ 880.519276] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to restore pipeline after resume -22
[ 880.519277] PM: dpm_run_callback(): pci_pm_resume+0x0/0x80 returns -22
[ 880.519284] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: failed to resume async: error -22
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.
Thanks @bardliao there must be something we missed, IIRC you are using firmware 1.8 and we're doing something different. Gah.
Uh oh!
There was an error while loading. Please reload this page.