-
Notifications
You must be signed in to change notification settings - Fork 349
pcm_converter: add implementations #2029
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
Conversation
|
@singalsu Can you take a look if processing looks OK? |
|
@xiulipan It builds locally for me. I think it will fail for ICL until we use new toolchain. |
ce6513b to
0923968
Compare
0aff449 to
59ec443
Compare
|
@fredoh9 checkpatch result is all clear here but CI reporting checpatch error ? |
I do see the split string error. This PR is from before that change to Checkpatch and I suppose may need updating due to this. |
c120bee to
45533e9
Compare
|
Bit depth conversion mechanism is changed and CI test fails. New test are ready and I've checked manually that this PR is passing. From my point of view PR is ready to be merged and new test will be also merged. |
|
SOFCI TEST |
|
@lgirdwood We need #2024 in order for the ICL compilation to pass. |
Changes signatures of copy DMA buffer functions to differentiate between source and sink bytes. Process function from now on will work on provided samples to handle different formats on input and output. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements macro to check whether value is aligned. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements generic version of PCM converter library component. This module provides static functions, which allows to copy buffer data with frame format conversion. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
HiFi3 implementation of PCM converter is optimized to process either two samples at once for 32 bit data or four samples for 16 bit data. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements functions for sample bytes and frame bytes calculations based on provided frame format and channels. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses newly added frame_bytes and sample_bytes methods in its own component based functions. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes processing flow and moves pcm frame format conversion from volume to dai component. This way we'll no longer need to artificially add volume into the pipelines, where it's not really needed but frame format change is e.g. KPD topology. Dai is the perfect place for conversion, since it's format is pretty much predefined and comes from topology. Rest of the pipeline is configured from the host. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes unused code from dai_config. Frame bytes are always calculated from scratch in dai_params, so no point in keeping this dead code. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses pcm_converter to choose the right processing function. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes volume component from KWD pipeline. It was only required to perform pcm conversion, but since DAI is now capable of doing that, usage of volume is deprecated. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Builds buffer_copy functions based on the selected formats in kconfig. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Reimplements buffer_copy functions to use memcpy_s instead of fragment API. Based on my tests it gives 20% better performance than previous implementation. Note that memcpy_s function uses vec_memcpy when built using XCC. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses buffer_copy function for bypass mode to avoid code duplication. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses buffer_copy function for bypass mode to avoid code duplication. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses buffer_copy function for bypass mode to avoid code duplication. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
45533e9 to
e78627d
Compare
|
SOFCI TEST |
|
@lgirdwood Device test passed. Internal CI will fail anyway as @zrombel reported. Tests will be changed as soon as this PR will be merged. |
Implements generic and HiFi3 versions of PCM converter library component.
This module provides static functions, which allows to copy
buffer data with frame format conversion.
Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com