Repository navigation
fixup! ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format - #4665
Merged
Merged
Conversation
Commit 7f9512a ("ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format") assumed that the codec_ch_maps is set unconditionally. This is however not true in the nocodec mode, the codec_ch_maps is not set for the dummy dais. Note that this fixes thesofproject#4655 but on the second playback we still have a DSP panic. It's likely a separate issue likely tied to topology or multi-core handling. [ 118.660171] snd_sof:sof_widget_setup_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget smart_amp.2.1 setup complete [ 118.660174] snd_sof:sof_ipc4_widget_setup: sof-audio-pci-intel-lnl 0000:00:1f.3: Create widget dai-copier.SSP.NoCodec-0.playback instance 1 - pipe 2 - core 0 [ 118.660176] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc tx : 0x40010004|0x10056: MOD_INIT_INSTANCE [data size: 344] [ 118.663559] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc rx : 0x1b0a0000|0x0: GLB_NOTIFICATION|EXCEPTION_CAUGHT [ 118.663565] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ DSP dump start ]------------ [ 118.663571] sof-audio-pci-intel-lnl 0000:00:1f.3: DSP panic! [ 118.663573] sof-audio-pci-intel-lnl 0000:00:1f.3: fw_state: SOF_FW_BOOT_COMPLETE (7) [ 118.663585] sof-audio-pci-intel-lnl 0000:00:1f.3: ROM status: 0x5, ROM error: 0x0 [ 118.663587] sof-audio-pci-intel-lnl 0000:00:1f.3: ROM debug status: 0x0, ROM debug error: 0x0 [ 118.663592] sof-audio-pci-intel-lnl 0000:00:1f.3: ROM feature bit enabled [ 118.663614] snd_sof:sof_ipc4_find_debug_slot_offset_by_type: sof-audio-pci-intel-lnl 0000:00:1f.3: Slot type 0x4c455400 is not available in debug window [ 118.663616] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ DSP dump end ]------------ [ 118.663619] snd_sof:sof_set_fw_state: sof-audio-pci-intel-lnl 0000:00:1f.3: fw_state change: 7 -> 8 [ 118.663629] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc rx done : 0x1b0a0000|0x0: GLB_NOTIFICATION|EXCEPTION_CAUGHT [ 119.168384] sof-audio-pci-intel-lnl 0000:00:1f.3: ipc timed out for 0x40010004|0x10056 [ 119.168396] sof-audio-pci-intel-lnl 0000:00:1f.3: Attempting to prevent DSP from entering D3 state to preserve context [ 119.168399] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ IPC dump start ]------------ [ 119.168445] sof-audio-pci-intel-lnl 0000:00:1f.3: Host IPC initiator: 0xc0010004|0x10056|0x0, target: 0x1b0a0000|0x0|0x0, ctl: 0x3 [ 119.168449] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ IPC dump end ]------------ [ 119.168452] sof-audio-pci-intel-lnl 0000:00:1f.3: IPC timeout [ 119.168476] sof-audio-pci-intel-lnl 0000:00:1f.3: failed to create module dai-copier.SSP.NoCodec-0.playback [ 119.168490] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget smart_amp.2.1 freed [ 119.168493] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget gain.2.1 freed [ 119.168498] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc tx : 0x12010000|0x0: GLB_DELETE_PIPELINE [ 119.168605] sof-audio-pci-intel-lnl 0000:00:1f.3: ipc4_tx_msg_unlocked: ipc message send for 0x12010000|0x0 failed: -19 [ 119.168609] sof-audio-pci-intel-lnl 0000:00:1f.3: failed to free pipeline widget pipeline.2 [ 119.168613] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget mixin.1.1 freed [ 119.168616] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget gain.1.1 freed [ 119.168620] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc tx : 0x12000000|0x0: GLB_DELETE_PIPELINE [ 119.168622] sof-audio-pci-intel-lnl 0000:00:1f.3: ipc4_tx_msg_unlocked: ipc message send for 0x12000000|0x0 failed: -19 [ 119.168625] sof-audio-pci-intel-lnl 0000:00:1f.3: failed to free pipeline widget pipeline.1 [ 119.168627] sof-audio-pci-intel-lnl 0000:00:1f.3: Failed to set up connected widgets [ 119.168634] sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed widget list set up for pcm 0 dir 0 [ 119.168637] sof-audio-pci-intel-lnl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -110 [ 119.168663] Port0: ASoC: error at __soc_pcm_hw_params on Port0: -110 [ 119.168695] Port0: ASoC: error at dpcm_fe_dai_hw_params on Port0: -110 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart
requested review from
bardliao,
dbaluta,
kuanhsuncheng,
kv2019i,
lgirdwood,
ranj063,
ujfalusi,
vijendarmukunda and
yaochunhung
as code owners
October 26, 2023 19:24
bardliao
approved these changes
Oct 27, 2023
ujfalusi
reviewed
Oct 27, 2023
| ch_mask |= rtd->dai_link->codec_ch_maps[codec_dai_id].ch_mask; | ||
| } | ||
| if (ch_mask) | ||
| num_channels = hweight_long(ch_mask); |
Collaborator
There was a problem hiding this comment.
Is this new check really needed?
Member
Author
There was a problem hiding this comment.
it doesn't really matter, all this code will have to be redone with the changes from Moritomo-san. See #4632
| num_channels = hweight_long(ch_mask); | ||
| } | ||
|
|
||
| num_channels = hweight_long(ch_mask); |
Collaborator
There was a problem hiding this comment.
This might be better convey the logic and line 251 and 257-258 can be dropped, and leave the ch_mask initialized at declaration (line 263 can be dropped)?
if (ch_mask)
num_channels = hweight_long(ch_mask);
else
num_channels = params_channels(params);|
Confirmed that this PR can fix #4655. Inner test ID:33777. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit 7f9512a ("ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format") assumed that the codec_ch_maps is set unconditionally.
This is however not true in the nocodec mode, the codec_ch_maps is not set for the dummy dais.
Note that this fixes
#4655 but on the second playback we still have a DSP panic. It's likely a separate issue likely tied to topology or multi-core handling.
[ 118.660171] snd_sof:sof_widget_setup_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget smart_amp.2.1 setup complete
[ 118.660174] snd_sof:sof_ipc4_widget_setup: sof-audio-pci-intel-lnl 0000:00:1f.3: Create widget dai-copier.SSP.NoCodec-0.playback instance 1 - pipe 2 - core 0
[ 118.660176] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc tx : 0x40010004|0x10056: MOD_INIT_INSTANCE [data size: 344]
[ 118.663559] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc rx : 0x1b0a0000|0x0: GLB_NOTIFICATION|EXCEPTION_CAUGHT
[ 118.663565] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ DSP dump start ]------------
[ 118.663571] sof-audio-pci-intel-lnl 0000:00:1f.3: DSP panic!
[ 118.663573] sof-audio-pci-intel-lnl 0000:00:1f.3: fw_state: SOF_FW_BOOT_COMPLETE (7)
[ 118.663585] sof-audio-pci-intel-lnl 0000:00:1f.3: ROM status: 0x5, ROM error: 0x0
[ 118.663587] sof-audio-pci-intel-lnl 0000:00:1f.3: ROM debug status: 0x0, ROM debug error: 0x0
[ 118.663592] sof-audio-pci-intel-lnl 0000:00:1f.3: ROM feature bit enabled
[ 118.663614] snd_sof:sof_ipc4_find_debug_slot_offset_by_type: sof-audio-pci-intel-lnl 0000:00:1f.3: Slot type 0x4c455400 is not available in debug window
[ 118.663616] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ DSP dump end ]------------
[ 118.663619] snd_sof:sof_set_fw_state: sof-audio-pci-intel-lnl 0000:00:1f.3: fw_state change: 7 -> 8
[ 118.663629] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc rx done : 0x1b0a0000|0x0: GLB_NOTIFICATION|EXCEPTION_CAUGHT
[ 119.168384] sof-audio-pci-intel-lnl 0000:00:1f.3: ipc timed out for 0x40010004|0x10056
[ 119.168396] sof-audio-pci-intel-lnl 0000:00:1f.3: Attempting to prevent DSP from entering D3 state to preserve context
[ 119.168399] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ IPC dump start ]------------
[ 119.168445] sof-audio-pci-intel-lnl 0000:00:1f.3: Host IPC initiator: 0xc0010004|0x10056|0x0, target: 0x1b0a0000|0x0|0x0, ctl: 0x3
[ 119.168449] sof-audio-pci-intel-lnl 0000:00:1f.3: ------------[ IPC dump end ]------------
[ 119.168452] sof-audio-pci-intel-lnl 0000:00:1f.3: IPC timeout
[ 119.168476] sof-audio-pci-intel-lnl 0000:00:1f.3: failed to create module dai-copier.SSP.NoCodec-0.playback
[ 119.168490] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget smart_amp.2.1 freed
[ 119.168493] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget gain.2.1 freed
[ 119.168498] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc tx : 0x12010000|0x0: GLB_DELETE_PIPELINE
[ 119.168605] sof-audio-pci-intel-lnl 0000:00:1f.3: ipc4_tx_msg_unlocked: ipc message send for 0x12010000|0x0 failed: -19
[ 119.168609] sof-audio-pci-intel-lnl 0000:00:1f.3: failed to free pipeline widget pipeline.2
[ 119.168613] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget mixin.1.1 freed
[ 119.168616] snd_sof:sof_widget_free_unlocked: sof-audio-pci-intel-lnl 0000:00:1f.3: widget gain.1.1 freed
[ 119.168620] snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-lnl 0000:00:1f.3: ipc tx : 0x12000000|0x0: GLB_DELETE_PIPELINE
[ 119.168622] sof-audio-pci-intel-lnl 0000:00:1f.3: ipc4_tx_msg_unlocked: ipc message send for 0x12000000|0x0 failed: -19
[ 119.168625] sof-audio-pci-intel-lnl 0000:00:1f.3: failed to free pipeline widget pipeline.1
[ 119.168627] sof-audio-pci-intel-lnl 0000:00:1f.3: Failed to set up connected widgets
[ 119.168634] sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed widget list set up for pcm 0 dir 0
[ 119.168637] sof-audio-pci-intel-lnl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -110
[ 119.168663] Port0: ASoC: error at __soc_pcm_hw_params on Port0: -110
[ 119.168695] Port0: ASoC: error at dpcm_fe_dai_hw_params on Port0: -110