Skip to content

[DON'T MERGE] topology: cht-max98090: set format S32_LE on SSP2.OUT - #3341

Closed
fredoh9 wants to merge 1 commit into
thesofproject:masterfrom
fredoh9:fix/bsw_s32_le_playback
Closed

fredoh9 wants to merge 1 commit into
thesofproject:masterfrom
fredoh9:fix/bsw_s32_le_playback

Conversation

@fredoh9

@fredoh9 fredoh9 commented Aug 24, 2020

Copy link
Copy Markdown
Contributor

This is the fix for S32_LE/S24_LE format playback.

fixes: #3340

Signed-off-by: Fred Oh fred.oh@linux.intel.com

This is the fix for S32_LE/S24_LE format playback.

fixes: thesofproject#3340

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
@fredoh9
fredoh9 requested a review from keyonjie August 24, 2020 18:17
@fredoh9

fredoh9 commented Aug 24, 2020

Copy link
Copy Markdown
Contributor Author

This change increases BUF1.0 and BUF1.1 buffer size from 384 to 768. Tested with S16_LE/S24_LE/S32_LE.

@fredoh9

fredoh9 commented Aug 24, 2020

Copy link
Copy Markdown
Contributor Author

pr-device-test result is also positive. check-playback-all-formats.sh is PASS now.

@fredoh9

fredoh9 commented Aug 24, 2020

Copy link
Copy Markdown
Contributor Author

alsabat test failed on BSW_CYAN. hum..., hardly imagine buff size affects alsabat testing. @keqiaozhang I tested with one more device with my change, seeing similar glitches. What do you think?

11:40:54  BAT analysis: signal has 65536 frames at 44100 Hz, 1 channels, 2 bytes per sample.
11:40:54  
11:40:54  Channel 1 - Checking for target frequency 997.00 Hz
11:40:54  Amplitude: 5.7; Percentage: [0]
11:40:54  Detected peak at 7.40 Hz of 9.28 dB
11:40:54   Total 9.3 dB from 7.40 to 7.40 Hz
11:40:54  Detected peak at 11.44 Hz of 7.51 dB
11:40:54   Total 12.8 dB from 11.44 to 12.11 Hz
11:40:54  Detected peak at 16.82 Hz of 8.59 dB
11:40:54   Total 14.2 dB from 16.82 to 16.82 Hz
11:40:54  Detected peak at 32.30 Hz of 6.90 dB
11:40:54   Total 14.9 dB from 32.30 to 32.30 Hz
11:40:54  Detected peak at 91.52 Hz of 6.76 dB
11:40:54   Total 15.6 dB from 91.52 to 91.52 Hz
11:40:54  Detected peak at 685.70 Hz of 7.43 dB
11:40:54   Total 16.2 dB from 685.70 to 685.70 Hz
11:40:54  Detected peak at 983.80 Hz of 6.59 dB
11:40:54   Total 16.6 dB from 983.80 to 983.80 Hz
11:40:54  Detected peak at 993.22 Hz of 7.77 dB
11:40:54   Total 17.5 dB from 992.55 to 993.22 Hz
11:40:54   PASS: Peak detected at target frequency
11:40:54  Detected peak at 995.24 Hz of 6.53 dB
11:40:54   Total 17.9 dB from 995.24 to 995.24 Hz
11:40:54   PASS: Peak detected at target frequency
11:40:54  Detected peak at 999.95 Hz of 17.97 dB
11:40:54   Total 23.4 dB from 996.58 to 1002.64 Hz
11:40:54   PASS: Peak detected at target frequency
11:40:54  Detected at least 10 signal(s) in total
11:40:54  
11:40:54  Return value is -1003

@fredoh9
fredoh9 requested a review from keqiaozhang August 24, 2020 18:57
@plbossart

Copy link
Copy Markdown
Member

this doesn't seem right @fredoh9, the SSP can only handle 16 bits for Cyan, see the SSP config:
0f37299#diff-ecdb294c36b938b54c1c83d66735f103R104

Also this used to work, see e.g. #3257 where we change the parameters for device 0,1. to support S24/S32_LE. Device 0,0 had no problem with S32/S24_LE.

@fredoh9

fredoh9 commented Aug 24, 2020 •

Copy link
Copy Markdown
Contributor Author

Also this used to work, see e.g. #3257 where we change the parameters for device 0,1. to support S24/S32_LE. Device 0,0 had no problem with S32/S24_LE.

@plbossart check-playback-all-formats.sh was run only in daily build. Recently Chao added to PR test. As far as I know, this test on BSW CYAN never worked.

I'm very narrow sighted. if "the SSP can only handle 16 bits for Cyan" so, how can we support 24bit/32bit for CYAN? I need your help. Or should be remove 24bit/32bit PCM capability from the topology?

@plbossart

Copy link
Copy Markdown
Member

@fredoh9 can you try #3343 instead? I think there's a problem with the deep-buffer size that's not been mirrored for Cyan.

@keyonjie

Copy link
Copy Markdown
Contributor

alsabat test failed on BSW_CYAN. hum..., hardly imagine buff size affects alsabat testing. @keqiaozhang I tested with one more device with my change, seeing similar glitches. What do you think?

11:40:54  BAT analysis: signal has 65536 frames at 44100 Hz, 1 channels, 2 bytes per sample.
11:40:54  
11:40:54  Channel 1 - Checking for target frequency 997.00 Hz
11:40:54  Amplitude: 5.7; Percentage: [0]
11:40:54  Detected peak at 7.40 Hz of 9.28 dB
11:40:54   Total 9.3 dB from 7.40 to 7.40 Hz
11:40:54  Detected peak at 11.44 Hz of 7.51 dB
11:40:54   Total 12.8 dB from 11.44 to 12.11 Hz
11:40:54  Detected peak at 16.82 Hz of 8.59 dB
11:40:54   Total 14.2 dB from 16.82 to 16.82 Hz
11:40:54  Detected peak at 32.30 Hz of 6.90 dB
11:40:54   Total 14.9 dB from 32.30 to 32.30 Hz
11:40:54  Detected peak at 91.52 Hz of 6.76 dB
11:40:54   Total 15.6 dB from 91.52 to 91.52 Hz
11:40:54  Detected peak at 685.70 Hz of 7.43 dB
11:40:54   Total 16.2 dB from 685.70 to 685.70 Hz
11:40:54  Detected peak at 983.80 Hz of 6.59 dB
11:40:54   Total 16.6 dB from 983.80 to 983.80 Hz
11:40:54  Detected peak at 993.22 Hz of 7.77 dB
11:40:54   Total 17.5 dB from 992.55 to 993.22 Hz
11:40:54   PASS: Peak detected at target frequency
11:40:54  Detected peak at 995.24 Hz of 6.53 dB
11:40:54   Total 17.9 dB from 995.24 to 995.24 Hz
11:40:54   PASS: Peak detected at target frequency
11:40:54  Detected peak at 999.95 Hz of 17.97 dB
11:40:54   Total 23.4 dB from 996.58 to 1002.64 Hz
11:40:54   PASS: Peak detected at target frequency
11:40:54  Detected at least 10 signal(s) in total
11:40:54  
11:40:54  Return value is -1003

@fredoh9 did this happen without your PR applied?

@fredoh9

fredoh9 commented Aug 25, 2020 •

Copy link
Copy Markdown
Contributor Author

@fredoh9 did this happen without your PR applied?

I don't think so, after checking PR's device test result, I checked with different CI BSW, alsabat test failed also.
I can do waveform analysis also later.

@plbossart

plbossart commented Aug 25, 2020 •

Copy link
Copy Markdown
Member

@fredoh9 I just tested this PR on a Cyan device, and while the issue with S32_LE goes away, the output is silent. There is NO sound coming out of the speakers, which seems aligned with my explanation above that the DAI assumes an S16_LE format.

@fredoh9

fredoh9 commented Aug 25, 2020

Copy link
Copy Markdown
Contributor Author

@plbossart Thank you double checking with this. All BSW devices are in remote, I couldn't check the sound output.
BTW, our CI is getting reliable to catch regression. :)

@fredoh9 fredoh9 changed the title topology: cht-max98090: set format S32_LE on SSP2.OUT [DON'T MERGE] topology: cht-max98090: set format S32_LE on SSP2.OUT Aug 25, 2020
@plbossart

Copy link
Copy Markdown
Member

@plbossart Thank you double checking with this. All BSW devices are in remote, I couldn't check the sound output.
BTW, our CI is getting reliable to catch regression. :)

Indeed, now we are dealing with real issues. Progress!

@lgirdwood lgirdwood closed this Mar 28, 2021
@lgirdwood
lgirdwood deleted the branch thesofproject:master March 28, 2021 13:44
@paulstelian97

Copy link
Copy Markdown
Collaborator

Is this still needed? If so, please resubmit with "main" as PR base branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][BSW] unable to install params when aplay on PCM0 in S24_LE/S32_LE

5 participants