Add compress interface to SOF - #2703
Closed
dbaluta wants to merge 1 commit into
Closed
Conversation
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.
This will allow playback of compressed files using SOF. This is still work in progress but I wanted to send the patches for early review to understand if I'm following a correct direction.
First 4 patches can be separately be merged and they are needed to make space for introducing the compress interface. There are a lot of similarities between compr and PCM and will try to make a common abstraction when possible.
With current patches I'm able to use compress interface to play PCM samples using dummy codec from SOF.
cplay -v -c 3 -d 0 -I PCM -b 65536 -f 2 sample.wavFirst step in trying to unify PCM / compr handling is adding
snd_compr_streamfiled tosnd_sof_pcm_stream:Next is having a common
snd_sof_period_elapsedfunction for both PCM / compr.Looking at
snd_compress_opsandsof_pcm*there are some common part (with particular stress onsof_pcm_hw_paramsandsof_compr_set_paramsbut I preferred for now to keep the changes separate (even if there is some duplicate code).Please have a look and let me know what you think at first glance. More patches will come in the next days as I'm trying to support a real codec.
Cc: @paulstelian97 @iuliana-prodan @TE-N-ShengjiuWang