Repository navigation
[BUG][TGL Chrome] Failed to open Internal Microphone on plugging/unplugging a headset #4593
Description
Describe the bug
Using online voice record to do recording.
Plug and unplug a headset while recording via internal Mic would fail.
To Reproduce
- Start recording by "Online Voice Recorder" on Chrome Browser. During the following steps, make the sound and check the waveform to make sure the recording is still valid.
- (No headset is plugged) record by Internal Microphone.
- Plug the headset, and record by headset Mic.
- Switch the input to Internal Microphone by UI, and record by Internal Microphone.
- Un-plug the headset, and record by Internal Microphone
- Repeat step3, 4, 5 if the recording is still fine.
Reproduction Rate
1/10
Expected behavior
The recording is always valid
Impact
blocker
Environment
tgl-13 branch with IGO patches & IGO binary
Issue still reproduced with PR #4575
Screenshots or console output
messages: (Withour PR #4575)
2021-08-02T08:54:53.233950Z ERR cras_server[9552]: hw_params: Timer expired: rate: 48000, ret_rate: 48000, channel: 2, format: 2
2021-08-02T08:54:53.234014Z ERR kernel: [ 1788.544852] sof-audio-pci 0000:00:1f.3: error: ipc error for 0x80010000 size 12
2021-08-02T08:54:53.234028Z ERR kernel: [ 1788.544860] sof-audio-pci 0000:00:1f.3: error: failed to set DAI config for SSP1-Codec
2021-08-02T08:54:53.234030Z ERR kernel: [ 1788.544864] sof-audio-pci 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on SSP1 Pin: -62
2021-08-02T08:54:53.234031Z ERR kernel: [ 1788.544868] SSP1-Codec: ASoC: hw_params BE failed -62
2021-08-02T08:54:53.234033Z ERR kernel: [ 1788.544870] smart373-spk: ASoC: hw_params BE failed -62
sof-logger:( Without PR #4575)
[ 3578745940.241330] ( 2503.489502) c0 dmic-dai 2.1 src/drivers/intel/dmic.c:1560 dmic_irq_handler(), OUTSTAT0 = 0x28000000, OUTSTAT1 = 0x80000000
[ 3578745950.449663] ( 10.208333) c0 dmic-dai 2.1 src/drivers/intel/dmic.c:1563 ERROR dmic_irq_handler(): full fifo A or PDM overrun
[ 3578745961.178829] ( 10.729166) c0 dmic-dai 2.1 src/drivers/intel/dmic.c:1450 dmic_stop(), dmic_active_fifos = 1
[ 3578745973.001745] ( 11.822916) c0 ll-schedule ./schedule/ll_schedule.c:539 task cancel 0x9e265908 dmic-work <59c87728-d8f9-42f6-b89d-5870a87b0e1e>
[ 3578763481.178133] ( 17508.175781) c0 idc src/idc/idc.c:113 ERROR idc_wait_in_blocking_mode() error: timeout
Activity
lancedkhou commentedon Aug 3, 2021
uploading sof-logger and kernel/system messages.
sof-logger.txt
messages.txt
lgirdwood commentedon Aug 3, 2021
@bkokoszx @RDharageswari @sathya-nujella @keyonjie fyi.
lgirdwood commentedon Aug 3, 2021
This could be related to #4584 and #4568 as it seems we have some MCPS overshoot which cascades into a DMIC FIFO overrun. It could be the IDC starting and blocking the DMIC being drained.
[-][BUG][TGL] Failed to open Internal Microphone on plugging/unplugging a headset[/-][+][BUG][TGL Chrome] Failed to open Internal Microphone on plugging/unplugging a headset[/+]johnylin76 commentedon Aug 4, 2021
Hi Lance, thanks for the bug creation. In fact we have some updates in the following comments in the original bug.
After adopting PR #4575 fix, the situation you mentioned above seems quite hard to be reproduced then.
But we also have observed another issue with PR #4575 fix, the scenario is using "Google Meet". It would be observed that it failed to start capturing with PCM99 and Google Meet lost the audio input.
To Reproduce
Reproduction Rate
1/10
Expected behavior
The capture (Google Meet input) is always valid.
Here are some logs:
sof-logger.txt
messages.txt
From messages log there are DSP panic issue which is much alike PR #4584
lgirdwood commentedon Aug 4, 2021
Thanks @johnylin76 fwiw the log is very similar to above.
@lancedkhou are you able to apply this FW debug patch and reproduce. @sathya-nujella @bkokoszx I'm suspicious in this instance we send the IDC and block for too long.
johnylin76 commentedon Aug 5, 2021
Hi @lgirdwood , I repro-ed with your patch. Logs are as attached.
sof-logger.txt
messages.txt
lgirdwood commentedon Aug 6, 2021
@lancedkhou can you try #4608
This probably wont fix the issue, but it will give more insights for the team.
johnylin76 commentedon Aug 9, 2021
Hi @lgirdwood , I tried with #4608. Logs are as attached.
sof-logger.txt
messages.txt
btw I have removed the code for printing igo copy() message because I found out somehow the error log will disappear if I print igo copy() this time.
lgirdwood commentedon Aug 9, 2021
@johnylin76 thanks for the logs. @bkokoszx the logs are giving an idea that the following flow may be happening
@lancedkhou @johnylin76 can someone try 98e8016 as this allows IDC not run in the background and not block.
keyonjie commentedon Aug 10, 2021
Hi @lrgirdwo @johnylin76 FYI that @fuyuntsuo is debugging this form the IGO library side.
fuyuntsuo commentedon Aug 13, 2021
@keyonjie is this the same issue as #4418 ?
lgirdwood commentedon Aug 17, 2021
Yes, I think we have several issues potentially related to blocking IDC. @kv2019i fyi.
@lancedkhou did you get a chance to try 98e8016
@keyonjie I'm wondering if we should have IGO run in core 1 EDF context so it's preemptable by the short term IDC ?
keyonjie commentedon Aug 18, 2021
@johnylin76 @lancedkhou could you please let us know if #4515 + #4612 + #4640 can already fix this issue?
@lgirdwood hopefully we don't need more extra commits.
lancedkhou commentedon Aug 18, 2021
Hi Keyon,
With #4515 + #4612 + #4640 the issue can be fixed.
However, somehow there was still DSP panic found.
4575+4612+4640-DSP-panic-messages.txt
keyonjie commentedon Aug 18, 2021
@lancedkhou thanks, can you file it as another issue and share the reproduce steps there?
lancedkhou commentedon Aug 18, 2021
Hi Keyon,
Please be informed that a new issue #4648 was created to trace DSP panic.
lgirdwood commentedon Aug 27, 2021
@lancedkhou can we close ?
lancedkhou commentedon Aug 30, 2021
@lgirdwood Yes. Please.
sathya-nujella commentedon Aug 30, 2021
Hi,
Below PR's are used to test and confirm that this issue is not reproduced.
can you please help merge these, if reviews are done?
#4575
#4612
#4640
lgirdwood commentedon Aug 30, 2021
@mwasko @abonislawski fyi - this can be closed once backport PRs are merged.