You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] no sound coming from speakers when playing 16-bit clips on DeepBuffer PCM dev #6595
changed the title [-][BUG] no sound coming from speakers with 16-bit playback on DeepBuffer PCM dev[/-][+][BUG] no sound coming from speakers when playing 16-bit clips on DeepBuffer PCM dev[/+]on Nov 15, 2022
Hi @RanderWang , it's I2S rt5682+max, 32-bit playback works fine although I only tested once, here is the log for 16-bit playback: dmesg-deepplay-16b.txt
It works on SDW and HDA platform. I only tested with nocodec tplg since we don't have a platform with I2S codec. It is not caused by deep buffer setting, instead about SSP format selection in driver. I will debug it. Currently SSP uses 24bit valid sample bits /32bit container size, but it should use 32/32
we need to set output bits to 32 according to be compatible with SSP. Why 24bit is used in deep buffer ? 24bits is faster than 32bits in FW implementation. The original non-deepbuffer use 32bit is not a optimal way and I will refine them later
SSP."0" {
id0dai_index0direction"duplex"nameSSP0-Codecdefault_hw_conf_id0sample_bits32// set valid bit to 32io_clk$MCLKObject.Base.hw_config."SSP0" {
id0mclk_freq$MCLKbclk_freq3072000tdm_slot_width32
}
}
We are encountering issues with unsupported formats in internal testing. AFAIK someone on our team will be working on this now. @RanderWang Please help to mitigate the issue for now, proper support for currently unsupported formats should be coming soon.
Double checked the same with our backported kernel series, with DEEPBUFFER_FW_DMA_MS=100, failed to run playback on either Speakers or Deepbuffer Amps, but both works fine with DEEPBUFFER_FW_DMA_MS=50. Since the original silent playing issue was fixed by format override, let's close this one, thanks all for the great support!!
Activity
[-][BUG] no sound coming from speakers with 16-bit playback on DeepBuffer PCM dev[/-][+][BUG] no sound coming from speakers when playing 16-bit clips on DeepBuffer PCM dev[/+]RanderWang commentedon Nov 16, 2022
@yongzhi1 it is a sdw platform ? do you have kernel log ? And is it caused by 16bits ?
yongzhi1 commentedon Nov 16, 2022
Hi @RanderWang , it's I2S rt5682+max, 32-bit playback works fine although I only tested once, here is the log for 16-bit playback:
dmesg-deepplay-16b.txt
RanderWang commentedon Nov 16, 2022
It works on SDW and HDA platform. I only tested with nocodec tplg since we don't have a platform with I2S codec. It is not caused by deep buffer setting, instead about SSP format selection in driver. I will debug it. Currently SSP uses 24bit valid sample bits /32bit container size, but it should use 32/32
RanderWang commentedon Nov 16, 2022
@yongzhi1 The mixout-gain-dai-copier-playback.conf is for HDA by default and you override copier at https://github.com/yongzhi1/sof/blob/deepbuffer/tools/topology/topology2/cavs/cavs-rt5682.conf#L165, can you also override the format ? use only 32/32 ?
[update] this way can't work since driver can't use it.
yongzhi1 commentedon Nov 16, 2022
Hi, @RanderWang, thanks for the analysis, made the following changes, but did not see improvement.
Also the volume level from Spk sound fine w/o above changes:
card 0: sofrt5682 [sof-rt5682], device 1: Speakers () [] <= vol OK
card 0: sofrt5682 [sof-rt5682], device 11: Deepbuffer Amps () [] <= silent playing observed
Let me try to override the deepbuffer pipleline.
RanderWang commentedon Nov 17, 2022
@yongzhi1 can you share the kernel msg ? we don't have a platform with I2S codec so we can't try. And how about my PR 4016 ? Thanks!
yongzhi1 commentedon Nov 17, 2022
Second try, still did not make any difference.dmesg-deep-override.txt
Log for PR4016, dmesg-pr4016.txt, no sound still.
RanderWang commentedon Nov 17, 2022
@yongzhi1 thanks ! Format 24/32 is used in dmesg-deep-override.txt but 32/32 is used by dmesg-pr4016.txt. Both no sound ? this PR #6583 can work ?
RanderWang commentedon Nov 17, 2022
Can you try closed source fw ?
RanderWang commentedon Nov 17, 2022
@yongzhi1 please try this. I tried your change #6595 (comment) and driver reported a error that no matched format
RanderWang commentedon Nov 17, 2022
we need to set output bits to 32 according to be compatible with SSP. Why 24bit is used in deep buffer ? 24bits is faster than 32bits in FW implementation. The original non-deepbuffer use 32bit is not a optimal way and I will refine them later
yongzhi1 commentedon Nov 17, 2022
Hi, @RanderWang, tried closed src FW, it did not help.
Here is the log with PR4016 + tplg changes, still no sound from 'Deepbuffer Amps' dev.
dmesg-pr4016+tplg.txt
0001-tplg-changes.txt
With #6583, yes I can hear sound, dmesg-pr6583.txt.
RanderWang commentedon Nov 18, 2022
@yongzhi1 do you use dmic to check sound ? And can I use your device ?
RanderWang commentedon Nov 18, 2022
with tplg and 4016 change, why the ouput is still 0x1802 ( 2ch 24 bit), it should b 0x2002 (32bit 2ch)
[ 233.152302] sof-audio-pci-intel-mtl 0000:00:1f.3: copier copier.SSP.4.1, type 27
[ 233.152312] sof-audio-pci-intel-mtl 0000:00:1f.3: sample rate: 48000 sample width: 32 channels: 2
[ 233.152322] sof-audio-pci-intel-mtl 0000:00:1f.3: dai index 1 nhlt type 3 direction 0
[ 233.152335] sof-audio-pci-intel-mtl 0000:00:1f.3: matching audio format index for 48000Hz, 24bit, 2 channels: 0
[ 233.152344] sof-audio-pci-intel-mtl 0000:00:1f.3: Init input audio formats for copier.SSP.4.1
[ 233.152351] sof-audio-pci-intel-mtl 0000:00:1f.3: #0: 48000KHz, 32bit (ch_map 0xffffff10 ch_cfg 1 interleaving_style 0 fmt_cfg 0x1802)
[ 233.152362] sof-audio-pci-intel-mtl 0000:00:1f.3: Init output audio formats for copier.SSP.4.1
[ 233.152369] sof-audio-pci-intel-mtl 0000:00:1f.3: #0: 48000KHz, 32bit (ch_map 0xffffff10 ch_cfg 1 interleaving_style 0 fmt_cfg 0x1802)
yongzhi1 commentedon Nov 22, 2022
Hi @RanderWang , compared with your nocodec.conf, changed DEEP_BUFFER_PCM_ID from 11 to 31, now it works as expected:dmesg-deep-tplg-override-02.txt, thanks!!
With same kernel and tplg, when I switched to mtl-002-drop-stable, now it failed for a different reason:
mtrace-deep-play-failure.txt
RanderWang commentedon Nov 22, 2022
@yongzhi1 it worked with closed source fw but failed with mtl-002 ?
There is a known issue: #6598
kfrydryx commentedon Nov 22, 2022
We are encountering issues with unsupported formats in internal testing. AFAIK someone on our team will be working on this now.
@RanderWang Please help to mitigate the issue for now, proper support for currently unsupported formats should be coming soon.
yongzhi1 commentedon Nov 23, 2022
Double checked the same with our backported kernel series, with DEEPBUFFER_FW_DMA_MS=100, failed to run playback on either Speakers or Deepbuffer Amps, but both works fine with DEEPBUFFER_FW_DMA_MS=50. Since the original silent playing issue was fixed by format override, let's close this one, thanks all for the great support!!