forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 1
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
topology1: sof-tgl-max98357a-rt5682: Add DTS playback pipeline support #29
Closed
Conversation
This file contains 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
Adding support for nau8318 Amplifier. sof-adl-nau8318-nau8825: nau8825 headphone connects SSP0 link. nau8318 Amp speakers connects SSP1 link. bluetooth offload uses SSP2 link. Signed-off-by: Ajye Huang <[email protected]> Signed-off-by: Mac Chiang <[email protected]> (cherry picked from commit cdcbdae)
There is a rballoc() call during module_init() lacking the correspondent rfree() on module_free(). Replace it with module_allocate_memory() to ensure the memory to be freed by module_adapter. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit eedd76a)
Adds new topology build based on sof-adl-max98360a-rt5682-2way with appending arg `-DDMIC_DAI_LINK_16k_PDM=STEREO_PDM1` for existing ADL-P projects. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit feeb51f)
Instead of acquiring and releasing buffers locally multiple times, do that once for .copy(), .trigger() and .prepare() methods. Signed-off-by: Guennadi Liakhovetski <[email protected]> (cherry picked from commit 6c94904)
…hone. There are two pops caused by SOF Firmware. Pop occurs when switch from headphone to speaker: When switch to headphone, audio playback data still remains in DSM internal processing buffer and not consumed by DMA. So when switch back to speaker, the DSM processing buffer is not clean, then pop noise occurs. We can clean and reset the point for DSM internal processing buffer by called this function 'smart_amp_init' in function 'smart_amp_prepare'. Pop occurs when switch from speaker to headphone: The feedback and feed-forward buffer processing should be independent. But the number of frames processed by DSM feedforward is corrupted by feedback buffer calculation. When capture pipeline exists, the number of frames for feedforward is always same as feedback. And the number of frames for feedback is zero at the first time when the capture pipeline setup. Then the number of frames processed by DSM feed forward is also zero though there are many frames in playback buffer. So the available frames will become larger. It is easy to exceed the limit size of DSM input. Then it will cause the buffer overflow and we could hear obvious pop noise from speaker. We fix it by calculating the number of frames for feedforward and feedback respectively. Signed-off-by: Long Wang <[email protected]> (cherry picked from commit 8a1798e)
When GOOGLE_RTC_AUDIO is applied, Speaker and DMIC pipeline tasks are scheduled in the same domain. The AEC function in GOOGLE_RTC_AUDIO has the hard requirement for input sample synchronization between DMIC input and Echo reference (sourced from Speaker). At present, both pipelines are pri-0 so the task order in schedule list depends on which pipeline starts first. This commit sets DMIC as pri-1 when GOOGLE_RTC_AUDIO is applied to make sure that DMIC task will be always put after Speaker task, which guarantees the requirement for input sample synchronization. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit 975dc84)
Adding support for Bluetooth offload. sof-adl-rt1019-rt5682, and sof-adl-rt1019-rt5682-waves: rt5682 headphone connects SSP0 link. rt1019 Amp speakers connects SSP1 link. bluetooth offload uses SSP2 link. Signed-off-by: Ajye Huang <[email protected]>
If DMA is active, do not read data directly from the SSP RX fifo. Signed-off-by: Kai Vehmanen <[email protected]> (cherry picked from commit e94071f)
If DMA transaction is ongoing when RX is enabled, this can lead to stuck communication between DMA and SSP (DMA service request not seen by the DMA). To avoid this, flush the RX fifo before enabling SSP RX. Link: thesofproject#7548 Suggested-by: Peter Ujfalusi <[email protected]> Signed-off-by: Kai Vehmanen <[email protected]> (cherry picked from commit 4a4d8d2)
When resetting a pipeline, components may be still in active state if previous pipeline walkthrough of stop trigger aborted due to some reason. Here we give it a second chance to stop the component before resetting it. Without doing this, some components like dai could cause DSP panic because the DMA is still running. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit eff50e4)
…iguration To handle zero config size case in set_configuration would let dts_codec_apply_config never be called due to early return when checking if md->new_config_size is zero. This causes the problem that DTS tuning parameter would never be set. Instead, check the config size in dts_codec_apply_config() could resolve the zero config case and let the tuning parameter could be set successfully. Signed-off-by: Joe.Cheng <[email protected]> (cherry picked from commit b19c8e1)
The receive FIFO needs to be drained in a different way depending when it is done. - before start If the RX FIFO is in overflow state then we must read all the entries out to empty it (it was after all full). - before stop The DMA might be already running to read out data. Check the FIFO level change in one sample time which gives us the needed information to decide to wait for another loop for the DMA burst to finish, wait for the DMA to start it's burst (DMA request was asserted) or drain the FIFO directly. No need to drain the RX fifo at probe time. Signed-off-by: Peter Ujfalusi <[email protected]> (cherry picked from commit 69d56a7)
DYNAMIC topology should not be used for pipeline with volatile Kcontrols. Hence ensuring the flag is un defined before processing smart amp related PCM and DAI configs Suggested-by: Sridharan, Ranjani <[email protected]> Signed-off-by: Sathya Prakash M R <[email protected]> (cherry picked from commit 214f983)
Follows after: 214f983 ("smart amp : Do not use DYNAMIC topology") which makes DYNAMIC undefined during smart amp tplg pipeline pcm/dai config due to the use of volatile Kcontrols. This commit applies the same on sof-eq-iir-dts-codec-smart-amplifier.m4 which is used for (DTS + smart amp) projects. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit ad2f035)
Introduced var WAVES_SPK_ONLY (depend on WAVES) for specifying the topology requested to apply Waves module on Speaker pipeline only (not on Heaadphones). Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit b793d1c)
use dynamic for all the adl and rpl topologies except 3p(waves,DTS), excluded Dell sdw topologies which are not tested. Signed-off-by: Vamshi Krishna Gopal <[email protected]>
Add an new topology adl-max98360a-da7219.tplg for DA7219 headphone codec with MAX98360A speaker amplifier on ADL boards. The MCLK frequency is set to 24.576MHz to use PLL bypass mode and avoid the WCLK locking problem on earlier platforms. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit dca9085)
Add a new topology sof-adl-rt5650 for ALC5650 which supports SSP0 for headset and SSP1 for speakers since this codec implements two I2S interfaces. DAI format changed to mclk: 24.576MHz, bclk: 3.072MHz, sample bits: 24-bit to avoid using ASRC function on codec side. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit bd6933b)
This is a release branch, we shouldn't be using any "latest" docker image. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 94efb26)
Dropping *.yml change from the original commit cause there is no west.yml in this branch. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 3d69a7f) (cherry picked from commit 78302db)
This will make sure platforms without an open-source toolchain available are added to SUPPORTED_PLATFORMS and do not break the -a option Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 8a7a1ad)
This should get rid of most warnings in daily tests ``` Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/ 2022-09-22-github-actions-all-actions-will-begin-running-on-node16... Please update the following actions to use Node.js 16: actions/checkout@v2 ``` Example at https://github.com/thesofproject/sof/actions/runs/3597808171 v3 seems backward compatible. Upgrade only the most used instances for now (most used because of the `matrix` of platforms), upgrade everything in a few days if no issue is spotted. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit f71eb15)
This upgrade was already performed for other jobs in commit f71eb15 (".github/workflows: upgrade actions/checkout@v2 -> v3") and everything went fine. Finish the job and get rid of the last warnings in the daily tests (example: https://github.com/thesofproject/sof/actions/runs/3709176785) stable-v2.2: dropped sof-docs action which does not exist in this branch. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 2ea4bc0) (cherry picked from commit c22378c)
Search and replace checkout@v2 with checkout@v3. This finally gets rid of all warnings "Node.js 12 actions are deprecated". We've been using v3 in a few other places and never met any backwards compatibility issue. Fixed testbench.yml conflict, still embedded in pull-request.yml Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 65a68b7) (cherry picked from commit 7fd3788)
Fixes commit d09844a ("zephyr/docker-build.sh: match UID with 'adduser' instead of 'chgrp -R'") Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit dfc6b46)
sudo-cwd.sh was developed on the main branch for zephyr but now we want to re-use it for building topologies. Cherry-pick only that script, not the zephyr parts. Original commit message: Besides making things more obvious, the important functional change is that the user switch is now performed for _every_ invoked, command, not just for the build command. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 027be98) (cherry picked from commit df10f9f)
This script is now generic. This was not done earlier to be gentle on git blame. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 0a4b1d6)
Fixes commit d09844a ("zephyr/docker-build.sh: match UID with 'adduser' instead of 'chgrp -R'") Also clarify comment and add reference to new sudo-cwd.sh script. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit c28400b)
Support downloads from within the container. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 424da2c) (cherry picked from commit dbcf7e1)
Copying a file that does not exist obviously fails. This bug was found when trying to switch from the current "Developer Image" to the smaller "CI Image": https://github.com/zephyrproject-rtos/docker-image/pkgs/container/zephyr-build Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 75fa04d)
There is a UID mistmatch and file permission problem. sudo-cwd.sh will switch id every docker run command. 80e9c34 was reverted due to missing a toolchain. Signed-off-by: Fred Oh <[email protected]> (cherry picked from commit 745d4cc)
This is a partial fix for thesofproject#7709; doc updates still to be done. Quoting @cujomalainey in - thesofproject#7699 > I still don't see the benefit here. This branch and IPC3 are mostly > stable/archived. Hence anything we fuzz on main we should be able to > cherry-pick down. Nothing new should be landing on this branch so I > don't see the benefit of continued fuzzing past support on main. Quoting @andyross in - thesofproject#7675 > I guess my gut says that fuzzing is a technique for validation of > new code. It has minimal (but sure, not zero) value on maintenance > branches that are expected to be protocol-compatible in perpetuity. Signed-off-by: Marc Herbert <[email protected]> (cherry picked from commit 3ddd15c)
When we added the flags to disable SSP0 and SSP1 on the UP2, we took the shortcut of just removing the PCMs in topology but left the pipelines and widgets in the topology in. While this works in practice to prevent us from testing those SSPs, the right way is to also remove those pipelines also when the SSPs are disabled. This stops tplgtool2.py from complaining constantly about this inconsistency since thesofproject/sof-test#1079 which made the sof-test verify-tplg-binary.sh fail every time: ``` tplgtool2.py sof-glk-nocodec.tplg ERROR: No pcm id=0 for widget=PCM0C ERROR: No pcm id=1 for widget=PCM1C ERROR: No pcm id=0 for widget=PCM0P ERROR: No pcm id=1 for widget=PCM1P ERROR: tplgtool2.py returned 4 ``` This change affects only sof-apl-nocodec and sof-glk-nocodec. Signed-off-by: Marc Herbert <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> (cherry picked from commit 9ccfbc4)
Enable bclk early start to remove speaker pop noise when resuming from S3 or switching audio path. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit a0cf075)
Dynamic pipeline breaks mclk always-on feature by freeing dai component in HW_FREE stage; the ssp_remove() will be called and disables mclk unconditionally. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit 6dc474c)
Enable mclk always-on feature to remove pop noise during HW_FREE stage. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit 87ef48b)
Enable mclk always-on feature to remove pop noise during HW_FREE stage. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit f35515a)
Store/apply config blob in a cache to avoid that cfg.data will be released after prepare. Signed-off-by: barry.jan <[email protected]>
Enabling dts pipeline on HDA0 speaker/headphone playaback. In this case, using defined macro W_PIPELINE_TOP() to add missing dai pipeline is due to topology not found it for PCM0P. Signed-off-by: Mac Chiang <[email protected]>
Enabling dynamic pipeline on RTNR-integrated topologies will causes DSP crashes. By now dynamic pipeline is planned to be applied on all adl/rpl topologies without third-party modules. RTNR should be excluded as well. Signed-off-by: Pin-chih Lin <[email protected]>
Adds new topology builds integrating DRC/EQ on Speaker pipeline. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit cdb87ad)
In present multiband_drc design, the enabled state is determined by the switch control while multiband_drc starts to process. If the switch control toggles while processing, it will take effects on the next time multiband_drc starts to process. This commit makes change to let the enabled state update instantaneously by the switch control toggle when multiband_drc is processing. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit 8e8ff75)
allocated memory in waves.c Enhance payload corruption handling by verifying size and make sure to have clean buffer before using it. Signed-off-by: barry.jan <[email protected]> (cherry picked from commit 355e46f)
The default names for Waves bytes control are different betweeen tgl-012-drop-stable and cavs2.5-001-drop-stable. For the purpose of keeping config API constant during branch migration, this commit aligns the control names backward for TGL topology builds only. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit 2e3ebfb)
Adds topology builds with Waves codec integrated for TGL usage. Signed-off-by: Pin-chih Lin <[email protected]> (cherry picked from commit 7cedb3e)
d287016caac7 rimage: fix file operations error checks Signed-off-by: Adrian Bonislawski <[email protected]>
This will check return value from memcpy_s Signed-off-by: Adrian Bonislawski <[email protected]>
This will fix integer overflow Signed-off-by: Adrian Bonislawski <[email protected]>
Add new pipelines to sof-hda-generic.m4 to support BT audio offload on SSP2 if BT_OFFLOAD is defined in makefile. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit 307ddc7)
Add an new topology sof-hda-generic-4ch-bt.tplg which supports 4-channel DMIC PCM and BT audio offload for Chromebooks. Signed-off-by: Brent Lu <[email protected]> (cherry picked from commit e05ca34)
Creates a new demux pipleline: sof-eq-iir-dts-codec-demux-playback.m4 for speaker playback. Leverages existing pipleine: sof-eq-iir-dts-codec-playback.m4 for headphone playback. Signed-off-by: Mac Chiang <[email protected]>
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.
No description provided.